/**
 * Design tokens · v2 "Engineering Ledger"
 * Spec: docs/redesign/08-design-system-v2.md
 */

:root {
  /* Brand accent (locked) */
  --color-accent: #1d55a5;
  --color-accent-hover: #174a90;
  --color-accent-soft: #eaf1fb;
  --color-accent-line: rgba(29, 85, 165, 0.22);

  /* Navy surfaces: brand-derived dark, not neutral black */
  --color-navy-950: #061128;
  --color-navy-900: #0a1a33;
  --color-navy-800: #11284c;
  --color-sky: #8db8ff;
  --color-on-dark: #f2f5fa;
  --color-on-dark-muted: rgba(226, 234, 246, 0.7);
  --color-line-dark: rgba(170, 196, 235, 0.16);

  /* Neutrals */
  --color-ink: #0f1626;
  --color-ink-2: #2b3547;
  --color-muted: #5a6578;
  --color-faint: #8993a5;
  --color-line: rgba(15, 22, 38, 0.1);
  --color-line-strong: rgba(15, 22, 38, 0.18);
  --color-surface: #f3f6f9;
  --color-bg: #fbfcfd;
  --color-elevated: #ffffff;

  /* Type */
  --font-sans: "PingFang SC", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    monospace;

  --text-display: clamp(2.5rem, 1.55rem + 3.6vw, 4.25rem);
  --text-h1: clamp(2.125rem, 1.6rem + 2vw, 3.25rem);
  --text-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --text-h3: 1.25rem;
  --text-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-caption: 0.8125rem;
  --text-label: 0.75rem;

  --leading-display: 1.08;
  --leading-heading: 1.2;
  --leading-body: 1.75;
  --leading-small: 1.6;
  /* CJK: negative tracking only at display sizes (YaHei crowds below that) */
  --tracking-display: -0.015em;
  --tracking-label: 0.08em;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4.5rem;
  --space-12: 6rem;
  --wrap: min(100% - 2.5rem, 1200px);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --page-section-y: clamp(3rem, 6vw, 5rem);
  --nav-h: 68px;
  --hub-jump-h: 3rem;

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --duration-press: 120ms;
  --duration-ui: 200ms;
  --duration-reveal: 560ms;

  --shadow-soft: 0 1px 2px rgba(10, 26, 51, 0.04),
    0 12px 32px rgba(10, 26, 51, 0.06);
  --shadow-lift: 0 2px 4px rgba(10, 26, 51, 0.04),
    0 20px 48px rgba(10, 26, 51, 0.1);

  /* Blueprint grid motif */
  --grid-line: rgba(29, 85, 165, 0.07);
  --grid-line-dark: rgba(141, 184, 255, 0.07);
  --grid-size: 48px;
}

@media (max-width: 479px) {
  :root {
    --wrap: min(100% - 2.5rem, 1200px);
    --nav-h: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-press: 1ms;
    --duration-ui: 1ms;
    --duration-reveal: 1ms;
  }
}
