/* style.css — Econocredit Design Tokens + Components */

/* =====================================================
   DESIGN TOKENS
   Art direction: Trustworthy fintech — cool teal-green,
   clean white surfaces, professional & approachable
   ===================================================== */

:root,
[data-theme='light'] {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing (4px system) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Surfaces — clean white/warm gray */
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-surface-2: #f1f3f5;
  --color-surface-offset: #e9ecef;
  --color-divider: #dee2e6;
  --color-border: #ced4da;

  /* Text */
  --color-text: #1a1d21;
  --color-text-muted: #6c757d;
  --color-text-faint: #adb5bd;
  --color-text-inverse: #ffffff;

  /* Primary — Econocredit teal-green (trustworthy, financial) */
  --color-primary: #0a7c6a;
  --color-primary-hover: #06614f;
  --color-primary-active: #044d3e;
  --color-primary-light: #e6f5f1;
  --color-primary-highlight: #cce8e1;

  /* Success */
  --color-success: #2d8a4e;
  --color-success-light: #e6f4ea;

  /* Error */
  --color-error: #c53030;
  --color-error-light: #fff5f5;

  /* Warning */
  --color-warning: #dd6b20;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 240 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 240 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

/* DARK MODE */
[data-theme='dark'] {
  --color-bg: #0f1214;
  --color-surface: #181c20;
  --color-surface-2: #1e2328;
  --color-surface-offset: #242a30;
  --color-divider: #2d343c;
  --color-border: #3a424c;

  --color-text: #e1e4e8;
  --color-text-muted: #8b949e;
  --color-text-faint: #5a6370;
  --color-text-inverse: #0f1214;

  --color-primary: #34c9a8;
  --color-primary-hover: #28b596;
  --color-primary-active: #1fa083;
  --color-primary-light: #0f2a24;
  --color-primary-highlight: #1a3d34;

  --color-success: #4caf6e;
  --color-success-light: #0f2a1a;

  --color-error: #f56565;
  --color-error-light: #2a0f0f;

  --color-warning: #ed8936;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f1214;
    --color-surface: #181c20;
    --color-surface-2: #1e2328;
    --color-surface-offset: #242a30;
    --color-divider: #2d343c;
    --color-border: #3a424c;
    --color-text: #e1e4e8;
    --color-text-muted: #8b949e;
    --color-text-faint: #5a6370;
    --color-text-inverse: #0f1214;
    --color-primary: #34c9a8;
    --color-primary-hover: #28b596;
    --color-primary-active: #1fa083;
    --color-primary-light: #0f2a24;
    --color-primary-highlight: #1a3d34;
    --color-success: #4caf6e;
    --color-success-light: #0f2a1a;
    --color-error: #f56565;
    --color-error-light: #2a0f0f;
    --color-warning: #ed8936;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* =====================================================
   LAYOUT
   ===================================================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--content-narrow);
}

.container--wide {
  max-width: var(--content-wide);
}

.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

/* 4. Reduce section spacing on mobile */
@media (max-width: 767px) {
  .section {
    padding-block: var(--space-8);
  }
}

/* =====================================================
   HEADER / NAV
   ===================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.header__logo-text .logo-econo {
  font-weight: 400;
}

.header__logo-text .logo-credit {
  font-weight: 700;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md, 8px);
  transition: color 0.2s, background 0.2s;
}

.header__nav-link:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}

.header__nav-link--active {
  color: var(--color-primary);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hamburger button — hidden on desktop */
.header__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius-md, 8px);
  transition: background 0.2s;
}

.header__hamburger:hover {
  background: oklch(from var(--color-text) l c h / 0.06);
}

.header__hamburger svg {
  width: 22px;
  height: 22px;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  background: oklch(from var(--color-bg) l c h / 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: calc(60px + var(--space-6)) var(--space-6) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav[aria-hidden="false"] {
  display: flex;
}

.mobile-nav__link {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md, 8px);
  transition: background 0.2s;
}

.mobile-nav__link:hover {
  background: oklch(from var(--color-text) l c h / 0.05);
}

.mobile-nav__link--active {
  color: var(--color-primary);
  font-weight: 600;
}

.mobile-nav__cta {
  margin-top: var(--space-4);
  text-align: center;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
  transform: scale(0.98);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary-light);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
  min-height: 52px;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* =====================================================
   HERO SECTION — Form above the fold
   ===================================================== */

.hero {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16)) var(--space-4);
  text-align: left;
}

