/*
  tokens.css: shared light tokens for every piece in vanilla/
  Values read from Ruixen UI (MIT, Copyright (c) 2025 Ruixen UI) light theme and
  the numbers in ../SitePlaybook.md sections 1 and 2. Light look only (Isaac's rule).
  Load this file first, then each piece.css. Every piece reads --vu-* tokens and
  defines its own local tokens at the top of its piece.css.

  Swap a brand: change --vu-accent (and --vu-accent-ink if text sits on it) and,
  for brand-tinted greys, replace hue 240 in the zinc ladder per playbook 1.6.
*/
:root {
  /* color: one neutral ladder, one accent */
  --vu-bg: #ffffff;
  --vu-fg: #0a0a0a;
  --vu-fg-2: #404040;          /* body copy on white, 10.4:1 */
  --vu-muted-fg: #6b6b6b;      /* descriptions, labels, 5.3:1 on white (AA) */
  --vu-surface: #fafafa;       /* banners, footer band */
  --vu-muted: #f5f5f5;         /* chips, active nav pill, toggle track */
  --vu-frame: #f5f5f7;         /* hero frame, tinted panels */
  --vu-control: #f4f4f9;       /* soft buttons, action pills */
  --vu-control-hover: #ededf3;
  --vu-border: #e5e5e5;
  --vu-hairline: rgba(10, 10, 10, .06);
  --vu-ring: rgba(10, 10, 10, .10);
  --vu-grid-line: rgba(10, 10, 10, .15);
  --vu-primary: #171717;       /* tactile primary button */
  --vu-primary-hover: #2b2b2b;
  --vu-primary-fg: #fafafa;
  --vu-accent: #0e7490;        /* brand accent: active, links, "do this" (5.4:1) */
  --vu-accent-ink: #ffffff;
  --vu-accent-soft: rgba(14, 116, 144, .10);
  --vu-link: #0e7490;
  /* status = Apple system colors */
  --vu-green: #34c759; --vu-red: #ff3b30; --vu-orange: #ff9500;
  --vu-yellow: #ffcc00; --vu-blue: #007aff; --vu-violet: #af52de;
  --vu-green-ink: #15803d;     /* readable green text on white */

  /* type */
  --vu-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --vu-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --vu-h1: clamp(40px, 6.2vw, 80px);   /* 40 / 48 / 60 / 72 / 80 */
  --vu-h1-track: -0.035em;
  --vu-h2: clamp(30px, 4.2vw, 48px);   /* 30 / 36 / 48 */
  --vu-h2-track: -0.025em;
  --vu-lead: clamp(16px, 1.6vw, 18px);
  --vu-body: 16px;
  --vu-ui: 14px;
  --vu-small: 13px;
  --vu-eyebrow: 14px;

  /* space (1 unit = 4px) */
  --vu-gutter: 24px;                  /* section side padding; bars use 16px */
  --vu-section-y: clamp(64px, 8vw, 96px);
  --vu-container: 1024px;
  --vu-container-wide: 1152px;
  --vu-container-text: 672px;

  /* radii */
  --vu-r-control: 10px;
  --vu-r-input: 12px;
  --vu-r-card: 16px;
  --vu-r-big: 24px;
  --vu-r-pill: 999px;

  /* shadows: hairline + one or two soft layers, never above .18 */
  --vu-shadow-ring: 0 0 0 1px var(--vu-ring);
  --vu-shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 3px 10px rgba(0,0,0,.06);
  --vu-shadow-card-hover: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.09);
  --vu-shadow-float: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.18);
  --vu-shadow-small: 0 0 0 .5px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.06), 0 12px 24px -6px rgba(0,0,0,.10);
  --vu-shadow-btn: 0 4px 6px -1px rgba(0,0,0,.15), 0 0 0 1px #0a0a0a;
  --vu-shadow-btn-2: 0 1px 2px rgba(0,0,0,.10), 0 0 0 1px rgba(10,10,10,.10);

  /* motion curves (playbook 2.1) */
  --vu-expo: cubic-bezier(.16, 1, .3, 1);
  --vu-soft: cubic-bezier(.22, 1, .36, 1);
  --vu-ios: cubic-bezier(.32, .72, 0, 1);
  --vu-pop: cubic-bezier(.34, 1.56, .64, 1);
  --vu-pop-soft: cubic-bezier(.34, 1.3, .64, 1);
  --vu-inout: cubic-bezier(.65, 0, .35, 1);

  /* layering + bottom dock (phone bar, scroll pill and toasts share it) */
  --vu-z-nav: 50;
  --vu-z-dock: 60;
  --vu-z-toast: 70;
  --vu-dock-offset: 24px;       /* raised by 12-phone-cta-bar when it is on the page */
  --vu-tap: 44px;               /* minimum tap target */
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--vu-bg);
  color: var(--vu-fg);
  font: 400 var(--vu-body)/1.55 var(--vu-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
::selection { background: var(--vu-accent-soft); color: var(--vu-accent); }
:focus-visible { outline: 2px solid var(--vu-accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.vu-container { width: 100%; max-width: var(--vu-container); margin-inline: auto; padding-inline: var(--vu-gutter); }
.vu-section { padding-block: var(--vu-section-y); }
.vu-eyebrow { margin: 0 0 12px; font-size: var(--vu-eyebrow); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--vu-muted-fg); }
.vu-h2 { margin: 0; font-size: var(--vu-h2); line-height: 1.1; font-weight: 600; letter-spacing: var(--vu-h2-track); }
.vu-lead { margin: 16px 0 0; font-size: var(--vu-lead); line-height: 1.5; color: var(--vu-muted-fg); text-wrap: balance; }
.vu-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vu-num { font-variant-numeric: tabular-nums; }

/* buttons (Ruixen tactile primary + ring secondary, sized for thumbs) */
.vu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--vu-tap); padding: 0 18px; border: 0; border-radius: var(--vu-r-control);
  font: 500 15px/1 var(--vu-font); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .2s ease, transform .2s var(--vu-soft);
}
.vu-btn:active { transform: translateY(1px); }
.vu-btn--primary { background: var(--vu-primary); color: var(--vu-primary-fg); box-shadow: var(--vu-shadow-btn); }
.vu-btn--primary:hover { background: var(--vu-primary-hover); }
.vu-btn--secondary { background: #fff; color: var(--vu-fg); box-shadow: var(--vu-shadow-btn-2); }
.vu-btn--secondary:hover { background: var(--vu-surface); }
.vu-btn--accent { background: var(--vu-accent); color: var(--vu-accent-ink); box-shadow: 0 4px 6px -1px rgba(0,0,0,.12), 0 0 0 1px color-mix(in oklab, black 12%, var(--vu-accent)); }
.vu-btn--pill { border-radius: var(--vu-r-pill); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
