/* ============================================================
   SERVEQUE — "The Launch" : full-page continuous scroll story
   Works on desktop AND mobile. Static hero only as no-JS fallback.
   ============================================================ */

.mission{ position:relative; background:#05070F; }
.mission-stage{ position:relative; height:100svh; height:100dvh; overflow:hidden; }

/* ---- Backdrops (full-bleed, cross-faded by JS) ---- */
.bd{ position:absolute; inset:0; opacity:0; z-index:1; will-change:opacity; }
.bd img{ width:100%; height:100%; object-fit:cover; }
.bd-pad{ opacity:1; }
.bd-pad img{ object-position:center bottom; }
.bd-sky img,.bd-high img{ object-position:center; }
.bd-earth img{ object-position:center bottom; }
.bd-moon img{ object-position:center bottom; }
.bd-vignette{ position:absolute; inset:0; z-index:2; pointer-events:none;
  background:radial-gradient(120% 90% at 50% 35%, transparent 55%, rgba(3,5,12,.55) 100%); }
/* mobile legibility scrim (below rocket, below text) */
.mission-stage::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:52%; z-index:3; pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(3,5,12,.82)); display:none; }

.fx{ position:absolute; inset:0; z-index:5; pointer-events:none; }

/* ---- Rocket (realistic cutout) ---- */
.rocket{ position:absolute; left:50%; bottom:11%; width:clamp(180px,22vw,314px); z-index:4;
  transform:translate(-50%, var(--ry,0px)) scale(var(--rs,1)); will-change:transform,opacity; }
