/* The pinned WebGL reel. Default is a plain flow; .js-pin upgrades it. */
.reel { position: relative; background: var(--blue-950); color: var(--white); }
.stage { position: relative; overflow: hidden; padding-top: var(--header); display: flex; flex-direction: column; background: var(--blue-950); }
.scene { order: 1; position: relative; height: 62vh; overflow: hidden; background: var(--blue-950) url("../hero/ak-world-poster.jpeg") center / cover no-repeat; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.stage.is-live .scene canvas { opacity: 1; }
.scrim { display: none; }

/* screen-space marks */
.marks { display: none; position: absolute; inset: 0; z-index: var(--z-marks); pointer-events: none; }
.mark, .lock { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .35s; will-change: transform; }
.mark {
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .68rem; border-radius: 4px;
  background: rgba(7, 22, 80, .92); border: 1px solid rgba(213, 223, 251, .5);
  color: var(--white); font-size: .78rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.mark i { width: .44rem; height: .44rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.mark--calm i { background: var(--blue-300); box-shadow: none; }
.mark--pilot { background: var(--red-deep); border-color: rgba(255, 255, 255, .8); }
.mark--pilot i { background: var(--white); box-shadow: none; }
.lock {
  width: 92px; height: 92px; margin: -46px 0 0 -46px; --c: #FFFFFF;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / 18px 2px, linear-gradient(var(--c) 0 0) 0 0 / 2px 18px,
    linear-gradient(var(--c) 0 0) 100% 0 / 18px 2px, linear-gradient(var(--c) 0 0) 100% 0 / 2px 18px,
    linear-gradient(var(--c) 0 0) 0 100% / 18px 2px, linear-gradient(var(--c) 0 0) 0 100% / 2px 18px,
    linear-gradient(var(--c) 0 0) 100% 100% / 18px 2px, linear-gradient(var(--c) 0 0) 100% 100% / 2px 18px;
  background-repeat: no-repeat;
}
.lock b {
  position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%);
  padding: .24rem .58rem; border-radius: 3px; background: var(--red-deep); color: var(--white);
  font-size: .78rem; font-weight: 640; line-height: 1.3; white-space: nowrap;
}
.stage[data-act="1"] #mark-contact,
.stage[data-act="2"] #mark-lock, .stage[data-act="2"] #mark-bird, .stage[data-act="2"] #mark-auth,
.stage[data-act="3"] #mark-lock, .stage[data-act="3"] #mark-pilot { opacity: 1; }
.stage.no-world .marks { display: none !important; }

/* evidence record */
.record {
  order: 3; width: min(100% - 2 * var(--gutter), 23.5rem); margin: 0 auto 2rem; padding: 1.4rem 1.45rem 1.15rem;
  background: var(--white); color: var(--ink); border-radius: 10px; box-shadow: 0 34px 80px rgba(2, 7, 36, .62);
}
.record__title { font-size: 1.12rem; font-weight: 660; letter-spacing: -.012em; }
.record ol { margin-top: .7rem; }
.record li { position: relative; padding: .5rem 0 .5rem 1.75rem; border-top: 1px solid var(--line); line-height: 1.25; }
.record li::before {
  content: ""; position: absolute; left: .12rem; top: .78rem; width: .85rem; height: .45rem;
  border-left: 2.5px solid var(--red-deep); border-bottom: 2.5px solid var(--red-deep); transform: rotate(-45deg);
}
.record b { display: block; font-size: .94rem; font-weight: 620; }
.record span { font-size: .81rem; color: var(--body); }
.record__for { padding-top: .65rem; border-top: 1px solid var(--line); font-size: .81rem; font-weight: 620; line-height: 1.35; color: var(--blue-800); }
.record__note { margin-top: .3rem; font-size: .75rem; color: var(--body); }

/* copy */
.acts { order: 2; position: relative; z-index: var(--z-copy); display: grid; gap: 2.5rem; padding: 1rem var(--gutter) 2.5rem; }
.act h1 { font-size: clamp(2.5rem, 5.5vw, 5.6rem); line-height: .98; letter-spacing: -.036em; font-weight: 660; font-stretch: 118%; }
.act h3 { font-size: clamp(2.6rem, 5.4vw, 5.25rem); line-height: 1; letter-spacing: -.034em; font-weight: 650; font-stretch: 120%; }
.act p { color: #E4EAFD; }
.act__lede { margin-top: 1.4rem; font-size: clamp(1.03rem, 1.3vw, 1.2rem); line-height: 1.56; max-width: 30rem; }
.act__lede strong { color: var(--white); font-weight: 680; }
.act__cta { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.act .act__count { margin-bottom: .6rem; font-size: .92rem; font-weight: 600; color: #FF9A9D; }
.act:not(.act--hero) > p:last-child { margin-top: 1rem; max-width: 30rem; font-size: clamp(1.03rem, 1.25vw, 1.16rem); line-height: 1.56; }
.rail { display: none; }

/* pinned */
.js-pin .reel { height: 660vh; }
.js-pin .stage { display: block; position: sticky; top: 0; height: 100vh; height: 100lvh; padding-top: 0; }
.js-pin .scene { position: absolute; inset: 0; height: auto; }
.js-pin .marks { display: block; }
.js-pin .stage:not(.is-live) .marks { display: none; }
.js-pin .scrim {
  display: block; position: absolute; inset: 0; z-index: var(--z-scrim); pointer-events: none;
  background: linear-gradient(96deg, rgba(7, 22, 80, .93) 0%, rgba(7, 22, 80, .74) 27%, rgba(7, 22, 80, 0) 50%);
}
.js-pin .acts { position: absolute; left: var(--gutter); top: calc(50% + (var(--header) - var(--bar)) / 2); width: min(41vw, 41rem); height: 0; padding: 0; display: block; }
.js-pin .act {
  position: absolute; left: 0; right: 0; top: 0; transform: translateY(calc(-50% + 34px));
  opacity: 0; visibility: hidden; filter: blur(8px);
  transition: opacity .45s ease, transform .9s var(--ease), filter .6s ease, visibility 0s linear .45s;
}
.js-pin .act.is-past { transform: translateY(calc(-50% - 34px)); }
.js-pin .act.is-on { opacity: 1; visibility: visible; filter: none; transform: translateY(-50%); transition-delay: .1s, .1s, .1s, 0s; }

.js-pin .record {
  position: absolute; z-index: var(--z-copy); right: var(--gutter); top: calc(50% + (var(--header) - var(--bar)) / 2); margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 34px)) scale(.97);
  transition: opacity .45s ease, transform .9s var(--ease), visibility 0s linear .45s;
}
.js-pin .stage[data-act="4"] .record { opacity: 1; visibility: visible; transform: translateY(-50%); transition-delay: .15s, .15s, 0s; }
.js-pin .record li { opacity: .16; transition: opacity .45s; }
.js-pin .stage[data-act="4"] .record li { opacity: 1; }
.js-pin .stage[data-act="4"] .record li:nth-child(1) { transition-delay: .3s; }
.js-pin .stage[data-act="4"] .record li:nth-child(2) { transition-delay: .5s; }
.js-pin .stage[data-act="4"] .record li:nth-child(3) { transition-delay: .7s; }
.js-pin .stage[data-act="4"] .record li:nth-child(4) { transition-delay: .9s; }

.js-pin .rail {
  position: absolute; z-index: var(--z-copy); left: var(--gutter); bottom: calc(clamp(1rem, 3.6vh, 2.25rem) + var(--bar));
  display: grid; grid-template-columns: repeat(4, minmax(5.6rem, 1fr)); opacity: 0; transition: opacity .35s;
}
.js-pin .stage:not([data-act="0"]) .rail { opacity: 1; }
.js-pin .stage[data-act="0"] .rail { visibility: hidden; }
.rail__track { position: absolute; left: 0; right: 0; top: .3rem; height: 2px; background: rgba(213, 223, 251, .26); }
.rail__track i { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }
.rail button {
  min-height: 2.75rem; padding: .95rem .1rem 0; background: none; border: 0; color: var(--on-blue);
  font-size: .84rem; font-weight: 560; line-height: 1.2; text-align: left; cursor: pointer; transition: color .25s;
}
.rail button.is-done, .rail button:hover { color: var(--white); }
.rail button:focus-visible { outline-color: var(--white); }

/* phones and portrait tablets */
@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  .js-pin .reel { height: 460vh; }
  .js-pin .act, .js-pin .act.is-past { filter: none; }
  .js-pin .scrim { background: linear-gradient(0deg, #071650 0%, #071650 35%, rgba(7, 22, 80, .74) 47%, rgba(7, 22, 80, 0) 60%); }
  .js-pin .acts { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: calc(4.1rem + env(safe-area-inset-bottom) + var(--bar)); }
  .js-pin .act, .js-pin .act.is-past, .js-pin .act.is-on { top: auto; bottom: 0; }
  .js-pin .act { transform: translateY(24px); }
  .js-pin .act.is-past { transform: translateY(-24px); }
  .js-pin .act.is-on { transform: none; }
  .js-pin .act--hero { bottom: -3rem; }
  .act__cta { flex-wrap: nowrap; gap: .6rem; }
  .act__cta .btn { flex: 1 1 0; min-width: 0; min-height: 3rem; padding-inline: .5rem; font-size: .88rem; white-space: nowrap; }
  .act h3 { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .act:not(.act--hero) > p:last-child { margin-top: .55rem; font-size: .98rem; line-height: 1.48; }
  .act .act__count { margin-bottom: .2rem; font-size: .85rem; }
  .js-pin .rail { left: var(--gutter); right: var(--gutter); bottom: calc(.6rem + env(safe-area-inset-bottom) + var(--bar)); grid-template-columns: repeat(4, 1fr); }
  .rail button { min-width: 0; font-size: .78rem; }
  .js-pin .record {
    left: 50%; right: auto; top: auto; bottom: calc(4.1rem + 11.25rem + env(safe-area-inset-bottom) + var(--bar)); width: min(100% - 2rem, 21rem);
    padding: .75rem .95rem .6rem; transform: translate(-50%, 18px);
  }
  .js-pin .stage[data-act="4"] .record { transform: translate(-50%, 0); }
  .record__title { font-size: .98rem; }
  .record ol { margin-top: .35rem; }
  .record li { padding: .3rem 0 .3rem 1.5rem; }
  .record li::before { top: .5rem; }
  .record li b { display: inline; font-size: .86rem; }
  .record li span { display: none; }
  .record__for { padding-top: .4rem; font-size: .74rem; }
  .record__note { margin-top: .1rem; font-size: .69rem; }
  .mark, .lock b { font-size: .72rem; }
  .lock { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}
@media (max-height: 700px) and (max-width: 860px) {
  .act__more { display: none; }
  .act h1 { font-size: 2.2rem; }
  .act__lede { margin-top: .7rem; font-size: .98rem; }
  .act__cta { margin-top: .95rem; }
  .act__cta .btn { min-height: 2.9rem; padding-inline: .95rem; font-size: .9rem; }
}
@media (max-height: 700px) and (max-width: 700px) {
  .js-pin .record { bottom: calc(4.1rem + 10.5rem + env(safe-area-inset-bottom) + var(--bar)); padding-block: .5rem .4rem; }
  .record__title { font-size: .92rem; }
  .record li { padding-block: .14rem; }
  .record li::before { top: .32rem; }
  .record__for { display: none; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .js-pin .reel { height: 460vh; }
  .js-pin .act, .js-pin .act.is-past { filter: none; }
  .act__more, .act .act__count, .js-pin .rail, .record__for, .record span { display: none; }
  .js-pin .acts { width: 36vw; }
  .act h1 { font-size: clamp(1.7rem, 4.2vw, 2.3rem); }
  .act h3 { font-size: 1.9rem; }
  .act__lede, .act:not(.act--hero) > p:last-child { margin-top: .45rem; font-size: .9rem; line-height: 1.42; }
  .act__cta { margin-top: .7rem; }
  .act__cta .btn { min-height: 2.75rem; padding: .4rem .8rem; font-size: .82rem; }
  .js-pin .record { width: 13.5rem; padding: .6rem .8rem .45rem; }
  .record__title { font-size: .92rem; }
  .record ol { margin-top: .3rem; }
  .record li { padding: .18rem 0 .18rem 1.4rem; }
  .record li::before { top: .38rem; }
  .record b { font-size: .8rem; }
  .record__note { margin-top: .15rem; font-size: .69rem; }
}
