/* web-studio design system: TOKENS. The one file where every number that shapes a page lives.

   Extracted 2026-09-30 from the AirwayControl site (sites/airwaycontrol/drafts/2026-09-26/base.css
   and chrome.css, flightcontrol origin/main 43ccd752). The motion tokens are the web motion law's
   (docs/rules/01-motion.md) and carry their measured values unchanged; the palette is
   AirwayControl's "Draft G" (blush paper, plum ink, dusty rose) and is the part a new site replaces.

   RULES (enforced by .claude/hooks/web-guard.py):
   - A call site names a token. It never writes a number of seconds, a cubic-bezier or an easing
     keyword of its own. New timing goes HERE, with a name and a comment saying what it is for.
   - Tokenise with the values that stand, not with the nearest token that exists (2026-09-29: three
     transitions were "rounded" to the nearest token and got faster; Christopher noticed).
   - Reduce Motion redefines the tokens below, in this file, so no call site needs its own query. */

:root {
  /* ---------- palette (per site: replace these) ---------- */
  /* maria-danielsen 2026-12-06: carbon ink, warm paper and one rubric red, the red that manuscripts
     used for section marks. DARK IS THE PAGE'S LOOK (Christopher 2026-12-06: «Bruk mørk modus som hoved.
     Den ser bedre ut.»); the light book by day is kept below, behind data-theme="light".
     Measured with scripts/contrast.py: ink 14.93:1 on --bg and 14.08:1 on --bg-2; soft 6.76:1 and
     6.38:1; accent 5.96:1 and 5.62:1. With the grain over --bg (darkest patch #161513, lightest #201f1d)
     the lowest is accent 5.33:1. */
  color-scheme: dark;
  --bg: #151412;        /* page */
  --bg-2: #1c1a17;      /* footer */
  --ink: #ece7dc;       /* text */
  --soft: #a39c90;      /* secondary text */
  --dim: #3b3732;       /* unlit words. Decorative only, never body text */
  --accent: #e2725c;    /* rubric: the commas of the thesis title and the years */
  --link: #ece7dc;
  --line: rgba(236,231,220,.14);
  --tile: #1c1a17; --tile-2: #23211d;
  --nav-bg: rgba(21,20,18,.84);
  --foot-bg: #1c1a17;
  --on-ink: #151412;
  --select: rgba(226,114,92,.28); /* text selection: the rubric, thinned */
  --portrait-bright: 1;          /* the photo as it rests: as Maria sent it */
  --develop-bright: .45;         /* the print as it starts: near black, so it rises out of the page */
  --grain: .06;                  /* paper fibre over the whole page, decorative */

  /* ---------- layout ---------- */
  --gutter: 22px;        /* 40px from 734px, below */
  --wrap: 1260px;        /* the page column */
  --narrow: 980px;       /* a reading-width column inside a section */
  --read: 68ch;          /* a text page's column (About, Privacy) */
  --nav-h: 52px;         /* the sticky top bar; anchors land under it */
  --radius-card: 28px; --radius-media: 32px; --radius-pill: 980px;
  --section-pad: clamp(88px, 11vw, 152px);

  /* ---------- type (Apple product-page scale 80/56/40/28/21/17/14/12, measured) ---------- */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; /* the web exception to the font law: the system stack, never a webfont */
  --fs-hero: clamp(44px, 7.4vw, 96px);
  --fs-h1: clamp(36px, 5.2vw, 64px);
  --fs-h2: clamp(30px, 3.9vw, 48px);
  --fs-h3: clamp(22px, 2vw, 28px);
  --fs-lead: clamp(19px, 1.7vw, 24px);
  --fs-body: 17px;
  --fs-small: 12px;

  /* ---------- motion (the web motion law; values measured and approved 2026-09-29) ---------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);     /* entrances: cascade steps, page-in, notification */
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);  /* state changes and exits: hover, press, focus, bold, page-out */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);       /* Apple's staggered curve: scroll reveals, carousels, the calm hero */
  --dur-fast: 180ms;      /* hover, press, focus ring, underline */
  --dur-base: 320ms;      /* the bold that marks the page you are on, small toggles, the top bar's cross-fade */
  --dur-slow: 500ms;      /* labels and names that swap in a carousel */
  --dur-enter: 520ms;     /* one step of an entrance cascade */
  --dur-page-out: 240ms;  /* the page you leave fades out */
  --dur-reveal: 1s;       /* a block that fades up once as it scrolls into view */
  --dur-word: 350ms;      /* one word of a write-on paragraph */
  --stagger: 70ms;        /* between two steps of a cascade */
  --reveal-step: 120ms;   /* between two scroll reveals in the same row */
  --page-in-start: 80ms;  /* a sub-page's cascade starts as the old page is half gone */
  --glide-after: 280ms;   /* /#section from another page: land, then glide once the old page is gone */
  --rise: 12px;           /* how far an entering block travels up */
  --reveal-rise: 24px;    /* how far a scroll reveal travels up */
  --settle-scale: 0.98;   /* cards that settle from just under full size */
  --dur-hero: 700ms;      /* a calm hero element (AirwayControl: glass card and notification 700, Live Activity 900) */
  --hero-drop: 14px;      /* how far a hero card comes down from */

  /* maria-danielsen: the two authored moments of the page */
  --dur-develop: 1400ms;  /* the low-resolution portrait develops like a print: blur and light resolve */
  --develop-blur: 10px;   /* how soft the print starts */
  --word-step: 220ms;     /* Feelings, AI, Art light one after another as the thesis comes into view */
  --dur-light: 700ms;     /* one of those words going from unlit to ink */
}
@media (min-width: 734px) { :root { --gutter: 40px; } }

/* light: the same book by day, kept as tokens for data-theme="light". Measured: ink 15.23:1 on --bg and
   13.93:1 on --bg-2; soft 6.43:1 and 5.89:1; accent 6.21:1 and 5.68:1. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1ea; --bg-2: #ece7dc; --ink: #1d1b18; --soft: #5c564d; --dim: #c9c1b3;
  --accent: #a3301f; --link: #1d1b18; --line: rgba(29,27,24,.14);
  --tile: #ece7dc; --tile-2: #e3ddd0; --nav-bg: rgba(244,241,234,.84); --foot-bg: #ece7dc; --on-ink: #f4f1ea;
  --select: rgba(163,48,31,.16); --portrait-bright: 1; --develop-bright: 1.7; --grain: .05;
}

@media (prefers-reduced-motion: reduce) {
  /* opacity only, no movement, shorter; anchors jump (smooth scroll is only set under no-preference) */
  :root {
    --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 240ms; --dur-enter: 260ms; --dur-page-out: 160ms;
    --dur-reveal: 0ms; --dur-word: 0ms; --stagger: 30ms; --reveal-step: 0ms; --page-in-start: 0ms;
    --rise: 0px; --reveal-rise: 0px; --settle-scale: 1; --hero-drop: 0px; --dur-hero: 300ms;
    --dur-develop: 300ms; --develop-blur: 0px; --word-step: 0ms; --dur-light: 200ms;
  }
}
