/* The cover fills the first viewport cleanly; navigation slides in once scrolling starts. */
body[data-page="home"] > .mast {
  position: sticky;
  top: 0;
  z-index: 15;
}
body[data-page="home"] > .mast.scroll-header {
  position: fixed;
  inset: 0 0 auto;
  transform: translateY(-100%);
  visibility: hidden;
  background: #edf7ff;
  color: var(--ink);
  border-bottom-color: #c8e0ef;
  box-shadow: 0 10px 30px -16px rgba(10,30,48,.18);
}
body[data-page="home"] > .mast.scroll-header.is-visible {
  transform: translateY(0);
  visibility: visible;
}
@media (prefers-reduced-motion: no-preference) {
  .mast.scroll-header { transition: transform .2s ease-out; }
}

html:has(body[data-page="home"]) { scroll-padding-top: 76px; }

.hero-stage, .hero-slide { position: absolute; inset: 0; overflow: hidden; }
.hero-stage {
  z-index: -2;
  transform: scale(1.03) translate3d(var(--hero-px, 0px), var(--hero-py, 0px), 0);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.hero-slide { display: block; visibility: hidden; opacity: 0; }
.hero-slide.is-active, .hero-slide.is-leaving { visibility: visible; }
.hero-slide.is-active { z-index: 1; opacity: 1; }
.hero-slide.is-leaving { z-index: 0; opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

.hero-inner {
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: flex-end;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: env(safe-area-inset-bottom);
}
.hero-copy { padding-block: 20px clamp(22px,5vh,58px); }
.hero-foot {
  border: 0;
  min-height: 64px;
}
.hero-pager, .scene-label, .scene-buttons { display: flex; align-items: center; }
.hero-pager { gap: clamp(12px,2vw,27px); }
.scene-label { gap: 10px; }
.scene-buttons { gap: 6px; }
.hero-pager button { border: 1px solid rgba(255,255,255,.35); background: rgba(13,37,56,.62); backdrop-filter: blur(8px); line-height: 1; }
.hero-pager button:hover, .hero-pager button:focus-visible { background: rgba(33,73,101,.92); border-color: rgba(255,255,255,.7); }
#scene-play { font: 600 14px/1 var(--sans); }
#scene-count { color: #c4eaff; }
#scene-name { min-width: 0; }

@media (max-width: 659px) {
  .hero-foot .scroll-link { display: none; }
  .hero-pager { width: 100%; justify-content: space-between; }
  .hero-copy { padding-bottom: clamp(16px,4vh,30px); }
  .hero-foot { min-height: 64px; }
  .hero-wash {
    background: linear-gradient(180deg, rgba(7,23,38,.64) 0%, rgba(8,29,48,.52) 38%, rgba(7,25,42,.88) 72%, rgba(6,22,36,.97) 100%);
  }
}

@media (min-width: 660px) {
  html:has(body[data-page="home"]) { scroll-padding-top: 78px; }
  .hero-inner { justify-content: center; }
  .hero-foot { position: absolute; inset: auto 0 max(10px,env(safe-area-inset-bottom)); }
  .hero-copy { margin-block: 62px; }
}

@media (min-width: 950px) {
  html:has(body[data-page="home"]) { scroll-padding-top: 80px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .hero-inner { justify-content: flex-end; }
  .hero-foot { position: static; min-height: 48px; }
  .hero-copy { margin: 0; padding-block: 8px; }
  .hero h1 { font-size: clamp(54px,10vw,86px); }
  .hero h1 em { display: inline; }
  .hero-sub { margin-block: 9px; max-width: 57ch; }
  .hero-copy .eyebrow { margin-bottom: 12px; }
  .hero .button { min-height: 42px; padding-block: 7px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: hero-arrive .7s cubic-bezier(.22,1,.36,1) both; }
  @keyframes hero-arrive {
    from { opacity: .6; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
  .hero-slide.is-moving { animation: slide-photo-in .75s cubic-bezier(.22,1,.36,1) both; }
  .hero-slide.is-active img, .hero-slide.is-leaving img {
    animation: zoom-photo 4.6s ease-out both;
  }
  .hero.is-resting .hero-slide img, .hero-slide.is-leaving img { animation-play-state: paused; }
  @keyframes slide-photo-in {
    from { opacity: .05; transform: translateX(var(--slide-from,100%)) scale(1.03); }
    to { opacity: 1; transform: translateX(0) scale(1); }
  }
  @keyframes zoom-photo { from { transform: scale(1); } to { transform: scale(1.075); } }
}
