/* ==========================================================================
   FlashXCode design tokens
   Colours use light-dark() so the theme follows `color-scheme`:
   - html[data-theme=light|dark] is set before first paint by base.html
   - html[data-theme=auto] (no JS) falls back to the system preference
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  /* Surfaces */
  --bg: light-dark(#ffffff, #191a1b);          /* dark: rgb(25, 26, 27) — owner's choice */
  --surface: light-dark(#f5f5f7, #222325);
  --surface-raised: light-dark(#ffffff, #2a2b2d);
  --surface-sunken: light-dark(#ebebef, #131415);
  --header-bg: light-dark(rgb(255 255 255 / 0.72), rgb(25 26 27 / 0.78));

  /* Text */
  --text: light-dark(#1d1d1f, #f5f5f7);
  --text-secondary: light-dark(#6e6e73, #a1a1a6);
  --text-tertiary: light-dark(#86868b, #6e6e73);

  /* Accent */
  --accent: light-dark(#0068ff, #2997ff);
  --accent-hover: light-dark(#0058d9, #5aafff);
  --accent-pressed: light-dark(#004cbd, #1f86eb);
  --accent-soft: light-dark(#eaf2ff, rgb(41 151 255 / 0.14));
  --accent-contrast: #ffffff;
  --success: light-dark(#1f8a3b, #30d158);
  --success-soft: light-dark(#e7f6ea, rgb(48 209 88 / 0.14));
  --danger: light-dark(#d70015, #ff453a);

  /* Lines */
  --line: light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.10));
  --line-strong: light-dark(rgb(0 0 0 / 0.14), rgb(255 255 255 / 0.18));
  --focus-ring: 0 0 0 4px light-dark(rgb(0 104 255 / 0.28), rgb(41 151 255 / 0.4));

  /* Depth: restrained in light, luminous edges in dark */
  --shadow-sm: 0 1px 2px light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.5));
  --shadow-md: 0 2px 6px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.4)), 0 12px 32px light-dark(rgb(0 0 0 / 0.06), rgb(0 0 0 / 0.5));
  --shadow-lg: 0 4px 12px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.5)), 0 30px 80px light-dark(rgb(0 0 0 / 0.10), rgb(0 0 0 / 0.65));
  --edge-light: inset 0 1px 0 light-dark(rgb(255 255 255 / 0), rgb(255 255 255 / 0.06));

  /* Icon tile (brand gradient, mirrors the FlashXCode tool) */
  --tile-from: light-dark(#3b8cff, #4aa8ff);
  --tile-to: light-dark(#0062f0, #0a6cf0);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --fs-display: clamp(2.75rem, 1.6rem + 5.6vw, 6rem);
  --fs-h1: clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem);
  --fs-h2: clamp(2rem, 1.45rem + 2.5vw, 3.5rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-title: 1.1875rem;
  --fs-lead: clamp(1.125rem, 1.03rem + 0.45vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-caption: 0.8125rem;
  --fs-micro: 0.75rem;
  --tracking-display: -0.045em;
  --tracking-heading: -0.032em;
  --tracking-title: -0.018em;
  --tracking-eyebrow: 0.06em;

  /* Space & layout */
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --container: 1200px;
  --container-narrow: 760px;
  --section-space: clamp(2rem, 1.4rem + 7vw, 6rem);
  --header-h: 52px;

  /* Shape */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 800ms;
}

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