/* hero, drones, about, end */
.seq, .sign { position: absolute; inset: 0; width: 100%; height: 100%; }
.rise { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; }
.rise > b { display: inline-block; font-weight: inherit; will-change: transform; }

/* Full-bleed stages use the large viewport, so they still reach the bottom edge once Safari's toolbar slides away.
   Anything pinned to the bottom adds --tb (large minus small viewport) so it also clears the toolbar when it is out. */
#hero .stage, #drones .stage, #end .stage { height: 100vh; height: 100lvh; }

/* hero */
#hero { height: 210vh; }
#hero .hero-foot {
  position: absolute; left: var(--pad-l); right: var(--pad-r); bottom: calc(var(--tb) + var(--safe-b) + clamp(22px, 5vh, 52px));
  display: flex; justify-content: space-between; align-items: flex-end;
}
#hero .hero-words { font-weight: 700; letter-spacing: -0.02em; font-size: clamp(17px, 1.6vw, 24px); }
#hero .hero-cue { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 600; color: var(--soft); }
#hero .hero-cue i { position: relative; width: 1px; height: 54px; background: var(--line); overflow: hidden; }
#hero .hero-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.2s cubic-bezier(.6,0,.2,1) infinite; }
@keyframes cue { to { top: 100%; } }
.is-reduced #hero .hero-cue i::after { animation: none; top: 0; height: 100%; opacity: .5; }
@media (prefers-reduced-motion: reduce) { #hero .hero-cue i::after { animation: none; top: 0; height: 100%; opacity: .5; } }

/* drones */
#drones { height: 200vh; margin-top: -40vh; }
#drones .film { position: absolute; inset: 0; opacity: 0; }
#drones .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#drones .film::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 6, 24, .7));
}
#drones .cap { position: absolute; left: var(--pad-l); bottom: calc(var(--tb) + var(--safe-b) + 11svh + clamp(20px, 5vh, 56px)); max-width: min(760px, 86vw); }
#drones .cap .lead { margin-top: 14px; color: var(--ink); }
#drones .cap { z-index: 2; }
#drones .bar { position: absolute; left: 0; right: 0; height: 11svh; background: #000; z-index: 1; }
#drones .bar-t { top: 0; transform: translateY(-101%); }
#drones .bar-b { bottom: 0; transform: translateY(101%); }
.is-mobile #drones .bar { display: none; }
/* phones: a deeper scrim under the caption so bright footage (the shoreline) never cuts through the title */
.is-mobile #drones .film::after { height: 56%; background: linear-gradient(180deg, transparent 0%, rgba(0, 6, 24, .82) 38%, rgba(0, 6, 24, .92) 100%); }

/* about */
#about { height: 150vh; }
#about .stage { display: flex; align-items: center; padding-top: 72px; }
#about .about-in { padding: 0 var(--pad-r) 0 var(--pad-l); max-width: 1500px; }
#about .display { max-width: 15ch; font-size: clamp(30px, min(7vw, 13vh), 128px); line-height: 1.02; }
#about .lead { margin-top: clamp(24px, 4vh, 44px); max-width: 34ch; color: var(--ink); text-wrap: balance; }
#about .wd, #drones .wd, #end .wd { display: inline-block; white-space: nowrap; margin-right: .1em; }
#about .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
#about .w > b { display: inline-block; font-weight: inherit; will-change: transform; }

/* end: ocean, the plunge, sharks, the ask */
#end { height: 220vh; }
#end .stage { background: #01030a; }
#end .water { position: absolute; inset: 0; will-change: transform; }
#end .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#end #sharks { opacity: 0; }
/* once under, the camera tilts up: the lit surface and the sharks slide to the bottom of the screen */
#end .water-top { position: absolute; inset: 0 0 auto 0; height: 22%; opacity: 0; background: linear-gradient(180deg, #01030a 0%, rgba(1, 3, 10, 0) 100%); }
#end .sign, #end .end-cta, #end .end-foot { z-index: 2; }
#end .end-cta { position: absolute; left: var(--pad-l); right: var(--pad-r); top: 37%; text-align: center; }
#end .end-cta .lead { color: var(--ink); }
#end .end-cta a {
  display: inline-block; margin-top: 12px; font-size: clamp(34px, 5.6vw, 104px); padding-bottom: .06em;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 3px no-repeat; transition: background-size .8s cubic-bezier(.7,0,.2,1);
}
#end .end-cta a:hover { background-size: 100% 3px; }
#end .end-cta a span { display: inline-block; font-size: .6em; vertical-align: .3em; transition: transform .5s var(--spring); }
#end .end-cta a:hover span { transform: translate(.1em, -.1em); }
/* the lit water surface slides to the bottom of the screen, right under the footer: a dark scrim keeps it legible */
#end .foot-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tb) + var(--safe-b) + 120px); z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(1, 3, 10, .85), rgba(1, 3, 10, 0)); }
#end .end-foot { position: absolute; left: var(--pad-l); right: var(--pad-r); bottom: calc(var(--tb) + var(--safe-b) + 18px); display: flex; justify-content: space-between; gap: 16px; color: var(--soft); }

.is-mobile #hero .hero-cue { display: none; }
.is-mobile #drones .cap { bottom: calc(var(--tb) + var(--safe-b) + 9svh); }
.is-mobile #end .end-cta { top: 36%; }
.is-reduced #hero, .is-reduced #drones, .is-reduced #about { height: 100vh; margin-top: 0; }
.is-reduced #end { height: 100vh; }

/* short landscape screens (a phone on its side): the statement and the closing ask are sized by height */
@media (max-height: 480px) {
  #about .stage { align-items: flex-start; padding-top: 76px; }
  #about .display { font-size: clamp(26px, 6.2vh, 44px); max-width: none; text-wrap: balance; }
  #about .lead { font-size: 16px; margin-top: 12px; max-width: 90ch; text-wrap: wrap; }
  #end .end-cta, .is-mobile #end .end-cta { top: 46%; }
  #end .end-cta a { font-size: clamp(26px, 8vh, 44px); margin-top: 6px; }
  #drones .cap { bottom: calc(var(--tb) + var(--safe-b) + 11svh + 16px); }
  .is-mobile #drones .cap { bottom: calc(var(--tb) + var(--safe-b) + 22px); }
  #drones .cap .display { font-size: clamp(34px, 11vh, 60px); }
}
