/* Portfolio design tokens
   Source of truth: Figma library "Portfolio Design System" (Fc2W4AI2RqF8boFIx17oQm).
   Naming: Figma variable color/bg/page = CSS --color-bg-page.
   Values come from the Phase 2 audit (2026-10-28). Reference: design-system/tokens.md
   Change Figma first, refresh test/figma-variables.json, then change the value here.
   test/figma-tokens-check.js (run by the commit hook and ship.sh) fails when the two disagree. */

:root {
  /* Color · surfaces */
  --color-bg-page: #0a0a12;
  --color-bg-frame: #0e0e1a;
  --color-bg-stage: #11111f;
  --color-bg-overlay: #060709;
  --color-bg-backdrop: rgba(6, 7, 9, 0.94);

  /* Color · text */
  --color-text-ink: #c9ccd6;
  --color-text-body: #aaaabb;
  --color-text-accent: #929aa3;
  --color-text-caption: #6b7a8a;
  --color-text-muted: #666677;
  --color-text-on-media: #e4e6ec;

  /* Color · lines and indicators */
  --color-line-default: #1b2838;
  --color-line-hover: #2a3d50;
  --color-indicator-on: var(--color-text-accent);
  --color-indicator-off: #2a3040;
  --color-status-danger: #e94560;

  /* Color · media mats (NEW 2026-10-29): colors of the work shown, behind screenshots and prototypes */
  --color-media-mat-white: #ffffff;
  --color-media-mat-app: #f5f7fa;

  /* Color · controls on dark dialogs */
  --color-control-rest: rgba(255, 255, 255, 0.08);
  --color-control-hover: rgba(255, 255, 255, 0.16);
  --color-control-text-secondary: rgba(255, 255, 255, 0.5);
  --color-control-icon: rgba(255, 255, 255, 0.8);

  /* Color · accent tints (Inline CTA, focus) */
  --color-accent-tint-rest: rgba(146, 154, 163, 0.08);
  --color-accent-tint-hover: rgba(146, 154, 163, 0.14);
  --color-accent-tint-border: rgba(146, 154, 163, 0.15);
  --color-accent-tint-border-strong: rgba(146, 154, 163, 0.3);

  /* Color · scrims over media */
  --color-scrim-chip: rgba(10, 10, 18, 0.75);
  --color-scrim-pill: rgba(10, 10, 18, 0.82);
  --color-scrim-hover: rgba(10, 10, 18, 0.9);

  /* Space (4px scale; 2 and 6 for icon gaps) */
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* Size */
  --cta-w: calc(24ch + 46px);
  --cta-h: 36px;
  --size-pill-h: 28px;
  --size-chip: 26px;
  --size-close: 36px;
  --size-nav: 48px;
  --size-dot: 8px;
  --size-tap: 44px;
  --size-icon-sm: 12px;   /* NEW 2026-10-29: chevron, expand, close, exit X */
  --size-icon-md: 16px;   /* NEW 2026-10-29: smart-card and lightbox arrows */
  --size-icon-lg: 24px;   /* NEW 2026-10-29: step-carousel Next arrow */

  /* Stroke (icons) */
  --stroke-icon-sm: 1.75px; /* NEW 2026-10-29: 12px icons */
  --stroke-icon-md: 2px;    /* NEW 2026-10-29: 16px and 24px icons */

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  --font-size-caption: 10px;
  --font-size-label: 11px;
  --font-size-small: 13px;
  --font-size-body: 14px;
  --font-size-lead: 15px;
  --font-size-input: 16px;
  --font-size-name: 22px;
  --font-size-title: clamp(20px, 2.2vw, 26px);
  --font-size-display: clamp(26px, 3.3vw, 38px);
  --tracking-label: 1px;
  /* Line heights mirror the Figma text styles */
  --line-height-body: 1.6;
  --line-height-heading: 1.15;
  --line-height-control: 1;

  /* Effects mirror the Figma effect styles */
  --shadow-pill: 0 2px 8px rgba(0, 0, 0, 0.35);

  /* Motion */
  --duration-fast: 0.16s;
  --duration-base: 0.28s;
  --duration-slow: 420ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── BREAKPOINTS (A12, 2026-10-29) ──
   CSS variables can't be read inside @media, so these are named here and used as literals.
   breakpoint/compact  760px  @media (max-width: 760px)  phones; the takeover adds (hover: none) and (pointer: coarse)
   breakpoint/wide     960px  @media (max-width: 960px)  narrow desktop and tablet
   (min-width: 761px) and (min-width: 961px) are their complements. layout-tests.js fails on any other width. */
