/* Scroll story and the channel mast. Builds on style.css. */

.story { position: relative; background: #0b0b0d; }
.story-pin { position: relative; }
.story-stage { position: relative; min-height: 42vh; background: #0b0b0d; }
.story-canvas, .story-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-canvas { display: block; z-index: 0; }
.story-poster {
  z-index: 1;
  background:
    url('../img/hero/01-nose.webp') center center / cover no-repeat,
    #0b0b0d;
}
html.hero-film .storyboard { display: none; }
html.hero-film .story { height: 460vh; }
html.hero-film .story-pin {
  position: sticky; top: 0;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr);
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}
html.hero-film .story-panel { grid-row: 1; min-height: 0; }
html.hero-film .story-stage { grid-row: 2; min-height: 0; }
html.hero-film.is-ready .story-poster { opacity: 0; transition: opacity .45s linear; pointer-events: none; }
html:not(.hero-film) .story-stage,
html:not(.hero-film) .beats { display: none; }
html:not(.hero-film) .story-pin { height: auto; display: block; }

.story-panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(72px + env(safe-area-inset-top)) var(--pad) 16px  var(--pad);
  background: #0b0b0d;
  color: var(--bone);
}
.story-ui { position: relative; }
.story-copy { max-width: 38rem; }
.story-copy a, .story-copy button, .story-tools button { pointer-events: auto; }
.story .kicker { margin-bottom: 10px; }
.story .title { font-size: clamp(2.45rem, 4.4vw, 4.15rem); max-width: 100%; }
.story .tach-rig { display: none; margin: 0; }
html.shot .hdr, html.shot .story-ui, html.shot .story-tools, html.shot .stage-read, html.shot .beats, html.shot .dock, html.shot .tape { display: none !important; }
.tape { margin-top: 0; }
.story .t-line { width: auto; max-width: 100%; }
.story .t-2 { margin-left: .18em; }
.story .tag {
  margin: 12px 0 14px;
  max-width: 34ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story .cta-row .btn { min-height: 48px; }
.story-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.story .engine { margin-top: 0; min-height: 44px; }
.story .tach figcaption { margin-top: 4px; }
.story .handle { margin-top: 8px; }

.stage-read {
  position: relative;
  margin: 0;
  max-width: 36rem;
  color: var(--bone-2);
  font-size: .95rem;
}
.stage-name {
  display: inline;
  margin-right: 8px;
  font: 800 .95rem/1 var(--f-disp);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone);
}
.stage-line { display: inline; }

.beats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.beats li { display: flex; align-items: center; gap: 8px; color: var(--bone-2); font: 600 .68rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; }
.beats i {
  width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #ece4d4aa;
}
.beats li.on { color: var(--bone); }
.beats li.on i { background: var(--acc-hi); box-shadow: 0 0 0 4px rgba(var(--glow), .25); }
html:not(.hero-film) .beats { display: none; }

.story-copy .title, .story-copy .tag, .story-copy .cta-row, .story-copy .kicker {
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.storyboard {
  display: grid;
  gap: 16px;
  padding: 8px var(--pad) 28px;
}
.board-frame { margin: 0; background: var(--asphalt); border: 1px solid var(--line); }
.board-frame img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; background: #14120f; }
.board-frame figcaption { padding: 12px 14px 14px; color: var(--bone-2); }
.board-frame figcaption b {
  display: block;
  margin-bottom: 4px;
  color: var(--bone);
  font: 800 1.15rem/1 var(--f-disp);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.handoff { background: linear-gradient(180deg, #101014, #0b0b0d); }
.handoff-grid { display: grid; gap: 22px; align-items: start; }
.handoff .main-event { max-width: 820px; }
.handoff-cta { margin-top: 22px; }

.page-mast {
  padding: calc(108px + env(safe-area-inset-top)) var(--pad) 10px;
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(var(--glow), .18), transparent 60%),
    #0b0b0d;
}
.page-mast h1 { margin: 0; font: 900 clamp(3rem, 10vw, 6.4rem)/.86 var(--f-disp); text-transform: uppercase; letter-spacing: -.01em; max-width: 14ch; }
.page-mast .lede { margin-top: 16px; }
.mast-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.page-mast .engine { margin: 0; }

.nav a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 899px) {
  html.hero-film[data-beat="2"] .rev-hud,
  html.hero-film[data-beat="3"] .rev-hud {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  .hdr .hdr-sub { display: none; }
  .story .handle { display: none; }
  html.hero-film .story-panel { padding-top: 58px; padding-bottom: 8px; gap: 6px; }
  .story .title { font-size: clamp(2.15rem, 11vw, 3rem); }
  .story .tag { -webkit-line-clamp: 2; margin: 6px 0 8px; }
  .story .kicker { margin-bottom: 6px; }
  .nav { display: flex; }
  .nav a { display: none; }
  .nav a.only-narrow { display: inline-flex; }
}
@media (min-width: 900px) {
  .nav .only-narrow { display: none; }
  .storyboard { grid-template-columns: 1fr 1fr; }
  .handoff-grid { grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
  html.hero-film .story-pin {
    grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
    grid-template-rows: 1fr;
  }
  html.hero-film .story-panel { grid-column: 1; grid-row: 1; justify-content: flex-start; }
  html.hero-film .story-stage { grid-column: 2; grid-row: 1; min-height: 0; }
  html.hero-film[data-beat="2"] .story .handle,
  html.hero-film[data-beat="3"] .story .handle { display: none; }
  html.hero-film[data-beat="2"] .story .tag,
  html.hero-film[data-beat="3"] .story .tag { -webkit-line-clamp: 2; margin-bottom: 8px; }
  html.hero-film[data-beat="2"] .story .tach-rig,
  html.hero-film[data-beat="3"] .story .tach-rig { display: grid; width: 176px; margin: 0; }
}
@media (max-width: 420px) {
  .story .title { font-size: clamp(2.05rem, 11.5vw, 2.7rem); }
  .story .tag { -webkit-line-clamp: 2; margin: 8px 0 10px; }
  .story .cta-row .btn { min-height: 44px; padding: 0 14px; font-size: .78rem; letter-spacing: .08em; }
}
@media (max-height: 760px) and (max-width: 899px) {
  .story .tag { -webkit-line-clamp: 2; }
  html.hero-film .beats,
  html.hero-film .stage-read { display: none; }
  html.hero-film .story-pin { grid-template-rows: auto minmax(0, 1fr); }
}

.engine-mini { min-height: 44px; }
.dock .btn { min-height: 48px; }

html.hero-film { scroll-behavior: auto; }
