/* ═══════════════════════════════════════════════════════════════════════
   LARS / CREATE — design tokens
   Single source of truth for colour, type, space, motion and layout.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Colour ─────────────────────────────────────────────────────────── */
  --c-violet:        #1A0F2B;   /* deep violet black — primary ground     */
  --c-violet-deep:   #120A1E;   /* one step darker, for depth             */
  --c-yellow:        #FFFF00;   /* primary accent — dark grounds only     */
  --c-magenta:       #FF007F;   /* chromatic shadow / accent on light     */
  --c-cyan:          #00E5FF;   /* chromatic shadow / detail              */
  --c-white:         #FFFFFF;
  --c-light:         #F5F5F5;
  --c-ink:           #111111;

  /* Semantic roles — components reference these, never raw hues.         */
  --bg:              var(--c-violet);
  --fg:              var(--c-white);
  --fg-muted:        rgb(255 255 255 / 0.7);
  --fg-faint:        rgb(255 255 255 / 0.6);
  --rule:            rgb(255 255 255 / 0.16);
  --accent:          var(--c-yellow);

  /* ── Type ───────────────────────────────────────────────────────────── */
  --font-sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --wdth-wide:   118;   /* display: wide geometric editorial presence */
  --wdth-normal: 100;

  /* Fluid scale. Every step is clamp()ed — no per-breakpoint overrides.   */
  --fs-micro:  clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --fs-small:  clamp(0.875rem, 0.84rem + 0.16vw, 1rem);
  --fs-body:   clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --fs-lead:   clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --fs-h4:     clamp(1.125rem, 1rem + 0.7vw, 1.625rem);
  --fs-h3:     clamp(1.75rem, 1.3rem + 2.1vw, 3.25rem);
  --fs-h2:     clamp(1.75rem, 7.6vw, 5.5rem);
  --fs-h1:     clamp(3rem, 0.4rem + 11.4vw, 13rem);
  --fs-mega:   clamp(5rem, 22vw, 19rem);

  --lh-tight:  0.88;
  --lh-body:   1.55;

  --ls-display: -0.03em;
  --ls-label:    0.16em;

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

  --gutter:  clamp(1.25rem, 4vw, 4.5rem);
  --section: clamp(5rem, 11vh + 3rem, 11rem);   /* vertical section rhythm */

  --maxw:       104rem;

  /* ── Form ───────────────────────────────────────────────────────────────
     Editorial, so square by default. The pill is reserved for buttons.    */
  --radius-pill: 100px;
  --hair:        1px;

  /* ── Motion ─────────────────────────────────────────────────────────── */
  --e-out:   cubic-bezier(0.16, 1, 0.3, 1);      /* decisive settle        */
  --e-inout: cubic-bezier(0.76, 0, 0.24, 1);     /* cinematic sweep        */
  --e-snap:  cubic-bezier(0.2, 0.9, 0.25, 1);    /* fast physical snap     */

  --t-micro:  0.18s;
  --t-quick:  0.32s;
  --t-mid:    0.6s;
  --t-slow:   0.9s;

  --header-h:     clamp(3.75rem, 5vw, 5.5rem);
  --header-h-min: clamp(3.25rem, 3.6vw, 4.25rem);  /* condensed state */
  --z-cursor: 100;
  --z-header:  80;   /* above the menu: the close control must stay reachable */
  --z-menu:    70;
}

/* Light sections invert the semantic roles — components stay unchanged.   */
[data-theme='light'] {
  --bg:        var(--c-white);
  --fg:        var(--c-ink);
  --fg-muted:  rgb(17 17 17 / 0.74);
  --fg-faint:  rgb(17 17 17 / 0.6);
  --rule:      rgb(17 17 17 / 0.14);
  --accent:    var(--c-magenta);   /* yellow is unreadable on white        */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-micro: 0.01ms;
    --t-quick: 0.01ms;
    --t-mid:   0.01ms;
    --t-slow:  0.01ms;
  }
}
