/* ==========================================================================
   Base — reset, typography, utilities, focus, reduced motion
   ========================================================================== */
/* Lining figures everywhere: Cormorant defaults to old-style ("Ligue 1" reads "Ligue ı") and every `font:` shorthand
   resets inherited feature settings, so an inherited body value is not enough. tabular-nums uses font-variant, unaffected. */
*, *::before, *::after { box-sizing: border-box; font-feature-settings: "lnum" 1 !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 32px); scrollbar-color: var(--gold-4) var(--ink-0); background: var(--ink-1); }
body { margin: 0; min-height: 100vh; background: var(--ink-1); color: var(--ivory); font: 400 var(--fs-md)/var(--lh-body) var(--font-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-kerning: normal; font-feature-settings: "lnum" 1; /* Cormorant defaults to old-style figures ("Ligue 1" reads "Ligue ı"); inherited, survives `font:` shorthands */ }
/* Material: warm vignette + fine grain (decorative, fixed, never intercepts input) */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before { background: radial-gradient(1200px 700px at 78% -8%, rgba(226,194,122,.075), transparent 60%), radial-gradient(900px 600px at -10% 30%, rgba(122,162,255,.035), transparent 60%), linear-gradient(180deg, var(--ink-1), var(--ink-0) 120%); }
body::after { opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
ul, ol { margin: 0; padding: 0; }
p, figure, blockquote, dl, dd { margin: 0; }
[hidden] { display: none !important; }
table { border-collapse: collapse; }
::selection { background: rgba(226,194,122,.32); color: #fff; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: var(--lh-tight); letter-spacing: .005em; color: var(--ivory); font-feature-settings: "lnum" 1, "kern" 1; text-wrap: balance; word-break: keep-all;      /* CJK headings break at punctuation, not mid-word */ overflow-wrap: anywhere;   /* …but never overflow */ }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
small { font-size: var(--fs-sm); }

.display { font-family: var(--font-display); font-weight: 600; line-height: 1.04; font-size: var(--fs-display); letter-spacing: -.01em; }
.serif { font-family: var(--font-display); font-feature-settings: "lnum" 1; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; }
.foil-text { background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.lead { font-size: var(--fs-lg); line-height: 1.75; color: var(--stone); max-width: 56ch; }
.muted { color: var(--stone); }
.faint { color: var(--text-3); }
.pos { color: var(--jade); }
.neg { color: var(--garnet); }
.flat { color: var(--stone); }
.caps { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--fs-xs); font-weight: 600; }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--gold-2); }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-3)); }
.eyebrow__no { font-family: var(--font-display); font-size: .95rem; letter-spacing: .06em; color: var(--gold-3); }

.prose { color: var(--stone); line-height: 1.85; }
.prose a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(226,194,122,.4); }
.prose a:hover { text-decoration-color: currentColor; }

/* ---- Layout ---- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(36px, 4vw, 60px); max-width: 780px; }
.section-head--split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-6); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-title { font-size: var(--fs-h2); }
.section-sub { color: var(--stone); font-size: var(--fs-lg); line-height: 1.7; max-width: 60ch; }
@media (max-width: 767px) {
  .section-head--split { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .section-sub { font-size: var(--fs-md); }
}

/* ---- Accessibility ---- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: var(--z-toast); padding: 12px 18px; border-radius: var(--r-sm); background: var(--foil); color: var(--ink-0); font-weight: 600; transition: top var(--dur-2) var(--ease); }
.skip-link:focus-visible { top: 16px; }

/* ---- Scroll reveal (only applied by app.js to elements below the fold) ---- */
.reveal-pending { opacity: 0; transform: translateY(16px); }
.reveal-in { opacity: 1; transform: none; transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }

/* ---- Scrollbars ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: #3a3222; border-radius: 10px; border: 2px solid var(--ink-0); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-4); }

/* ---- Reduced motion: everything off (SPEC §9) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-pending { opacity: 1; transform: none; }
}
