/* ============================================================================
   PREVIOUSLY — DESIGN TOKENS · v1.0 — APPROVED, THE LAW (James, 2026-09-28)
   The law every rebuilt page follows. Derived from the approved song-page
   template ("that's the standard to our pages" — James, 2026-09-28) and his
   standing rules in ~/AGENTS.md.
   One source of truth: pages consume these variables, never hardcode values.
   Platform-agnostic: hex colors, 4pt spacing, dp-convertible radii.
   Web-only notes marked [WEB]. Android maps: px->dp 1:1 at mdpi, blur->elevation.
   ============================================================================ */

:root {
  color-scheme: dark; /* native form controls, scrollbars, and UA chrome render dark to match the design */
  /* ---- Color · surfaces (noir cinematic base, dark-first) ---- */
  --pv-noir:        #0a0a0b;  /* page background */
  --pv-noir-2:      #111113;  /* elevated surface: cards, sheets, modals */
  --pv-noir-3:      #17171a;  /* pressed / deepest inset [MY CALL: extrapolated] */
  --pv-glass:       rgba(16,17,20,.82); /* sticky bars over content [WEB: backdrop-blur] */

  /* ---- Color · ink ---- */
  --pv-ivory:       #f4efe6;  /* primary text — "Bone" (17.3:1 on noir ✓) */
  --pv-ivory-dim:   rgba(244,239,230,.62); /* secondary text (6.9:1 on noir ✓) */
  --pv-ivory-faint: rgba(244,239,230,.38); /* 3.2:1 on noir — LARGE/DECORATIVE ONLY.
     Never body copy, never placeholders, never essential UI text. */
  --pv-rule:        rgba(244,239,230,.14); /* hairline dividers + idle borders (decorative, exempt) */

  /* ---- Color · on-accent text ---- */
  --pv-on-red:      #0a0a0b;  /* text/icons ON Signal Red fills. 5.18:1 ✓.
     White or ivory text on #ec4634 is 3.3–3.8:1 — BANNED (WCAG 1.4.3).
     Red primary buttons use THIS, not white. */

  /* ---- Color · brand accent: RED. No gold anywhere. Ever. ---- */
  --pv-red:         #ec4634;  /* "Signal Red" — THE accent. Buttons, focus, live dots */
  --pv-red-deep:    #b32b1d;  /* gradients within red family only, hover depth */
  --pv-red-ember:   #ff6a52;  /* highlights, glow edges */
  --pv-red-wine:    #8f1d10;  /* deepest red, scrims */
  --pv-red-glow:    rgba(236,70,52,.35);  /* focus rings, button shadows */
  --pv-red-glow-lg:rgba(236,70,52,.55);

  /* ---- Color · status (never neon) ---- */
  --pv-live:        #ec4634;  /* live = brand red, not green (5.18:1 on noir ✓) */
  --pv-warn:        #d8a03c;  /* muted amber, warnings only — DARK SURFACES ONLY.
     8.5:1 on noir ✓ / 2.0:1 on ivory ✗. Never on light backgrounds. [MY CALL] */
  --pv-muted-ok:    #7ba889;  /* desaturated sage for "available" — DARK SURFACES ONLY.
     7.4:1 on noir ✓ / 2.4:1 on ivory ✗. Never on light backgrounds.
     [MY CALL: never neon green] */

  /* ---- Type ---- */
  --pv-serif: 'Playfair Display', Georgia, 'Times New Roman', serif; /* display */
  --pv-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; /* body/UI */

  /* Type scale — display sizes use fluid clamp(); body fixed for rhythm */
  --pv-display-xl: clamp(120px, 22vw, 320px); /* ghost outline titles [WEB] */
  --pv-display:    clamp(52px, 9.5vw, 148px); /* page hero titles */
  --pv-title:      clamp(28px, 3.4vw, 44px);  /* section titles */
  --pv-h3:         clamp(20px, 2.4vw, 26px);
  --pv-lede:       clamp(18px, 2vw, 22px);
  --pv-body:       17px;
  --pv-body-sm:    14px;
  --pv-caption:    13px;
  --pv-label:      11px;  /* micro labels: ALWAYS uppercase + tracked */
  --pv-label-xs:   10px;

  --pv-track-xl: .34em;  /* kickers */
  --pv-track-lg: .24em;  /* buttons */
  --pv-track-md: .18em;  /* chips */
  --pv-track-tight: -.02em; /* display serif */

  --pv-leading-display: .94;
  --pv-leading-title: 1.08;
  --pv-leading-body: 1.6;
  --pv-leading-ui: 1.4;

  /* ---- Spacing · 4pt base ---- */
  --pv-s1: 4px;  --pv-s2: 8px;  --pv-s3: 12px; --pv-s4: 16px;
  --pv-s6: 24px; --pv-s8: 32px; --pv-s12: 48px; --pv-s16: 64px;
  --pv-s24: 96px; --pv-s32: 128px;

  /* ---- Radii ---- */
  --pv-r-pill: 999px;  /* buttons, chips, search, toggles */
  --pv-r-card: 16px;   /* cards, sheets */
  --pv-r-card-sm: 14px;
  --pv-r-sm: 8px;      /* inputs-inline, tags */
  --pv-r-round: 50%;

  /* ---- Shadows · red glow for brand moments, black for depth ---- */
  --pv-shadow-btn:    0 10px 34px var(--pv-red-glow);
  --pv-shadow-btn-lg: 0 16px 44px var(--pv-red-glow-lg);
  --pv-shadow-card:   0 18px 44px rgba(0,0,0,.5);
  --pv-shadow-pop:    0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(236,70,52,.28);
  --pv-shadow-bar:    0 8px 28px rgba(0,0,0,.45);

  /* ---- Layout ---- */
  --pv-content-max: 1280px;   /* inner content measure. The outer shell caps at
     1440px (full-bleed heroes exempt — they run edge to edge). */
  --pv-shell-max: 1440px;     /* outer shell cap for ultrawide monitors */
  --pv-gutter: 32px;       /* desktop page padding */
  --pv-gutter-sm: 20px;    /* phone page padding */
  --pv-nav-h: 64px;        /* desktop nav height; 56px below 1024px (see below) */

  /* ---- Breakpoints (for documentation; use in media queries) ---- */
  --pv-bp-phone: 390px;
  --pv-bp-tablet: 768px;
  --pv-bp-laptop: 1024px;
  --pv-bp-wide: 1440px;

  /* ---- Z-index scale (one scale, whole site — no page invents its own) ---- */
  --pv-z-content: 1;
  --pv-z-sticky: 10;       /* sticky section headers, table heads */
  --pv-z-search: 40;       /* uniform search bar (sticky) */
  --pv-z-nav: 50;          /* sticky nav — above search, below overlays */
  --pv-z-consent: 90;      /* cookie banner + preferences modal */
  --pv-z-modal: 100;       /* dialogs, sheets, lightboxes */
  --pv-z-toast: 110;       /* transient notifications, topmost */

  /* ---- Touch targets ---- */
  --pv-target-min: 44px;   /* WCAG 2.2 AA target size. Every tappable control is
     at least 44×44 CSS px. No exceptions — phone and desktop. */

  /* ---- Motion ---- */
  --pv-ease: cubic-bezier(.22,.8,.28,1);
  --pv-t-fast: .18s;
  --pv-t-med: .25s;
  --pv-hero-rotate: 30s;   /* hero auto-advance cadence — never faster */
  /* ---- Focus ---- */
  --pv-focus-outline: 2px solid var(--pv-red); /* THE focus indicator: 5.18:1 on
     noir, clears WCAG 2.4.13 (≥2px, 3:1). Always paired with 2px offset.
     On red fills use 2px solid var(--pv-ivory) instead (3.34:1 — clears the
     3:1 UI-component bar). The glow below is decoration, never the indicator. */
  --pv-focus-ring: 0 0 0 3px var(--pv-red-glow);
}

/* Nav height follows the nav spec: 64px desktop, 56px below 1024px.
   One variable name — components (search sticky offset, etc.) just use it. */
@media (max-width: 1023px) {
  :root { --pv-nav-h: 56px; }
}

/* Reduced motion: the law, everywhere */
@media (prefers-reduced-motion: reduce) {
  :root { --pv-hero-rotate: 0s; }
}

/* Forced colors (Windows High Contrast) — the design degrades honestly:
   focus stays visible, text stays readable, decoration steps aside. */
@media (forced-colors: active) {
  :root {
    --pv-focus-outline: 2px solid ButtonText;
  }
  a, button { forced-color-adjust: auto; }
  .pv-search__bar, .pv-search__clear, .pv-search__retry {
    border: 1px solid ButtonText;
  }
}

/* Print — dark-first on screen, ink-honest on paper: light, minimal, no chrome. */
@media print {
  :root {
    color-scheme: light;
    --pv-noir: #ffffff;
    --pv-ivory: #000000;
    --pv-ivory-dim: #333333;
  }
  nav[aria-label="Primary"], .pv-search, footer .pv-footer__sections {
    display: none;
  }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; }
}
