/* ==========================================================================
   Base — reset, document defaults, typography primitives, shared utilities.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Stops sticky-nav overlap when jumping to an anchor. */
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--bg); }

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

a { color: inherit; }

/* One consistent, always-visible focus treatment. */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* --- Accessibility helpers ------------------------------------------------ */

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -110%);
  z-index: calc(var(--z-nav) + 10);
  padding: var(--s-3) var(--s-6);
  background: var(--gold);
  color: var(--bg);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --- Typography primitives ------------------------------------------------ */

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
}

/* The signature move of this brand: italic gold emphasis inside a serif heading. */
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-bright);
}

.eyebrow {
  font-family: var(--body);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--gold);
}

.lede {
  font-size: var(--t-lead);
  line-height: var(--lh-normal);
  color: var(--ink-mute);
  font-weight: 300;
}
.lede strong { color: var(--ink); font-weight: 500; }

/* --- Layout utilities ----------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

/* Numbered section label, e.g. "01 — The Arena" */
.section-label {
  font-family: var(--body);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* Two-column "big heading left / lede right" section header. */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
}
.section-head h2 { font-size: var(--t-d1); }
.section-head .lede { padding-bottom: var(--s-3); }

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: var(--s-6); align-items: start; }
}

/* --- Scroll reveal -------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
/* Staggered children inside a revealed container. */
.reveal.visible > .stagger { animation: rise var(--dur-slow) var(--ease-out) backwards; }
.reveal.visible > .stagger:nth-child(1) { animation-delay: 40ms; }
.reveal.visible > .stagger:nth-child(2) { animation-delay: 100ms; }
.reveal.visible > .stagger:nth-child(3) { animation-delay: 160ms; }
.reveal.visible > .stagger:nth-child(4) { animation-delay: 220ms; }
.reveal.visible > .stagger:nth-child(5) { animation-delay: 280ms; }
.reveal.visible > .stagger:nth-child(6) { animation-delay: 340ms; }
.reveal.visible > .stagger:nth-child(n+7) { animation-delay: 400ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Never let reveal animations hide content for people who opt out of motion. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal.visible > .stagger { animation: none; }
}

/* If a page controller throws, the observer never runs — show everything that
   did render rather than leaving it at opacity 0. */
body[data-render-error] .reveal { opacity: 1; transform: none; }

.render-error {
  max-width: var(--container-text);
  margin: 7rem auto 2rem;
  padding: var(--s-6);
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: 1.6;
}
.render-error strong { display: block; margin-bottom: var(--s-2); font-weight: 600; }
.render-error a { color: var(--gold); }

/* --- Scrollbar ------------------------------------------------------------ */

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 3px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Cormorant Garamond ships old-style figures by default, which makes "1" read
   as a small-cap I. Every number set in the display face uses lining figures. */
.display, .hero-title, .count-num, .stat-num, .meta-value,
.event-numeral, .notfound-code, .person-name, .modal-title,
.admin-brand-name, .admin-topbar-title, .org-group-head h2 {
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
}