.hero__inner {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

/* 3. Short subtitle on mobile, long on desktop */
.hero__subtitle--short {
  display: none;
}

@media (max-width: 767px) {
  /* 3. Swap subtitle */
  .hero__subtitle:not(.hero__subtitle--short) {
    display: none;
  }

  .hero__subtitle--short {
    display: block;
  }

  .hero {
    text-align: center;
  }

  .hero__content {
    max-width: none;
  }

  /* 1. Remove badge pill on mobile */
  .hero .hero__badge {
    display: none;
  }

  .hero__subtitle {
    max-width: none;
    margin-inline: auto;
  }

  /* 2. Remove trust items on mobile (subtitle covers it) */
  .hero .hero__trust-grid {
    display: none;
  }

  .hero__inner {
    gap: var(--space-3);
  }

  /* 4. Reduce form card padding on mobile */
  .signup-form {
    padding: var(--space-5);
  }

  /* 5. Remove header CTA on mobile */
  .header .header__actions .btn {
    display: none;
  }
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 55% 1fr;
    gap: var(--space-10);
    align-items: start;
  }
}

.hero__content {
  max-width: 560px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  max-width: 48ch;
}

/* Hero trust signals — 2-column grid: list left, score card right */
.hero__trust-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
  margin-bottom: var(--space-5);
}

.hero__trust-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

.hero__trust-icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Mini credit score card */
.hero__mini-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  box-shadow: var(--shadow-sm);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  min-width: 140px;
  flex-shrink: 0;
}

.hero__mini-card-header {
  margin-bottom: var(--space-2);
}

