/* ====================================================
   DFA Campaign Landing Page – style.css
   Layout: Split screen – navy left panel | image right
   Palette:
     --brand-navy   : #0d1a2e  (deep navy panel)
     --brand-blue   : #3380f5
     --text-light   : #f2f2f2
   ==================================================== */

/* ── Reset & base ─────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-navy: #0d1a2e;
  --brand-blue: #3380f5;
  --text-light: #f2f2f2;
  --text-muted: rgba(242, 242, 242, 0.692);
  --border-light: rgba(255, 255, 255, 0.25);
  --input-bg: hsla(0, 0%, 100%, 0.203);
  --input-h: 40px;
  --radius: 8px;
  --font: 'Montserrat', sans-serif;
  --panel-width: 42vw;
  --panel-max: 560px;
  --transition: 0.2s ease;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-light);
  background: var(--brand-navy);
  overflow: hidden;
}

/* ── Full-page wrapper ────────────────────────────── */
.page-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  /* vertically centre the card */
  padding-left: 56px;
  /* breathing room from left edge */
  padding-right: 56px;
  overflow: hidden;
}

/* Background image fills the full viewport */
.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ── CARD ────────────────────────────────────────── */
.card {
  position: relative;
  z-index: 2;
  width: 580px;
  max-height: calc(100vh - 64px);
  /* never taller than the viewport */
  background: rgba(13, 26, 46, 0.90);
  border-radius: 20px;
  padding: 36px 44px 28px 56px;
  /* extra left padding */
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(51, 128, 245, 0.3) transparent;
  animation: cardIn 0.5s cubic-bezier(0.22, 0.8, 0.44, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.card::-webkit-scrollbar {
  width: 4px;
}

.card::-webkit-scrollbar-track {
  background: transparent;
}

.card::-webkit-scrollbar-thumb {
  background: rgba(51, 128, 245, 0.35);
  border-radius: 2px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.logo-left {
  height: 46px;
  width: auto;
}

.logo-right {
  height: 46px;
  width: auto;
}

.divider-v {
  width: 1px;
  height: 50px;
  background: rgba(242, 242, 242, 0.35);
  flex-shrink: 0;
}

/* ── Headline ──────────────────────────────────────── */
.headline {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* ── Form ──────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

/* ── Form sections ─────────────────────────────────── */
.form-section {
  margin-bottom: 12px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

/* ── Field rows ────────────────────────────────────── */
.field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.field-row--three {
  gap: 8px;
}

/* ── Individual fields ─────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field--title {
  flex: 0 0 100px;
}

.field--grow {
  flex: 1 1 0;
}

.field--full {
  flex: 1 1 100%;
}

/* ── Inputs ────────────────────────────────────────── */
.field input {
  height: var(--input-h);
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0 14px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-light);
  outline: none;
  width: 100%;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
  caret-color: var(--brand-blue);
}

.field input::placeholder {
  color: var(--text-muted);
  font-size: 11.5px;
}

.field input:focus {
  border-color: var(--brand-blue);
  background: rgba(51, 128, 245, 0.1);
  box-shadow: 0 0 0 2px rgba(51, 128, 245, 0.2);
}

/* ── Select ────────────────────────────────────────── */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  height: var(--input-h);
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0 32px 0 14px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.select-wrapper select:focus {
  border-color: var(--brand-blue);
  background: rgba(51, 128, 245, 0.1);
  box-shadow: 0 0 0 2px rgba(51, 128, 245, 0.2);
  color: var(--text-light);
}

.select-wrapper select option {
  background: #0d1f38;
  color: #fff;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: auto;
  pointer-events: none;
  filter: brightness(1.5) opacity(0.65);
}

/* ── Submit button ─────────────────────────────────── */
.btn-submit {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 4px;
  background: var(--brand-blue);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(51, 128, 245, 0.4);
  flex-shrink: 0;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.14) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.btn-submit:hover {
  background: #2567d4;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(51, 128, 245, 0.5);
}

.btn-submit:hover::before {
  transform: translateX(100%);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Features (below button) ───────────────────────── */
.features {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
  opacity: 0.85;
  flex: 1 1 0;
  min-width: 0;
}

.feature-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  filter: brightness(1.1);
}

/* ── Privacy note ──────────────────────────────────── */
.privacy-note {
  margin-top: 10px;
  text-align: center;
  font-size: 9.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.privacy-link {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-link:hover {
  opacity: 0.8;
}

/* ── Validation states ─────────────────────────────── */
.field input.invalid,
.select-wrapper select.invalid {
  border-color: #e05c5c;
  box-shadow: 0 0 0 2px rgba(224, 92, 92, 0.2);
  animation: shake 0.35s ease;
}

.error-text {
  display: none;
  color: #e05c5c;
  font-size: 10px;
  font-weight: 500;
  margin-top: 4px;
  margin-left: 14px;
}

.field input.invalid~.error-text {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(5px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* ── Toast notification ────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: calc(var(--panel-width) / 2);
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f2744;
  border: 1px solid rgba(51, 128, 245, 0.45);
  color: var(--text-light);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  z-index: 999;
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.44, 1), opacity 0.38s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 768px) {

  html,
  body {
    overflow-y: auto !important;
    height: auto !important;
  }

  .page-wrapper {
    position: relative;
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
    align-items: flex-start;
    padding: 24px 16px;
  }

  .bg-image {
    position: fixed;
    /* keep BG fixed while card scrolls */
  }

  .card {
    width: 100%;
    max-height: none;
    border-radius: 16px;
    padding: 28px 24px 24px 32px;
  }

  .features {
    gap: 8px 12px;
  }

  .feature-item {
    min-width: 90px;
  }

  .toast {
    left: 50%;
    bottom: 16px;
  }
}

@media (max-width: 600px) {
  .field-row {
    flex-direction: column;
    gap: 8px;
  }

  .field--title {
    flex: 1 1 100%;
  }

  .field-row--three {
    flex-direction: column;
  }
}