/* ==========================================================================
   RPLAY.LT — DESIGN TOKENS
   Single source of truth for colour, type, space, radius, depth and motion.
   Nothing in the rest of the stylesheet may hardcode these values.
   ========================================================================== */

:root {
  /* ---------- Base surfaces -------------------------------------------- */
  --bg:               #070a12;   /* page ground — deep navy-black, never pure #000 */
  --bg-elev-1:        #0b1020;   /* raised panels */
  --bg-elev-2:        #101731;   /* highest panels, popovers */
  --bg-sunken:        #05070d;   /* wells, code, inset areas */

  /* Translucent layers. Kept subtle on purpose: glass is an accent, not a theme. */
  --surface:          rgba(255, 255, 255, 0.028);
  --surface-hover:    rgba(255, 255, 255, 0.052);
  --surface-active:   rgba(255, 255, 255, 0.072);
  --glass:            rgba(9, 13, 26, 0.72);
  --glass-strong:     rgba(9, 13, 26, 0.88);
  --glass-blur:       14px;

  /* ---------- Borders --------------------------------------------------- */
  --stroke:           rgba(255, 255, 255, 0.075);
  --stroke-strong:    rgba(255, 255, 255, 0.14);
  --stroke-accent:    rgba(51, 162, 255, 0.34);

  /* ---------- Text ------------------------------------------------------ */
  --text:             #eaf0ff;   /* 17:1 on --bg */
  --text-2:           #b8c5e0;   /* 11:1 */
  --text-muted:       #93a2c0;   /* 7.7:1 — still passes AAA body text */
  --text-faint:       #6d7c9a;   /* 4.6:1 — decorative / large only */
  --text-on-accent:   #04121f;

  /* ---------- Brand accents --------------------------------------------- */
  --accent:           #33a2ff;   /* RPLAY blue — 7.3:1 on --bg */
  --accent-hi:        #6dbcff;
  --accent-lo:        #1f7fe0;
  --accent-wash:      rgba(51, 162, 255, 0.12);
  --accent-wash-hi:   rgba(51, 162, 255, 0.2);

  /* RPLAY iOS palette — controls use these as translucent/milky accents. */
  --ios-blue:         #33a2ff;
  --ios-green:        #34c759;
  --ios-orange:       #ff9500;
  --ios-red:          #ff453a;
  --ios-blue-soft:    rgba(51, 162, 255, 0.12);
  --ios-blue-hover:   rgba(51, 162, 255, 0.18);
  --ios-blue-border:  rgba(51, 162, 255, 0.24);
  --ios-neutral-soft: rgba(255, 255, 255, 0.03);
  --ios-neutral-hover:rgba(255, 255, 255, 0.055);
  --ios-red-soft:     rgba(255, 69, 58, 0.12);
  --ios-red-hover:    rgba(255, 69, 58, 0.18);

  --gold:             #ffa640;   /* sunset amber pulled from the RPLAY emblem */
  --gold-wash:        rgba(255, 166, 64, 0.12);

  /* ---------- Semantic state -------------------------------------------- */
  --success:          #35d6a0;
  --success-wash:     rgba(53, 214, 160, 0.12);
  --warning:          #ffc24b;
  --warning-wash:     rgba(255, 194, 75, 0.12);
  --danger:           #ff5d6b;
  --danger-wash:      rgba(255, 93, 107, 0.12);
  --neutral-wash:     rgba(147, 162, 192, 0.12);

  /* ---------- Typography ------------------------------------------------ */
  /* Three roles, self-hosted (see assets/fonts/README.md).
     Display is condensed on purpose: Lithuanian headline words are long. */
  --font-display: "Big Shoulders", "Haettenschweiler", "Arial Narrow", system-ui, sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Display sizes run large because Big Shoulders is condensed -
     it reads about a quarter narrower than a normal-width grotesque. */
  --fs-display: clamp(3.25rem, 1.8rem + 6.4vw, 6.5rem);
  --fs-h1:      clamp(2.5rem,  1.8rem + 3.1vw, 4rem);
  --fs-h2:      clamp(2rem,    1.6rem + 1.9vw, 3rem);
  --fs-h3:      clamp(1.125rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-lead:    clamp(1.0rem, 0.96rem + 0.3vw, 1.175rem);
  --fs-body:    clamp(0.95rem, 0.93rem + 0.14vw, 1.0rem);
  --fs-sm:      0.875rem;
  --fs-xs:      0.78rem;

  --lh-tight:   1.08;
  --lh-snug:    1.28;
  --lh-normal:  1.6;
  --lh-loose:   1.72;

  --tracking-tight:  -0.022em;
  --tracking-caps:   0.12em;

  /* ---------- Spacing (4px base) ---------------------------------------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;

  /* Height the sticky header occupies in flow: its top margin plus its bar.
     Ambient layers use it to reach up behind the header instead of stopping
     underneath it and leaving a band. */
  --header-space: 80px;

  /* Section rhythm scales down on small screens without extra media queries. */
  --section-y: clamp(56px, 3rem + 5vw, 128px);
  --gutter:    clamp(16px, 1rem + 1.6vw, 32px);
  --container: 1200px;

  /* ---------- Radius ---------------------------------------------------- */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 999px;

  /* ---------- Depth ----------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -10px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 32px 80px -28px rgba(0, 0, 0, 0.9);

  /* ---------- Motion ---------------------------------------------------- */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --dur-4: 560ms;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* ---------- Layering -------------------------------------------------- */
  --z-raised:   10;
  --z-sticky:   100;
  --z-header:   200;
  --z-backdrop: 300;
  --z-drawer:   400;
  --z-toast:    600;

  color-scheme: dark;
}

/* The site is dark by design. Honour a forced-light preference only by
   raising contrast slightly — we do not ship a second theme. */
@media (prefers-contrast: more) {
  :root {
    --text-muted:    #b3c0da;
    --text-faint:    #93a2c0;
    --stroke:        rgba(255, 255, 255, 0.16);
    --stroke-strong: rgba(255, 255, 255, 0.28);
  }
}
