/* Design tokens — the only file allowed to hold a raw colour or a magic number.
   Palette is the business outfit: black and red. Red is punctuation — the header
   mark, the CTAs, the active nav item — never a flood across the page. */

:root {
  /* ── Brand ramp ─────────────────────────────────────────────── */
  /* 400 is the on-black red and 600 the on-white one: the same hue cannot do
     both jobs at 4.5:1, so each theme picks the step that passes against it. */
  --red-300: #FF8E86;
  --red-400: #F4594F;
  --red-500: #E01E16;
  --red-600: #B8140E;
  --red-700: #8A0F0A;

  /* Neutrals are hue-free. A warm grey beside this red reads as brown. */
  --black:   #000000;
  --ink-950: #050507;
  --ink-900: #0F0F11;
  --ink-850: #17171B;
  --ink-800: #1E1E22;
  --ink-700: #2A2A2F;
  --ink-500: #6B6B71;
  --ink-300: #A1A1A7;
  --ink-100: #E3E3E6;
  --ink-050: #F4F4F5;
  --paper:   #FAFAFA;
  --white:   #FFFFFF;

  /* Channel triplets, for the translucent overlays that scrims and glass need.
     A token can then supply the colour while the component supplies the alpha. */
  --shade-rgb: 0 0 0;
  --light-rgb: 255 255 255;
  --shadow-rgb: 0 0 0;
  --brand-rgb: 224 30 22;

  --ok-500: #4E9A6A;

  /* ── Type ───────────────────────────────────────────────────── */
  /* The signature hand names things: nav items, section titles, category
     labels. It is the client's own logo feel, so it carries the words a
     visitor is choosing between. */
  --font-display: "Parisienne", "Segoe Script", "Brush Script MT", cursive;
  /* The hero statement is a heavy condensed grotesk: at 11vw a script would
     turn to ribbon and a text serif's thin strokes would disappear. */
  --font-hero: "Anton", "Arial Narrow", Impact, "Helvetica Neue", sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Body tops out at 1rem — see STANDARDS "Visual density". */
  --text-xs:   0.75rem;
  --text-sm:   0.8125rem;
  --text-base: 0.9375rem;
  --text-md:   1rem;
  --text-lg:   clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  --text-xl:   clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  --text-2xl:  clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem);
  --text-3xl:  clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);
  --text-hero: clamp(2.3rem, 1.6rem + 3.2vw, 4.25rem);
  --text-mega: clamp(2.2rem, 11.2vw, 10.5rem);

  /* A script's x-height is roughly three quarters of a grotesk's at the same
     size, so anything set in it is stepped up to land on the same optical size. */
  --text-script-sm: 1.15rem;
  --text-script-md: 1.3rem;

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-normal: 1.55;
  /* Parisienne's ascenders and descenders overrun their em box; at 1.08 a
     two-line title clips the loops of the line below it. */
  --leading-script: 1.24;

  --tracking-wide: 0.08em;
  --tracking-wider: 0.18em;

  /* ── Space ──────────────────────────────────────────────────── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Section rhythm scales with the viewport so a phone never gets desktop padding. */
  --section-y: clamp(2.75rem, 1.6rem + 5vw, 6rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.75rem);
  --measure: 62ch;
  --page-max: 82rem;
  --page-narrow: 46rem;

  /* ── Shape ──────────────────────────────────────────────────── */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --border-hairline: 1px;

  /* ── Motion ─────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;

  /* ── Layers ─────────────────────────────────────────────────── */
  --z-base: 1;
  --z-sticky: 100;
  --z-header: 200;
  --z-drawer: 300;
  --z-lightbox: 400;
  --z-toast: 500;
}

/* ── The only theme ──────────────────────────────────────────────
   Black and red is the business's outfit, so the site wears it on every screen
   rather than turning white on half of them — and the wordmark can then be
   white, which it cannot be on a white page. The ground is true black so the
   red has the most contrast available to it; bands sit a few points above it
   rather than below, since nothing is darker. */
:root {
  color-scheme: dark;

  --bg: var(--ink-950);
  --bg-raised: var(--ink-900);
  --bg-sunken: var(--black);
  --surface: var(--ink-850);
  --surface-hover: var(--ink-800);
  --border: var(--ink-700);
  --border-strong: #3A3A40;

  --fg: var(--ink-050);
  --fg-muted: var(--ink-300);
  --fg-subtle: var(--ink-500);
  --fg-inverse: var(--ink-950);

  --accent: var(--red-500);
  --accent-hover: var(--red-400);
  /* White, not black: #E01E16 behind black text is 4.07:1 and fails. */
  --accent-contrast: var(--white);
  --accent-soft: rgb(var(--brand-rgb) / 0.14);

  --link: var(--red-400);
  --link-hover: var(--red-300);

  --focus-ring: var(--red-400);
  --selection-bg: var(--red-500);
  --selection-fg: var(--white);

  --scrim: rgba(0, 0, 0, 0.88);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.75);
  --img-placeholder: var(--ink-800);

  --hero-top: #121214;
  --hero-bottom: var(--black);
  --hero-glow: rgb(var(--brand-rgb) / 0.20);
  --hero-type: #F7F7F8;
}

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