/* ==========================================================================
   OS Runs on Tacos — token contract
   --------------------------------------------------------------------------
   Every colour, font and atmosphere value the site uses comes from here.
   A theme file (themes/*.css) only re-declares the RAW tokens in the first
   block. Everything else is derived, so layout and widget CSS never change
   when the theme rotates.

   Colour channels are space-separated RGB triples so they can carry alpha:
     rgb(var(--c-signal))        -> solid
     rgb(var(--c-signal) / .2)   -> 20% alpha
   ========================================================================== */

:root {
  /* ---- RAW TOKENS (themes override these) ------------------------------ */
  --c-bg:        5 8 12;        /* page base */
  --c-bg-2:      7 16 23;       /* page top */
  --c-surface:   12 20 28;      /* panel top */
  --c-surface-2: 7 13 18;       /* panel bottom */
  --c-ink:       239 247 251;   /* text + hairlines */
  --c-shade:     0 0 0;         /* shadows */
  --c-signal:    155 255 112;   /* primary accent  (legacy "lime") */
  --c-flow:      72 215 255;    /* secondary accent (legacy "cyan") */
  --c-heat:      255 211 106;   /* tertiary accent  (legacy "amber") */
  --c-spark:     255 108 168;   /* quaternary       (legacy "pink") */
  --c-aux:       196 181 253;   /* fifth series     (legacy violet) */
  --c-alert:     255 75 75;     /* Z5 / negative    (legacy red) */
  --c-on-accent: 18 13 0;       /* text sitting on a solid accent */

  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --display-weight: 900;
  --display-style: normal;
  --display-tracking: -0.02em;
  --display-case: none;
  --display-leading: .92;

  /* atmosphere layers (see magazine.css .atmo) */
  --sky: linear-gradient(180deg, rgb(var(--c-bg-2)) 0%, rgb(var(--c-bg)) 60%);
  --glow: radial-gradient(60% 40% at 50% 100%, rgb(var(--c-heat) / .18), transparent 70%);
  --fog-opacity: .0;
  --grain-opacity: .06;
  --grid-opacity: .0;
  --video-filter: saturate(1) brightness(.75);
  --video-opacity: .9;
  --cover-scrim: linear-gradient(180deg, rgb(var(--c-bg) / .1) 0%, rgb(var(--c-bg) / .35) 45%, rgb(var(--c-bg)) 100%);

  --radius-sm: .375rem; --radius-md: .75rem; --radius-lg: 1rem;
  --radius-xl: 1.35rem; --radius-full: 9999px;
  --panel-blur: 18px;

  /* ---- DERIVED (do not override in themes) ----------------------------- */
  --text:       rgb(var(--c-ink));
  --text-muted: rgb(var(--c-ink) / .72);
  --text-faint: rgb(var(--c-ink) / .54);
  --border:     rgb(var(--c-ink) / .12);
  --divider:    rgb(var(--c-ink) / .08);
  --lime:   rgb(var(--c-signal));   /* legacy aliases used inline by the   */
  --cyan:   rgb(var(--c-flow));     /* original markup and engine scripts  */
  --amber:  rgb(var(--c-heat));
  --pink:   rgb(var(--c-spark));
  --violet: rgb(var(--c-aux));
  --red:    rgb(var(--c-alert));
  --shadow-md: 0 10px 30px rgb(var(--c-shade) / .22);

  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* fixed chrome sizes: identical in every theme so navigation never moves */
  --masthead-h: 52px;
  --tabbar-h: 64px;
}
