/* sol · web — base: reset, type, layout primitives, utilities, reveal. Owner: lead (docs/ESPEC.md 3). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
/* links inside the page glide, once the page has landed (app.js adds .sol-suave): the browser's own jump to an
   address's #anchor, and the position it puts back on a reload or Back, are instant, or the page would glide from the
   top through content still waiting for its reveal */
@media (prefers-reduced-motion: no-preference) { html.sol-suave { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
h3, h4 { line-height: 1.2; letter-spacing: -.015em; }
/* short labels and questions break into even lines; running text never leaves one word alone on its last line
   (the longhand only chooses where lines break: whatever is meant not to wrap still does not) */
summary, figcaption, dt, th, caption, legend, label { text-wrap-style: balance; }
p, li, dd, blockquote { text-wrap-style: pretty; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }
::selection { background: rgba(201, 169, 97, .35); color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-block;
  font: 600 var(--fs-eyebrow)/1.2 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  text-wrap-style: balance;
}
.display { font-size: var(--fs-hero); line-height: .98; letter-spacing: -.035em; }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-small); }
.num { font-variant-numeric: tabular-nums; }
.gold-text {
  background: var(--gold-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.blue-text { color: var(--blue-hi); }
.prose { max-width: 66ch; }
.prose h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--gold-hi); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); margin: 1em 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .6em .5em; border-bottom: 1px solid var(--line); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: calc(var(--max-wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: calc(820px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section + .section { padding-top: calc(var(--section-y) * .72); }
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(36px, 4vw, 72px); max-width: 860px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head .lead { margin: 0; }
.stack > * + * { margin-top: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.grid-auto { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- utilities ---------- */
.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: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--gold-grad); color: var(--on-gold); font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
.no-js-hide { }
html:not(.js) .js-only { display: none !important; }

/* ---------- reveal on scroll (app.js) ----------
   Nothing is hidden before app.js runs, so text on the first screen never waits for it. At load, app.js marks what is
   already on the screen (or above it) .is-in straight away, and hides only what is still below it (.reveal-wait). A
   page opened at an #anchor, reloaded or reached with Back is looked at where it lands, once it has landed.
   Those rise into place with .is-in as they scroll into view; .reveal-wait is dropped when the rise ends, so each
   element is back to its own styles. 2D transforms only: nothing keeps a compositor layer. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].reveal-wait {
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
  }
  [data-reveal].reveal-wait:not(.is-in) { opacity: 0; transform: translateY(24px); transition: none; }
  [data-reveal="fade"].reveal-wait:not(.is-in) { transform: none; }
  [data-reveal="scale"].reveal-wait:not(.is-in) { transform: scale(.96); }
}

/* ---------- decorative flowing staff (svg drawn by app.js into [data-staff]) ---------- */
.staff-deco { position: absolute; pointer-events: none; inset: 0; overflow: hidden; z-index: 0; }
.staff-deco svg { position: absolute; width: 140%; left: -20%; height: auto; opacity: .55; }

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, canvas, .no-print { display: none !important; }
}
