/* =========================================================
   AERO — Design tokens + base reset
   Shared by the public site (site.css) and the platform (platform.css)
   ========================================================= */

:root {
  /* Brand palette (from prompt design_tokens) */
  --navy: #081321;
  --graphite: #111C2A;
  --ivory: #F4F1EA;
  --gold: #C9A76A;
  --muted: #93A2B3;
  --danger: #D96B69;
  --success: #68B79B;
  --warning: #D9A75A;
  --info: #7FA6CF;

  /* Derived surfaces */
  --bg: var(--navy);
  --surface-1: #0D1827;
  --surface-2: var(--graphite);
  --surface-3: #18263A;
  --surface-hover: #1C2C42;
  --line: rgba(244, 241, 234, 0.08);
  --line-strong: rgba(244, 241, 234, 0.16);
  --text: var(--ivory);
  --text-2: #C8CFD8;
  --text-3: var(--muted);
  --gold-soft: rgba(201, 167, 106, 0.14);
  --gold-line: rgba(201, 167, 106, 0.45);
  --danger-soft: rgba(217, 107, 105, 0.14);
  --success-soft: rgba(104, 183, 155, 0.14);
  --warning-soft: rgba(217, 167, 90, 0.14);
  --info-soft: rgba(127, 166, 207, 0.14);

  /* Chart series (validated against navy for contrast) */
  --series-1: #C9A76A;
  --series-2: #7FA6CF;
  --series-3: #68B79B;
  --series-4: #B58BC9;
  --series-5: #D96B69;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.875rem;
  --fs-2xl: clamp(2.25rem, 4vw, 3.25rem);
  --fs-hero: clamp(2.75rem, 7.2vw, 6.25rem);

  /* Shape + space */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --gutter: clamp(16px, 4vw, 48px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 700ms;
  --reveal-dist: 36px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.45);
  --focus: 0 0 0 2px var(--navy), 0 0 0 4px var(--gold);

  color-scheme: dark;
}

@media (max-width: 768px) {
  :root { --reveal-dist: 18px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 500; text-decoration: none; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

.display { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.01em; }
.eyebrow {
  font-size: var(--fs-xs); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  font-weight: 500;
}
.muted { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

/* Shared buttons (site + platform) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0.02em; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #D7B983; border-color: #D7B983; color: var(--navy); }
.btn-ghost { border-color: transparent; }
.btn-danger { border-color: rgba(217,107,105,0.5); color: #F0A9A7; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }

/* Shared badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--success-soft); color: #8FD3BA; border-color: rgba(104,183,155,0.3); }
.badge-danger { background: var(--danger-soft); color: #F0A9A7; border-color: rgba(217,107,105,0.3); }
.badge-warning { background: var(--warning-soft); color: #EBC48A; border-color: rgba(217,167,90,0.3); }
.badge-info { background: var(--info-soft); color: #A9C6E4; border-color: rgba(127,166,207,0.3); }
.badge-gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }

.demo-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  border: 1px dashed var(--gold-line); color: var(--gold); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500;
}

/* Shared by site + platform (moved from platform.css) */
/* ---------- Lists / rows ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-size: var(--fs-sm); font-weight: 500; }
.list .meta { font-size: var(--fs-xs); color: var(--text-3); }
.list a { text-decoration: none; }
.route-pair { display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.route-pair b { font-weight: 500; }
.route-arrow { color: var(--gold); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 11px; margin: 0 4px 4px 0; }

/* ---------- Charts ---------- */
.chart-box { min-height: 160px; width: 100%; }
.chart text { font-family: var(--font-ui); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--fs-xs); color: var(--text-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 12px; align-items: center; font-size: var(--fs-xs); }
.hb-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 8px; background: var(--surface-3); border-radius: 4px; position: relative; }
.hb-fill { display: block; height: 100%; border-radius: 4px; }
.hb-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ivory); opacity: 0.6; }
.hb-value { text-align: right; min-width: 64px; }
.hb-value small { display: block; color: var(--text-3); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-xs); color: var(--text-2); min-width: 140px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 2px; }
.donut-legend b { margin-left: auto; color: var(--text); font-weight: 500; }
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.funnel li { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; }
.fn-bar { width: var(--w); min-width: 120px; background: linear-gradient(90deg, rgba(201,167,106,0.35), rgba(201,167,106,0.15)); border: 1px solid var(--gold-line); border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.fn-conv { font-size: var(--fs-xs); }

