/* Grimoire — minimal global base. Consumers get resets + link colours + the
   letterbox scene wrapper. No component styling lives here.
   Pair with <meta name="viewport" content="width=device-width, initial-scale=1">. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, video, canvas { max-width: 100%; height: auto; }
body {
  background: var(--surface-void);
  color: var(--text-body);
  font: var(--type-body);
  letter-spacing: var(--ls-body);
  text-wrap: pretty;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-medium); color: var(--text-title); letter-spacing: var(--ls-title); line-height: var(--lh-title); }
h1 { font-size: var(--fs-display); text-wrap: balance; }
h2 { font-size: var(--fs-title); text-wrap: balance; }
h3 { font-size: var(--fs-heading); text-wrap: balance; }
h4 { font-size: var(--fs-plate); }
p { margin: 0 0 var(--sp-6); max-width: var(--w-prose); }
a { color: var(--text-link); text-decoration: none; border-bottom: 1px solid var(--gold-a40); transition: color var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft); }
a:hover { color: var(--text-link-hover); border-bottom-color: var(--gold-300); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus-ring); }
small { font: var(--type-caption); color: var(--text-muted); }
::selection { background: var(--aqua-a45); color: var(--parchment-50); }

/* Caps micro-label — the widely-tracked sans label seen above every group. */
.grimoire-caps { font: var(--type-label); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--text-muted); }

/* Scene wrapper: lit backdrop + vignette + cinematic letterbox. */
.grimoire-scene { position: relative; background: var(--surface-scene); background-size: cover; isolation: isolate; }
.grimoire-scene::after { content: ""; position: absolute; inset: 0; background: var(--vignette); pointer-events: none; }
.grimoire-scene--full { min-height: 100dvh; }

/* Visually hidden — for the labels a coarse-pointer layout drops. */
.grimoire-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
