/* ==========================================================================
   DD station — design tokens · "Night Glass"
   Dark rain-glass scene (reference) × cobalt / ice / paper identity
   ========================================================================== */

:root {
  /* ---- Core palette ---- */
  --cobalt: #1646d8;
  --cobalt-deep: #0e2e9e;
  --blue: #438de5;
  --ice: #a7d9eb;
  --paper: #f3f1eb;
  --ink: #191a1d;
  --night: #05070b;          /* page background, behind the video */
  --night-2: #0b0f17;        /* raised surfaces on dark */

  /* ---- Roles on dark ---- */
  --bg: var(--night);
  --text: var(--paper);                    /* 18:1 on night */
  --text-muted: #b4b2ad;                   /* 9:1 on night, 5:1 under the brightest light */
  --line: rgba(243, 241, 235, 0.16);
  --line-strong: rgba(243, 241, 235, 0.42);
  --focus: var(--ice);
  --accent: var(--ice);                    /* highlight colour: each project overrides it below */
  --glow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);

  /* ---- Backdrop ---- */
  --scrim-base: 0.35;                      /* how much the video is darkened at the top of the page */
  --scrim-scroll: 0.55;                    /* extra darkening while reading the sections below */
  --light-size: 72vmax;

  /* ---- Typography ---- */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-hi: clamp(2.5rem, 1rem + 6vw, 7.5rem);      /* the big line: the name */
  --fs-name: clamp(1rem, 0.75rem + 1.2vw, 1.9rem); /* the small line: the greeting */
  --fs-h2: clamp(1.6rem, 1rem + 2.6vw, 3.6rem);
  --fs-index: clamp(2rem, 0.8rem + 5vw, 6.5rem);
  --fs-lead: clamp(1.375rem, 1rem + 1.5vw, 2.5rem);
  --fs-body-l: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-mono: 0.78125rem;                   /* 12.5px */

  --track-wide: 0.45em;
  --track-name: 0.42em;
  --track-mono: 0.08em;
  --lh-body: 1.6;

  /* ---- Space & layout ---- */
  --side-w: clamp(180px, 15vw, 240px);     /* left navigation column */
  --gutter: clamp(16px, 4vw, 64px);
  --section-y: clamp(6rem, 4rem + 8vw, 12rem);
  --target: 44px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-button: 180ms;
  --dur-card: 320ms;
  --dur-reveal: 600ms;

  /* ---- Texture ---- */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 859px) {
  :root { --side-w: 0px; }
}

/* ---- One colour per project: highlighted text, chapter numbers, lines and the hover glow on the home list ---- */
[data-project="solis"] {                   /* the sun: apricot */
  --accent: #f4c08a;
  --glow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
[data-project="design-for-safety"] {       /* Delft blue under street lights */
  --accent: #8fb2ff;
  --glow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
[data-project="chip"] {                    /* Chip the Sheep: the yellow barn */
  --accent: #f6cf5a;
  --glow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
