/* =============================================================
   AICSS Project 1 — Zoox Global Theme Override
   -------------------------------------------------------------
   Loaded LAST on every page (after each page's inline <style>,
   after portal.css and site-shell.css) so it wins the cascade
   without rewriting every inline rule.

   Two mechanisms:
   1. It re-points the legacy page CSS variables (--navy, --gold,
      --blue, --paper, --line ...) to Zoox tokens, so every
      variable-driven colour across all pages flips at once.
   2. It overrides the handful of HARD-CODED navy/gold gradients
      and surfaces (hero, bands, marks, buttons, cards) to the
      observed Zoox palette: sage canvas, white/mint cards,
      deep-forest dark feature sections, carbon footer, and the
      single vivid-teal primary CTA — hairline borders, no shadows.

   Requires css/design-tokens.css (loaded first).
   See ZOOX_DESIGN_ANALYSIS.md / DESIGN_SYSTEM_MAP.md.
   ============================================================= */

/* ── 1. Re-map legacy page variables to Zoox tokens ──────────── */
:root {
  /* dark / brand -> carbon + deep forest */
  --navy:  var(--color-carbon);
  --navy2: var(--color-graphite);
  --royal: var(--color-graphite);
  --ink:   var(--color-carbon);

  /* accents -> eucalyptus (decor, text-safe) + teal (highlight) */
  --gold:  var(--color-eucalyptus);
  --gold2: var(--color-vivid-teal);
  --green: var(--color-eucalyptus);

  /* links / secondary brand -> graphite + eucalyptus */
  --blue:  var(--color-graphite);
  --blue2: var(--color-eucalyptus);

  /* text */
  --muted: var(--color-slate);

  /* surfaces: body = sage, soft sections = white, portal = sage */
  --paper: var(--color-pure-white);
  --pale:  var(--color-pure-white);
  --bg:    var(--color-sage-canvas);
  --white: var(--color-pure-white);

  /* lines + shadow */
  --line:  var(--color-hairline);
  --shadow: none;
}

/* ── 2. Base canvas + typography ─────────────────────────────── */
body {
  background: var(--color-sage-canvas) !important;
  color: var(--color-carbon);
  font-family: var(--font-gt-standard-s);
}
body.portal { background: var(--color-sage-canvas) !important; }

h1, h2, h3,
.section-title, .hero h1, .hero h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.section-title, .hero h1 { font-weight: 500; }

/* Kickers / eyebrows */
.kicker { color: var(--color-eucalyptus) !important; }
.eyebrow { color: var(--color-mist) !important; }
.eyebrow:before { background: var(--color-mist) !important; }

/* ── 3. Dark feature sections (deep forest #34484a, white text) ─
   Every legacy navy band/hero becomes a Zoox dark-forest moment. */
