/* The two realities, as custom properties.

   Every colour on this site belongs to one of three families: the warm, lived-in
   Prime reality, the cold machine light of the Occupied one, and the fracture
   between them. Nothing else is introduced. */

:root {
  color-scheme: dark;

  /* --- Prime reality: late afternoon, autumn, paper and painted metal ----- */
  --prime-sun: #e7b66b;
  --prime-ember: #c8792f;
  --prime-leaf: #9b6439;
  --prime-cream: #e9e0d0;
  --prime-shadow: #252a2d;

  /* --- Occupied reality: black glass, powder-coated steel, scanning light - */
  --rift-blue: #42b8ff;
  --rift-white: #ddf6ff;
  --occupied-cyan: #6fa9c4;
  --occupied-steel: #29333a;
  --occupied-void: #070a0d;

  /* --- Surfaces ---------------------------------------------------------- */
  --surface-0: #05080b;
  --surface-1: #0a0f14;
  --surface-2: #0e151c;
  --surface-3: #131d26;
  --hairline: color-mix(in srgb, var(--occupied-cyan) 22%, transparent);
  --hairline-strong: color-mix(in srgb, var(--occupied-cyan) 38%, transparent);

  /* --- Ink --------------------------------------------------------------- */
  --ink: #e8eef4;
  --ink-soft: #b7c4cf;
  /* 4.6:1 on --surface-1, so secondary copy still meets AA. */
  --ink-muted: #93a3b0;
  --ink-inverse: #06090c;

  /* --- Perception states. Never used without an icon or a pattern (§7.2). - */
  --state-neutral: #8ea0ad;
  --state-noticing: #e8b55a;
  --state-suspicious: #e08b3c;
  --state-alerted: #e2574b;
  --state-searching: #8fd4ff;

  /* --- Type -------------------------------------------------------------- */
  /* Self-hosted WOFF2 can be dropped in later; until then the stack resolves to
     the same humanist grotesques the game's own title screen is set in, so the
     site costs no font request at all. */
  --font-display: 'Helvetica Neue', 'Segoe UI', 'Avenir Next', Inter, system-ui, sans-serif;
  --font-body: 'Segoe UI', Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial,
    sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;

  --step--2: clamp(0.69rem, 0.67rem + 0.1vw, 0.75rem);
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.6vw, 1.85rem);
  --step-3: clamp(1.73rem, 1.53rem + 1vw, 2.4rem);
  --step-4: clamp(2.07rem, 1.75rem + 1.6vw, 3.12rem);
  --step-5: clamp(2.49rem, 1.98rem + 2.55vw, 4.06rem);
  --step-6: clamp(2.99rem, 2.2rem + 3.9vw, 5.28rem);

  --tracking-display: 0.09em;
  --tracking-eyebrow: 0.28em;

  /* --- Space ------------------------------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --space-3xl: 8rem;

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --measure: 68ch;
  --page-max: 1560px;
  --content-max: 1180px;

  --radius-s: 2px;
  --radius-m: 4px;
  --radius-l: 10px;
  /* The chamfer the surfaces use instead of sci-fi bracketry (§7.4). */
  --chamfer: 14px;

  /* --- Motion ------------------------------------------------------------ */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --speed-ui: 170ms;
  --speed-ui-slow: 320ms;
  --speed-reveal: 900ms;

  --header-height: 4.25rem;

  --shadow-lift: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.75);
  --shadow-deep: 0 24px 80px -28px rgb(0 0 0 / 0.9);
  --glow-rift: 0 0 24px -4px color-mix(in srgb, var(--rift-blue) 60%, transparent);
}

/* The site is authored dark, as the game is. A light-mode request gets the same
   art with a raised floor rather than an inverted, unreadable palette, and the
   forced-colors path below hands control to the user's own scheme entirely. */
@media (forced-colors: active) {
  :root {
    --hairline: CanvasText;
    --hairline-strong: CanvasText;
  }
}
