*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font: 400 var(--fs-body) / var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p, ul, ol, figure, blockquote { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
::selection { background: var(--gold-500); color: var(--teal-950); }

/* Typography */
h1, h2, h3, .display, .h1, .h2, .h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: -.01em;
  text-wrap: balance;
}
h4, h5, h6, .h4 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.3;
}
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -.02em; }
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
/* The gold italic accent. Libre Caslon Display has no italic, so fonts.css maps the Libre Caslon Text italic in as its
   italic face. That cut is drawn for reading sizes: at the same font size its x-height is 27% taller and its stems
   about 1.6x as thick as the Display roman, so the accent read as a bigger, bolder word. At --fs-accent (.84em, with a
   24px floor) its x-height is within 7% of the roman's (9% on the smallest h2) and its capitals within 6%; the gold,
   lower in contrast than the text colour, evens out the rest. font-synthesis: none keeps the browser from ever faking
   a bold or slanted face. */
:is(h1, h2, h3, .display, .h1, .h2, .h3) em { font-size: var(--fs-accent); font-style: italic; font-synthesis: none; color: var(--gold-600); }
.section--dark :is(h1, h2, h3, .display, .h1, .h2, .h3) em { color: var(--gold-500); }

.eyebrow, .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}
.eyebrow { color: var(--gold-700); }
.section--dark .eyebrow { color: var(--gold-500); }
.lead { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.6; color: var(--text-muted); max-width: 46ch; }
.muted { color: var(--text-muted); }
.section--dark .muted, .section--dark .lead { color: var(--on-dark-muted); }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }
.section--alt { background: var(--paper-2); }
/* Any dark surface (sections, the hero, dark cards, the trailer dialog). The ring is redefined here
   because --focus-ring's var() is resolved where it is declared (:root), not where it is used. */
.section--dark { background: var(--teal-950); color: var(--on-dark); --focus-ring: 2px solid var(--gold-500); }
.stack > * + * { margin-top: var(--stack-gap, var(--space-5)); }

/* Accessibility */
.visually-hidden {
  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: var(--space-4);
  top: var(--space-4);
  z-index: var(--z-transition);
  padding: var(--space-3) var(--space-4);
  background: var(--teal-950);
  color: var(--on-dark);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* Reveal gating: hidden only while JS runs; EE.motion adds .is-revealed */
html.js [data-reveal]:not(.is-revealed) { opacity: 0; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