.hero__mini-card-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero__mini-score {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.hero__score-number {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.hero__mini-score-range {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.hero__mini-score-bar {
  height: 5px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  overflow: hidden;
}

.hero__score-fill {
  height: 100%;
  width: 72%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hero form column */
.hero__form-col {
  width: 100%;
}

/* On mobile, hide mini card (trust grid already hidden in hero mobile block) */
@media (max-width: 767px) {
  .hero__mini-card {
    display: none;
  }
}

/* =====================================================
   VALUE PROPS
   ===================================================== */

.value-props {
  background: var(--color-bg);
}

.value-props__header {
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 540px;
  margin-inline: auto;
}

/* 1. Center value prop cards on mobile + 3. Tighten gaps */
@media (max-width: 767px) {
  .value-props__header {
    margin-bottom: var(--space-8);
  }

  .value-props__grid {
    gap: var(--space-4);
  }

  .value-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.value-props__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.value-props__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.value-props__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .value-props__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.value-card {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.value-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.value-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.value-card__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =====================================================
   HOW IT WORKS
   ===================================================== */

.how-it-works {
  background: var(--color-surface);
}

.how-it-works__header {
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 480px;
  margin-inline: auto;
}

/* 2. Center How It Works steps on mobile */
@media (max-width: 767px) {
  .how-it-works__header {
    margin-bottom: var(--space-8);
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .steps {
    gap: var(--space-6);
  }
}

.how-it-works__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.how-it-works__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.steps {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  display: flex;
  gap: var(--space-4);
}

.step__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
}

.step__content {
  flex: 1;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.step__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

/* =====================================================
   SIGNUP FORM (now in hero)
   ===================================================== */

.signup-form {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.form-group input[type='text'],
.form-group input[type='email'] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  min-height: 44px;
}

.form-group input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.form-group input.error {
  border-color: var(--color-error);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
  display: none;
}

.form-error.visible {
  display: block;
}

.consent-text {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.consent-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =====================================================
   SUCCESS STATE
   ===================================================== */

.signup-success {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.signup-success.visible {
  display: block;
}

.signup-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--color-success-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.signup-success__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.signup-success__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 42ch;
  margin-inline: auto;
}

.signup-success__redirect {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* =====================================================
   FAQ
   ===================================================== */

.faq {
  background: var(--color-surface);
}

.faq__header {
  text-align: left;
  margin-bottom: var(--space-12);
  max-width: 480px;
}

.faq__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.faq__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.faq__list {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.faq-item:first-child {
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  gap: var(--space-4);
  min-height: 44px;
}

.faq-item__trigger:hover {
  color: var(--color-primary);
}

.faq-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
  color: var(--color-text-faint);
}

.faq-item.open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-item__answer {
  max-height: 300px;
}

.faq-item__answer p {
  padding-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =====================================================
   CTA BANNER
   ===================================================== */

.cta-banner {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
}

.cta-banner__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text-inverse);
}

.cta-banner__text {
  font-size: var(--text-base);
  opacity: 0.85;
  margin-bottom: var(--space-6);
  max-width: 48ch;
  margin-inline: auto;
  color: var(--color-text-inverse);
}

.cta-banner .btn--primary {
  background: var(--color-text-inverse);
  color: var(--color-primary);
}

.cta-banner .btn--primary:hover {
  background: oklch(from var(--color-text-inverse) l c h / 0.9);
}

.cta-banner__faq-link {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-inverse);
  opacity: 0.7;
  text-align: center;
  max-width: none;
}

.cta-banner__faq-link a {
  color: var(--color-text-inverse);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cta-banner__faq-link a:hover {
  opacity: 1;
}

/* 5. Full-width CTA banner button on mobile */
@media (max-width: 767px) {
  .cta-banner .btn--primary {
    display: block;
    width: 100%;
  }
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  background: var(--color-surface);
  padding-block: var(--space-8);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.footer__logo-icon {
  width: 24px;
  height: 24px;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

.footer__logo-text .logo-econo {
  font-weight: 400;
}

.footer__logo-text .logo-credit {
  font-weight: 700;
}

.footer__tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__link {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__legal {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer__disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.footer__links-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: none;
}

@media (max-width: 767px) {
  .footer__inner {
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer__logo {
    justify-content: center;
  }

  .footer__links {
    justify-content: center;
  }

  .footer__links-col {
    align-items: center;
  }
}

/* =====================================================
   LEGAL PAGES
   ===================================================== */

.legal-page {
  padding-top: 20px;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-16);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-6);
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-sm);
}

.legal-back:hover {
  text-decoration: underline;
}

.legal-header {
  margin-bottom: var(--space-8);
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.legal-header .legal-updated {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-8) 0 var(--space-3);
}

.legal-content p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.legal-content ul,
.legal-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.legal-content li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.legal-content a {
  color: var(--color-primary);
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.legal-table th,
.legal-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.legal-table th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-2);
}

.legal-table td {
  color: var(--color-text-muted);
}

.legal-content a.legal-cta,
a.legal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  margin-top: var(--space-4);
  min-height: 44px;
}

.legal-content a.legal-cta:hover,
a.legal-cta:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
}

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================
   MOBILE NAV
   ===================================================== */

@media (max-width: 767px) {
  .header__nav {
    display: none;
  }
  .header__hamburger {
    display: flex;
  }
}

/* =====================================================
   FAQ PAGE (standalone)
   ===================================================== */

.faq-page {
  background: var(--color-bg);
}

.faq-page__header {
  margin-bottom: var(--space-12);
  text-align: center;
  margin-inline: auto;
}

.faq-page__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.faq-page__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-inline: auto;
}

.faq-page__cta {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.faq-page__cta p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

/* =====================================================
   CONTACT PAGE
   ===================================================== */

.contact-page {
  background: var(--color-bg);
}

.contact-page__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.contact-page__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.contact-page__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-inline: auto;
}

.contact-form {
  background: var(--color-surface);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  max-width: 560px;
  margin-inline: auto;
}

.contact-form select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  cursor: pointer;
}

.contact-form select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.contact-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-body);
  line-height: 1.6;
}

.contact-form textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.contact-form textarea.error {
  border-color: var(--color-error);
}

/* Contact success state */
.contact-success {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  max-width: 560px;
  margin-inline: auto;
}

.contact-success.visible {
  display: block;
}

.contact-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--color-success-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.contact-success__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.contact-success__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 42ch;
  margin-inline: auto;
}

/* =====================================================
   PRIVACY FORM (Your Privacy page)
   ===================================================== */

.privacy-form {
  max-width: 600px;
}

.privacy-form .form-group {
  margin-bottom: var(--space-5);
}

.privacy-form input[type='text'],
.privacy-form input[type='email'] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  min-height: 44px;
}

.privacy-form input[type='text']:focus,
.privacy-form input[type='email']:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.privacy-form select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  cursor: pointer;
}

.privacy-form select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.form-group__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.privacy-form__radio-group {
  display: flex;
  gap: var(--space-6);
}

.privacy-form__radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
}

.privacy-form__radio-label input[type='radio'] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.privacy-form__checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.privacy-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  line-height: 1.5;
}

.privacy-form__checkbox-label input[type='checkbox'] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