.rocket-inner{ position:relative; }
.rocket-inner img{ width:100%; display:block; filter:drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.rocket-inner.shake{ animation:rkjit .06s infinite linear; }
@keyframes rkjit{ 0%{transform:translate(0,0)} 25%{transform:translate(-1.6px,1px)} 50%{transform:translate(1.6px,-1px)} 75%{transform:translate(-1px,-1.4px)} 100%{transform:translate(0,0)} }
.exhaust{ position:absolute; top:97%; left:50%; width:120%; height:160px; transform:translateX(-50%) scaleY(var(--ex,0)); transform-origin:top center;
  opacity:var(--exo,0); pointer-events:none;
  background:radial-gradient(50% 42% at 50% 6%, #fff 0%, #CFE9FF 22%, #5AB4E8 48%, rgba(46,111,176,0) 78%);
  filter:blur(6px); }

/* ---- Planted flag (finale) ---- */
.mflag{ position:absolute; left:72%; bottom:22%; transform:translateX(-50%); z-index:4; opacity:0; }
.mflag-pole{ width:3px; height:150px; margin-left:18px; background:linear-gradient(#e6f0fb,#7f93b3); border-radius:3px; }
.mflag-cloth{ position:absolute; top:4px; left:18px; width:max-content; display:inline-flex; align-items:center; gap:9px; padding:10px 24px 10px 16px;
  border-radius:5px; background:rgba(17,26,51,.96); border:1px solid var(--blue); box-shadow:0 0 30px rgba(90,180,232,.5); white-space:nowrap; }
.mflag-cloth img{ width:22px; height:22px; border-radius:5px; flex:none; background:#fff; padding:2px; object-fit:contain; }
.mflag-cloth span{ font-family:var(--font-head); font-weight:700; color:#fff; font-size:1rem; line-height:1; }

/* ---- Narrative ---- */
.mission-copy{ position:absolute; inset:0; z-index:8; pointer-events:none; display:none; }
.cinematic .mission-copy{ display:block; }
.mstep{ position:absolute; left:max(var(--gutter), calc((100vw - 1400px) / 2 + var(--gutter))); bottom:15%; width:min(480px, 86vw);
  opacity:0; transform:translateY(26px); transition:opacity .55s var(--ease), transform .55s var(--ease); }
.mstep.is-active{ opacity:1; transform:none; }
.mstep.is-active .btn{ pointer-events:auto; }
.mstep-no{ display:inline-block; font-family:var(--font-head); font-size:.72rem; font-weight:600; letter-spacing:.16em; text-transform:uppercase; color:var(--blue); margin-bottom:13px; }
.mstep h2{ font-size:clamp(1.9rem,4.2vw,3.1rem); color:#fff; line-height:1.05; margin-bottom:13px; text-shadow:0 2px 30px rgba(0,0,0,.55); }
.mstep p{ font-size:clamp(.98rem,1.5vw,1.1rem); color:var(--off-white); text-shadow:0 1px 16px rgba(0,0,0,.6); }

/* sub-content inside beats */
.mlist{ display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.mlist .mitem{ display:flex; gap:12px; align-items:flex-start; }
.mlist .mitem b{ font-family:var(--font-head); color:#fff; font-size:1rem; min-width:0; }
.mlist .mitem span{ color:var(--off-white); font-size:.9rem; }
.mlist .mdot{ width:8px; height:8px; border-radius:50%; background:var(--blue); margin-top:7px; flex:none; box-shadow:0 0 10px var(--blue); }
.mstats{ display:flex; flex-wrap:wrap; gap:22px 30px; margin-top:20px; }
.mstats div strong{ display:block; font-family:var(--font-head); font-size:clamp(1.8rem,3.4vw,2.6rem); color:#fff; line-height:1; }
.mstats div span{ font-size:.82rem; color:var(--muted); }
.mquote{ margin-top:16px; border-left:2px solid var(--blue); padding-left:16px; }
.mquote p{ font-size:1.02rem; color:#fff; margin-bottom:8px; }
.mquote cite{ font-style:normal; color:var(--muted); font-size:.85rem; }
.mstep .btn{ margin-top:24px; pointer-events:none; }

/* finale — sits in the upper third so the landed rocket + flag are clear below it */
.mstep-final{ left:50%; right:auto; bottom:auto; top:32%; width:min(640px,90vw); text-align:center;
  transform:translate(-50%, calc(-50% + 26px)); }
.mstep-final.is-active{ transform:translate(-50%,-50%); }
.mstep-final p{ margin-left:auto; margin-right:auto; max-width:46ch; }

/* progress bar */
.mission-prog{ position:absolute; right:24px; top:50%; transform:translateY(-50%); z-index:8; width:3px; height:200px;
  background:rgba(180,205,235,.16); border-radius:3px; overflow:hidden; display:none; }
.cinematic .mission-prog{ display:block; }
.mission-prog i{ position:absolute; left:0; top:0; width:100%; height:0%; background:linear-gradient(var(--blue-hi),var(--blue)); box-shadow:0 0 12px rgba(90,180,232,.7); }
.mission-chapter{ position:absolute; right:34px; top:50%; transform:translateY(-50%); z-index:8; display:none;
  writing-mode:vertical-rl; font-family:var(--font-head); font-size:.66rem; letter-spacing:.22em; text-transform:uppercase; color:var(--muted); }
.cinematic .mission-chapter{ display:block; }

.mission-hint{ position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:8; display:none;
  font-family:var(--font-head); font-size:.66rem; letter-spacing:.22em; text-transform:uppercase; color:var(--muted); }
.cinematic .mission-hint{ display:block; }

/* ---- Static fallback (no JS / reduced motion) ---- */
.static-hero{ position:absolute; inset:0; z-index:9; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:90px var(--gutter) 60px; }
.cinematic .static-hero{ display:none; }
.static-hero h1{ font-size:clamp(2.6rem,8vw,4.4rem); color:#fff; line-height:1; letter-spacing:-.03em; margin:22px 0 18px; }
.static-hero h1 em{ color:var(--blue); }
.static-hero p{ font-size:1.05rem; color:var(--off-white); max-width:48ch; margin-bottom:30px; }
.static-hero .hero-actions{ justify-content:center; }

@media (prefers-reduced-motion:reduce){ .rocket-inner.shake{ animation:none; } }

/* ---- Mobile : keep the cinematic, restyle copy ---- */
@media (max-width:780px){
  .mission-stage::after{ display:block; }
  /* portrait launchpad with a clear ground (mobile only) */
  .bd-pad img{ content:url("/assets/images/lp-pad-m.jpg"); object-position:center bottom; }
  .mstep{ left:0; right:0; width:auto; padding:0 20px; bottom:7%; text-align:center; }
  /* readable over the blue ignition flame: white eyebrow + strong halos */
  .mstep-no{ margin-bottom:9px; color:#fff; text-shadow:0 0 9px rgba(0,0,0,.95), 0 2px 14px rgba(0,0,0,.75); }
  .mstep h2{ font-size:clamp(1.6rem,6.6vw,2.1rem); text-shadow:0 2px 16px rgba(0,0,0,.92), 0 0 7px rgba(0,0,0,.6); }
  .mstep .hero-sub,.mstep p{ font-size:.94rem; text-shadow:0 1px 14px rgba(0,0,0,.92); }
  .exhaust{ height:104px; }
  .mlist{ gap:9px; margin-top:14px; align-items:center; }
  .mlist .mitem{ justify-content:center; text-align:left; }
  .mlist .mitem span{ font-size:.85rem; }
  .mstats{ justify-content:center; gap:14px 24px; margin-top:16px; }
  .mquote{ border-left:none; padding-left:0; }
  .mstep .btn{ margin-top:18px; }
  .mstep-final{ top:40%; left:0; right:0; width:auto; transform:translateY(calc(-50% + 22px)); }
  .mstep-final.is-active{ transform:translateY(-50%); }
  .mission-prog,.mission-chapter{ display:none !important; }
  /* rocket standing on the launch deck — lower so it sits closer to the text */
  .rocket{ width:min(214px,56vw); bottom:28%; }
  /* flag: compact, lower-left foreground so it never runs off-screen */
  .mflag{ left:16px; right:auto; transform:none; bottom:9%; z-index:7; }
  .mflag-pole{ margin-left:0; height:104px; }
  .mflag-cloth{ left:0; right:auto; top:2px; padding:7px 13px; }
  .mflag-cloth img{ width:18px; height:18px; }
  .mflag-cloth span{ font-size:.82rem; }
}
