/*
  StemMixr website design system
  ------------------------------
  All visual decisions for the site live here as custom properties.
  `styles.css` should reference these tokens — not raw hex, px, or font names.

  Palette source: doc/ui/color-palette.md (warm night + 808 orange).
  This file is independent of the iOS DesignSystem package.
*/

:root {
  /* Color — surfaces */
  --color-bg-0: #0b0906;
  --color-bg-1: #14100b;
  --color-bg-2: #1c160f;
  --color-bg-3: #241c14;
  --color-border: #3a2e22;
  --color-divider: #2c2218;
  --color-shadow: #000000;

  /* Color — text */
  --color-text-primary: #f4f1ea;
  --color-text-secondary: #c9c2b6;
  --color-text-tertiary: #9b9285;
  --color-text-disabled: #6f685e;
  --color-text-on-accent: #0b0906;

  /* Color — accent (808 / autumn) */
  --color-accent: #ff9a27;
  --color-accent-hover: #ffb84d;
  --color-accent-pressed: #e07a00;
  --color-logo: #ff7122;
  --color-ribbon-top: #ffc257;
  --color-ribbon-mid: #ff721d;
  --color-ribbon-bottom: #882600;

  /* Color — secondary (sparing) */
  --color-rust: #c65a2e;
  --color-sand: #d9c6a5;
  --color-error: #c0362c;

  /* Typography */
  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Inter", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;

  --text-hero: clamp(2.85rem, 8.4vw, 6.75rem);
  --text-insight: clamp(2.15rem, 5.8vw, 4.15rem);
  --text-close: clamp(2rem, 5vw, 3.5rem);
  --text-section: clamp(1.55rem, 3.4vw, 2.4rem);
  --text-still: clamp(1.2rem, 2.1vw, 1.7rem);
  --text-lede: clamp(1.05rem, 1.5vw, 1.2rem);
  --text-body: 1rem;
  --text-ui: 0.9375rem;
  --text-caption: 0.75rem;
  --text-kicker: 0.6875rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-none: 0.92;
  --leading-tight: 1.15;
  --leading-body: 1.55;
  --tracking-display: -0.045em;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.14em;

  /* Space — 4px base */
  --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;

  --page-pad: clamp(1.25rem, 4.2vw, 3.75rem);
  --content-max: 72rem;
  --measure: 34rem;
  --measure-insight: 38rem;
  --section-space: clamp(4.5rem, 11vw, 8rem);
  --header-height: 4.25rem;
  --control-height: 3.15rem;

  /* Shape */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.15rem;
  --radius-xl: 1.75rem;
  --radius-device: 2.35rem;
  --radius-pill: 999px;
  --border-thin: 1px;
  --device-width: min(18rem, 74vw);
  --device-ratio: 9 / 17.2;

  /* Elevation */
  --shadow-device:
    0 2.5rem 5rem color-mix(in srgb, var(--color-shadow) 55%, transparent),
    0 0 0 1px color-mix(in srgb, var(--color-border) 80%, transparent);
  --glow-accent: 0 0 7rem color-mix(in srgb, var(--color-accent) 32%, transparent);
  --grain-opacity: 0.045;

  /* Motion */
  --duration-fast: 120ms;
  --duration: 200ms;
  --duration-slow: 420ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout breakpoints (documented; media queries still need raw widths) */
  --bp-md: 720px;
  --bp-lg: 1000px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration: 0ms;
    --duration-slow: 0ms;
  }
}
