/* =====================================================================
   Hero + scroll story (3D piling site behind, chapters on top)
   Loaded after style.css; uses its tokens (--ink, --orange, --f-display ...)
   ===================================================================== */
.story { position: relative; color: var(--white); background: var(--ink); }

/* the 3D stage is pinned behind everything while the story scrolls */
.story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0; background: var(--ink); }
.story-fallback { position: absolute; inset: 0; transition: opacity .9s ease; }
.story-fallback img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; animation: heroIn 2.4s var(--ease) both; }
.story-fallback::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 15, 28, .55) 0%, rgba(10, 15, 28, .1) 35%, rgba(10, 15, 28, .78) 100%); }
.story-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.story.is-live .story-canvas { opacity: 1; }
.story.is-live .story-fallback { opacity: 0; }

/* the steps scroll over the pinned stage */
.story-steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; }

/* ---------- hero step ---------- */
.step-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; }
.step-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(10, 15, 28, .72) 0%, rgba(10, 15, 28, .38) 42%, rgba(10, 15, 28, 0) 72%),
                linear-gradient(180deg, rgba(10, 15, 28, .55) 0%, rgba(10, 15, 28, .04) 34%, rgba(10, 15, 28, .5) 100%); }
.story.is-live .story-fallback { visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.scroll-cue { position: absolute; right: var(--gut); bottom: 34px; display: flex; align-items: center; gap: 14px; margin: 0; font-weight: 500; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2); }
.scroll-cue i { position: relative; width: 2px; height: 38px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--orange); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

/* ---------- chapters ---------- */
.step-c { position: relative; height: 100vh; height: 100svh; }
.panel { position: relative; height: 100%; display: flex; align-items: center; padding: calc(var(--nav-h) + 24px) var(--gut) 56px; pointer-events: none; }
.panel::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(10, 15, 28, .92) 0%, rgba(10, 15, 28, .74) 30%, rgba(10, 15, 28, 0) 64%); }
.panel-in { position: relative; max-width: 36rem; display: flex; flex-direction: column; gap: 18px; pointer-events: auto; }
/* the text builds in each time its chapter comes on screen */
.step-c .panel-in > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s var(--ease); }
.step-c.is-active .panel-in > * { opacity: 1; transform: none; }
.step-c.is-active .panel-in > :nth-child(2) { transition-delay: .08s; }
.step-c.is-active .panel-in > :nth-child(3) { transition-delay: .16s; }
.step-c.is-active .panel-in > :nth-child(4) { transition-delay: .26s; }
.step-c.is-active .panel-in > :nth-child(5) { transition-delay: .34s; }
.step-c.is-active .panel-in > :nth-child(6) { transition-delay: .42s; }
.kicker { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.kicker b { display: grid; place-items: center; min-width: 2.2em; height: 2.2em; padding: 0 .5em; background: var(--orange); color: var(--ink); font-weight: 700; letter-spacing: 0; }
.panel .h2 { color: var(--white); max-width: 12ch; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.panel .lead { color: rgba(243, 245, 250, .9); max-width: 40ch; font-size: clamp(1.02rem, 1.25vw, 1.2rem); }

.beats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.beats li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 14px 10px 12px; border-left: 4px solid rgba(255, 255, 255, .16); color: rgba(243, 245, 250, .5);
    transition: color .35s, border-color .35s, background .35s, opacity .35s; }
.beats li b { flex: 0 0 auto; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; color: inherit; }
.beats li span { line-height: 1.4; }
.beats li.on { color: var(--white); border-color: var(--orange); background: rgba(255, 106, 26, .12); }
.beats li.on b { color: var(--orange); }

.facts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 36px; }
.facts li { display: flex; flex-direction: column; }
.facts b { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1; color: var(--orange); }
.facts span { margin-top: 4px; font-size: .92rem; line-height: 1.3; color: var(--on-dark-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tags span { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .3); font-weight: 500; font-size: .92rem; }

/* ---------- fleet (the section that follows the story) ---------- */
#fleet { padding-top: clamp(72px, 9vw, 130px); }
#fleet .fleet { margin-top: 0; }

/* ---------- small screens: the scene goes to the top, text sits at the bottom ---------- */
@media (max-width: 900px) {
    .panel { align-items: flex-end; padding: calc(var(--nav-h) + 12px) var(--gut) 18px; }
    .panel::before { background: linear-gradient(0deg, rgba(10, 15, 28, .96) 0%, rgba(10, 15, 28, .86) 52%, rgba(10, 15, 28, 0) 100%); }
    .panel-in { max-width: none; gap: 10px; }
    .panel .h2 { font-size: clamp(2rem, 9vw, 3rem); max-width: 14ch; }
    .panel .lead { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .beats li:not(.on) { display: none; }
    .beats li { padding: 8px 12px; }
    .facts, .tags { display: none; }
    .scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .scroll-cue i::after { animation: none; }
    .story-fallback img { animation: none; }
}

/* ---------- page dots (intro, 01, 02, 03) ---------- */
.pager { position: fixed; z-index: 60; right: clamp(10px, 1.6vw, 26px); top: 50%; transform: translate(14px, -50%); display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .4s, transform .5s var(--ease); }
.pager.is-on { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.pager button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 34px; padding: 0 4px; background: none; border: 0; cursor: pointer; color: var(--white); }
.pager button span { font-family: var(--f-display); font-weight: 600; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; opacity: 0; transform: translateX(8px); transition: opacity .25s, transform .3s var(--ease); white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.pager button i { width: 12px; height: 12px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 50%; transition: background .3s, border-color .3s, transform .3s var(--ease); }
.pager button:hover span, .pager button.on span { opacity: 1; transform: none; }
.pager button.on i { background: var(--orange); border-color: var(--orange); transform: scale(1.35); }
@media (max-width: 900px) { .pager { right: 8px; } .pager button span { display: none; } }
