/* ==========================================================================
   tokens.css — "Dark Control Plane" design tokens
   Dark is the default. Light theme is applied via [data-theme="light"].
   Colors come from the logo (assets/brand/logo.svg). Blue does the work;
   orange / green / yellow are small accents only (dots, top borders).
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces: --bg matches the logo's original background */
  --bg: #070A10;
  --surface: #0E1420;
  --surface-2: #131B2B;
  --border: #1E2838;
  --text: #E6EDF7;
  --text-muted: #93A3BD;

  /* brand: logo blue is THE accent */
  --accent: #01A9F8;
  --accent-strong: #38BDF8;
  --accent-glow: rgb(1 169 248 / .18);
  --on-accent: #070A10; /* text on accent buttons (7.5:1) */

  /* secondary logo colors: small touches only */
  --brand-orange: #F65725;
  --brand-green: #85B302;
  --brand-yellow: #FFBC02;
  --success: #34D399;

  /* derived surfaces (built from the tokens above) */
  --glass: rgb(14 20 32 / .8);            /* --surface at 80% for cards over the 3D scene */
  --glass-solid: rgb(14 20 32 / .96);     /* used when backdrop blur is off */
  --glass-header: rgb(7 10 16 / .72);     /* --bg at 72% for the sticky header */
  --grid-line: rgb(230 237 247 / .045);   /* hero grid */
  --border-strong: #2A3648;
  --shadow-card: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -16px rgb(0 0 0 / .6);
  --shadow-lift: 0 0 0 1px var(--accent-glow), 0 18px 40px -18px rgb(1 169 248 / .35);

  /* radii */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* type */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* fluid type scale (360px → 1440px) */
  --fs-h1: clamp(2.75rem, 1.9rem + 3.6vw, 4.5rem);        /* 44 → 72px */
  --fs-h2: clamp(1.875rem, 1.45rem + 1.8vw, 2.75rem);     /* 30 → 44px */
  --fs-h3: clamp(1.25rem, 1.15rem + .45vw, 1.5rem);       /* 20 → 24px */
  --fs-lead: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); /* 18 → 21px */
  --fs-body: clamp(1.0625rem, 1.03rem + .15vw, 1.125rem); /* 17 → 18px */
  --fs-small: .9375rem;                                    /* 15px */
  --fs-mono: .8125rem;                                     /* 13px */
  --lh-body: 1.6;
  --lh-tight: 1.1;
  --tracking-head: -0.022em;
  --tracking-mono: .08em;

  /* layout */
  --maxw: 1180px;
  --gutter: 16px;
  --header-h: 64px;
  --section-pad: var(--space-24);

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-reveal: 520ms;

  /* z-index ladder */
  --z-scene: 0;
  --z-content: 1;
  --z-header: 50;
  --z-menu: 49;
  --z-skip: 100;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #EEF2F8;
  --border: #DCE3EE;
  --text: #0B1324;
  --text-muted: #4A5872;

  --accent: #0369A1;
  --accent-strong: #075985;
  --accent-glow: rgb(3 105 161 / .12);
  --on-accent: #FFFFFF;

  /* darker versions so they pass contrast on light backgrounds */
  --brand-orange: #C2410C;
  --brand-green: #4D7C0F;
  --brand-yellow: #A16207;

  --glass: rgb(255 255 255 / .8);
  --glass-solid: rgb(255 255 255 / .96);
  --glass-header: rgb(247 249 252 / .78);
  --grid-line: rgb(11 19 36 / .06);
  --border-strong: #C9D3E2;
  --shadow-card: 0 1px 2px rgb(11 19 36 / .04), 0 12px 32px -18px rgb(11 19 36 / .18);
  --shadow-lift: 0 0 0 1px var(--accent-glow), 0 18px 40px -18px rgb(3 105 161 / .25);
}

@media (max-width: 767px) {
  :root {
    --header-h: 60px;
    --section-pad: var(--space-16);
  }
}
