/* The fixed navigation and the opening occupy separate vertical areas.
   Keep layout rules here; scroll changes only the inner artwork and copy. */
:root {
  --header-height: 88px;
}

html {
  scroll-padding-top: calc(var(--header-height) + 20px);
}

.site-header {
  min-height: 88px;
  padding: 20px 4vw;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -8px 0 -40px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8,9,11,.9) 0%, rgba(8,9,11,.58) 48%, rgba(8,9,11,.16) 76%, transparent 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0,0,0,.74) 76%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0,0,0,.74) 76%, transparent 100%);
}

.site-header.header-light::before {
  background: linear-gradient(180deg, rgba(243,241,235,.94) 0%, rgba(243,241,235,.62) 48%, rgba(243,241,235,.18) 76%, transparent 100%);
}

main#top {
  padding-top: 0;
}

.hero-sequence {
  height: auto;
  min-height: calc(var(--hero-natural-height, 0px) + var(--hero-scroll-distance, 0px));
}

.hero-sequence .hero {
  position: relative;
  top: 0;
  display: grid;
  align-items: center;
  height: auto;
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(32px, 4vh, 56px)) 8vw 84px;
  overflow: clip;
  background: var(--ink);
  isolation: isolate;
}

/* Pin only when the entire copy fits below the navigation. */
.hero-sequence[data-hero-pinned] .hero {
  position: sticky;
  top: 0;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-media .hero-reactor-layer {
  position: absolute;
  inset: 0;
  background: none;
  transform-origin: 75% 50%;
  transform: translate3d(var(--reactor-x, 0px), var(--reactor-y, 0px), 0)
    scale(var(--reactor-scale, 1)) rotate(var(--reactor-rotate, 0deg));
}

.hero-reactor-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.hero::after {
  z-index: 1;
  background: linear-gradient(90deg, rgba(8,9,11,.9), rgba(8,9,11,.64) 35%, rgba(8,9,11,.08) 78%);
  opacity: 1;
  transition: none;
}

.hero .hero-copy,
.hero .hero-copy.reveal,
.hero .hero-copy.reveal.visible {
  width: min(100%, 850px);
  min-width: 0;
  padding: 0;
  opacity: var(--copy-opacity, 1);
  transform: translate3d(0, var(--copy-y, 0px), 0);
  transition: none;
}

.hero h1 {
  font-size: clamp(46px, min(6.4vw, 11svh), 112px);
  line-height: 1.02;
  margin: 0 0 24px;
}

.hero .eyebrow {
  margin: 0 0 24px;
  line-height: 1.6;
}

.hero .lead {
  margin: 0;
}

.hero .actions {
  margin: 28px 0 18px;
}

.hero .micro-note {
  margin: 0;
  line-height: 1.5;
}

.hero .scroll-cue {
  bottom: 24px;
  z-index: 3;
}

@media (max-width: 800px) {
  :root { --header-height: 68px; }
  .site-header { min-height: 68px; padding: 14px 6vw; }
  .hero-sequence .hero { padding: calc(var(--header-height) + 32px) 6vw 96px; }
  .hero h1 { font-size: clamp(38px, 11.8vw, 76px); }
  .hero::after { background: rgba(8,9,11,.58); }
  .hero .eyebrow { font-size: 9px; letter-spacing: .08em; }
  .hero .eyebrow span { width: 18px; margin-inline: 6px; }
  .hero .scroll-cue { left: 6vw; }
  .hero .hero-schematic { bottom: 55px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sequence { min-height: 0; }
  .hero-sequence[data-hero-pinned] .hero { position: relative; top: 0; }
  .hero .hero-copy { opacity: 1; transform: none; }
  .hero .hero-curtain, .hero .hero-arrival { display: none; }
  html { scroll-behavior: auto; }
}