.hero,
.banner, .cta, .contact, .family-band, .legal, .quote,
.route-box, .emergency-give-card, .apply-hero,
.rolehead, .fund-band.dark {
  background: var(--color-graphite) !important;
  color: #fff;
}
/* Solid dark chips/strips */
.caption, .emergency-highlight, .photo-caption,
.top, .topbar, .topline, .welfare-no, .step-no {
  background: var(--color-graphite) !important;
  color: #fff !important;
}
/* Keep headings/strong white on dark bands */
.hero h1, .hero h2, .hero h3,
.banner h2, .cta h2, .contact h2, .family-band h2, .quote blockquote,
.rolehead h1 { color: #fff !important; }

/* Teal highlights that sit on the dark bands (was gold2) */
.hero h1 em, .banner .eyebrow, .family-band .eyebrow,
.emergency-highlight strong, .give-topline { color: var(--color-vivid-teal) !important; }

/* Soften the decorative orbit rings on dark bands to hairline white */
.hero:before, .hero:after, .banner:after, .quote:after { opacity: 0.5; }

/* ── 4. Primary CTA = single vivid-teal fill, carbon text ─────── */
.btn, .callbtn, .nav-cta,
.impact-donate, .emergency-pay-button,
.portal .btn, a.btn {
  background: var(--color-vivid-teal) !important;
  color: var(--color-carbon) !important;
  border: 0 !important;
  border-radius: var(--radius-buttons) !important;
  box-shadow: none !important;
  font-weight: 600;
}
.btn:hover, .callbtn:hover, .nav-cta:hover,
.impact-donate:hover, .emergency-pay-button:hover,
.portal .btn:hover, a.btn:hover {
  filter: brightness(1.04);
  transform: none !important;
  box-shadow: none !important;
}
/* Secondary / outline buttons -> ghost carbon */
.outline, .btn-outline, .portal .btn-outline {
  background: transparent !important;
  color: var(--color-carbon) !important;
  border: 1px solid var(--color-hairline-strong) !important;
  box-shadow: none !important;
}
.outline:hover, .btn-outline:hover { background: var(--color-mint-frost) !important; }
.portal .btn-gold { background: var(--color-vivid-teal) !important; color: var(--color-carbon) !important; border-color: var(--color-vivid-teal) !important; }

/* Emergency amount chips */
.emergency-amount.selected, .emergency-amount:hover {
  background: var(--color-vivid-teal) !important;
  color: var(--color-carbon) !important;
  border-color: var(--color-vivid-teal) !important;
}

/* ── 5. Brand marks / badge icons -> teal surface, carbon mark ── */
.mark, .brand-mark, .impact-icon {
  background: var(--color-vivid-teal) !important;
  color: var(--color-carbon) !important;
  box-shadow: none !important;
}

/* ── 6. Light cards / soft gradient surfaces -> flat white/mint ─ */
.boundary, .callout, .fund-band, .emergency-qr-card,
.donation-card.highlight, .fee.featured, .metric, .office,
.panel.designated {
  background: var(--color-pure-white) !important;
}

/* ── 7. Card language: large radius, hairline border, no shadow ─ */
.card, .focus-card, .welfare-card, .value, .step, .donation-card,
.strip, .metric, .office, .boundary, .callout, .fund-band,
.emergency-qr-card, .emergency-proof, .notice, .panel,
.fee, .route-box {
  box-shadow: none !important;
  border-color: var(--color-hairline) !important;
}
.card, .focus-card, .donation-card, .emergency-qr-card,
.emergency-proof, .metric, .office, .boundary, .fee {
  border-radius: 24px !important;
}
.welfare-card, .step, .value, .panel, .callout { border-radius: 18px !important; }

/* Hover: lift via border/colour, not heavy shadow */
.focus-card:hover, .welfare-card:hover, .value:hover,
.card:hover, .donation-card:hover {
  box-shadow: none !important;
  border-color: var(--color-eucalyptus) !important;
  transform: translateY(-3px);
}

/* Section rhythm: soft sections read as white panels over sage */
.section.soft, .soft { background: var(--color-pure-white) !important; }

/* Checks / small accents */
.checks i { background: var(--color-mint-frost) !important; color: var(--color-eucalyptus) !important; }
.ico { background: var(--color-mint-frost) !important; color: var(--color-eucalyptus) !important; }

/* Notices -> mint-frost info card */
.notice {
  background: var(--color-mint-frost) !important;
  border: 1px solid var(--color-hairline) !important;
  color: var(--color-slate) !important;
}
.notice strong { color: var(--color-carbon); }

/* Inputs -> Zoox rounded hairline fields */
.portal input, .portal select, .portal textarea,
input[type="text"], input[type="email"], input[type="number"],
input[type="tel"], input[type="password"], input[type="date"],
select, textarea {
  border-radius: var(--radius-inputs) !important;
  border: 1px solid var(--color-hairline-strong) !important;
}
.portal input:focus, .portal select:focus, .portal textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-eucalyptus) !important;
}

/* Stepper active state -> teal/eucalyptus (portal) */
.stepper .step.active { border-color: var(--color-eucalyptus) !important; color: var(--color-carbon) !important; box-shadow: none !important; }
.stepper .step.active .b { background: var(--color-eucalyptus) !important; color: #fff !important; }
.stepper .step.done .b { background: var(--color-vivid-teal) !important; color: var(--color-carbon) !important; }

/* Demo banner -> carbon strip (stays legible, drops the maroon) */
#aicss-demo-banner { background: var(--color-carbon) !important; }
#aicss-demo-banner strong { color: var(--color-vivid-teal) !important; }

/* ── 8. Login gateway: role-icon tiles on-palette (was blue/gold) ─ */
.card[data-role="family"]  { --c1: var(--color-eucalyptus); --c2: var(--color-vivid-teal); }
.card[data-role="donor"]   { --c1: var(--color-vivid-teal); --c2: var(--color-eucalyptus); }
.card[data-role="taluk"]   { --c1: var(--color-graphite);   --c2: var(--color-eucalyptus); }
.card[data-role="central"] { --c1: var(--color-graphite);   --c2: var(--color-vivid-teal); }
.login .icon, .card .icon { color: var(--color-carbon); }

/* "Pending backend" status badge -> neutral mint chip (keeps the ⏳ cue) */
.pending {
  color: var(--color-eucalyptus) !important;
  background: var(--color-mint-frost) !important;
  border: 1px solid var(--color-hairline) !important;
}

/* ── 9. Status badge family (preview labels) -> on-palette chips ── */
.pill-sample, .tag-sample, .badge-preview {
  background: var(--color-graphite) !important;
  color: #fff !important;
}
