/* ==========================================================================
   BASE — reset, primitives, type system, shared components
   Reads tokens only. No literal colors or fonts below this line.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  font-weight: var(--text-weight);
  line-height: var(--text-leading);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
button { font: inherit; }

::selection { background: var(--ink); color: var(--paper); }

/* --- LAYOUT PRIMITIVES ---------------------------------------------------- */

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

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

.section--dark {
  background: var(--dark);
  color: var(--on-dark);
}
.section--soft { background: var(--paper-soft); }

.section--dark .muted { color: var(--on-dark-muted); }
.muted { color: var(--ink-muted); }

/* --- TYPE ----------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  text-transform: var(--display-transform);
  text-wrap: balance;
  margin: 0;
}

.display--hero    { font-size: var(--t-hero); }
.display--section { font-size: var(--t-section); }
/* For a section headline that lives inside a column rather than the full
   measure of the page. Keeps long words inside their track. */
.display--column  { font-size: clamp(1.9rem, 3.6vw, 3.5rem); }

.sub {
  font-family: var(--font-display);
  font-size: var(--t-sub);
  font-weight: var(--display-weight);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.lead { font-size: var(--t-lead); line-height: 1.45; }

.copy { max-width: var(--measure); }
.copy p { margin: 0 0 1.15em; }
.copy p:last-child { margin-bottom: 0; }
.copy--wide { max-width: 46rem; }

/* Utility text. Information only: timestamps, asset labels, sourcing notes. */
.utility {
  font-family: var(--font-utility);
  font-size: var(--utility-size);
  letter-spacing: var(--utility-tracking);
  text-transform: var(--utility-transform);
  line-height: 1.2;
  margin: 0;
}

/* --- LINKS / CTA ---------------------------------------------------------- */

a { color: inherit; text-decoration: none; }

.link-underline {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: var(--hairline) solid currentColor;
  transition: opacity var(--dur-fast) var(--ease);
}
.link-underline:hover, .link-underline:focus-visible { opacity: 0.6; }

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: var(--t-sub);
  font-weight: var(--display-weight);
  letter-spacing: -0.01em;
  padding: 0.9rem 0;
  border-bottom: 2px solid currentColor;
  transition: gap var(--dur-fast) var(--ease);
}
.cta .cta__arrow { font-family: var(--font-text); font-weight: 400; }
.cta:hover, .cta:focus-visible { gap: 1.6rem; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* --- MEDIA ---------------------------------------------------------------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--dark-raised);
  border-radius: var(--radius);
}
.media > video,
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--media-grade);
}
/* Leftover Motion Array stock. Placeholder only — see tokens.css. */
.media--legacy > video, .media--legacy > img { filter: var(--legacy-grade); }
.media--fill { position: absolute; inset: 0; }

.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-5  { aspect-ratio: 4 / 5; }
.ratio-3-2  { aspect-ratio: 3 / 2; }
.ratio-1-1  { aspect-ratio: 1 / 1; }

.scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 42%,
    rgba(0,0,0,0.72) 100%
  );
  pointer-events: none;
}

/* --- ASSET PLACEHOLDER ----------------------------------------------------
   Used wherever the sourced footage does not yet exist. Deliberately plain so
   it never reads as a design element. Every one names the shot we need.
   -------------------------------------------------------------------------- */

.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem;
  background: var(--paper-soft);
  color: var(--ink);
  border: var(--hairline) solid var(--rule-light);
  border-radius: var(--radius);
}
.section--dark .placeholder,
.placeholder--dark {
  background: var(--dark-raised);
  color: var(--on-dark);
  border-color: var(--rule-dark);
}
.placeholder__tag { color: var(--ink-muted); }
.section--dark .placeholder__tag,
.placeholder--dark .placeholder__tag { color: var(--on-dark-muted); }
.placeholder__need {
  font-family: var(--font-utility);
  font-size: 0.8125rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
  max-width: 26ch;
}

/* --- TIMESTAMP ------------------------------------------------------------ */

.timestamp {
  font-family: var(--font-utility);
  font-size: var(--utility-size);
  letter-spacing: var(--utility-tracking);
}

/* --- REVEAL --------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 90ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 270ms; }

/* --- ACCESSIBILITY -------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
