/* ══════════════════════════════════════════════════════════════════
   ADFLIKER — "The Conversation" scroll movie
   One WhatsApp conversation, told from the customer's phone, driven by
   scroll from the hero all the way to the Meta conversion.

   Layout model: the phone is position:sticky (NOT ScrollTrigger-pinned).
   Sticky keeps the visitor in normal scroll flow — they can always leave —
   while the conversation is scrubbed by their scroll position.

   Sections
     1. Grid + sticky stage
     2. The phone
     3. Chat bubbles
     4. Scene overlays (CRM, qualified badge, handoff, notifications)
     5. Finale
     6. Captions
     7. Responsive
     8. Accessibility / fallbacks
   ══════════════════════════════════════════════════════════════════ */

#story {
  --mv-green: #22c55e;
  --mv-green-600: #16a34a;
  --mv-teal: #14b8a6;
  --mv-wa: #25d366;
  --mv-out: #dcf8c6;
  /* customer bubble */
  --mv-in: #ffffff;
  /* Adfliker bubble */
  --mv-paper: #ece5dd;
  /* WhatsApp chat paper */
  --mv-ink: #0f172a;
  --mv-muted: #64748b;
  --mv-nav: 88px;
  --mv-phone-h: 540px;
}

/* ──────────────────────────────────────────────────────────────
   1. GRID + STICKY STAGE
   Desktop: copy and captions stack in column 1, phone sticks in column 2.
   Mobile: plain block flow so the phone can stick over the captions.
   ────────────────────────────────────────────────────────────── */
.mv-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  grid-template-areas:
    "copy phone"
    "caps phone";
  column-gap: 4rem;
  align-items: start;
}

.mv-copy {
  grid-area: copy;
  position: relative;
  z-index: 2;
}

.mv-captions {
  grid-area: caps;
}

.mv-sticky {
  grid-area: phone;
  position: sticky;
  top: var(--mv-nav);
  align-self: start;
  z-index: 1;
}

.mv-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

/* Ambient brand glow behind the phone */
.mv-aura {
  position: absolute;
  z-index: 0;
  top: 6%;
  left: 50%;
  width: 118%;
  height: 84%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(34, 197, 94, .26) 0%, rgba(20, 184, 166, .12) 48%, rgba(34, 197, 94, 0) 74%);
  filter: blur(30px);
  pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────
   2. THE PHONE
   ────────────────────────────────────────────────────────────── */
.mv-phone {
  position: relative;
  z-index: 1;
  width: 300px;
  max-width: 100%;
  height: var(--mv-phone-h);
  background: #0b1220;
  border-radius: 42px;
  padding: 10px;
  box-shadow:
    0 40px 80px -30px rgba(15, 23, 42, .55),
    0 0 0 1px rgba(15, 23, 42, .06),
    inset 0 0 0 2px rgba(255, 255, 255, .08);
  will-change: transform, opacity;
}

.mv-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 22px;
  background: #0b1220;
  border-radius: 0 0 14px 14px;
  z-index: 4;
}

.mv-screen {
  position: relative;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--mv-paper);
  display: flex;
  flex-direction: column;
}

/* ── WhatsApp header ── */
.mv-top {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 26px 12px 10px;
  background: #f6f6f6;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.mv-top-back {
  font-size: 17px;
  line-height: 1;
  color: #0ea5e9;
  flex-shrink: 0;
}

.mv-top-av {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

/* The avatar that fades in during the AI → human handoff */
.mv-top-av2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: linear-gradient(135deg, var(--mv-green), var(--mv-teal));
  opacity: 0;
}

/* A static ring, faded in/out via opacity — not an animated box-shadow.
   box-shadow isn't GPU-composited, so changing it repaints every frame;
   a pre-drawn border that only fades is composite-only, like everything
   else in this file. */
.mv-top-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid rgba(34, 197, 94, .38);
  opacity: 0;
  pointer-events: none;
}

.mv-top-txt {
  position: relative;
  min-width: 0;
  flex: 1;
  line-height: 1.15;
}

/* The agent's name cross-fades over the assistant's during the handoff.
   Both spans must fade in lockstep (one out as the other in) — see the
   paired tweens in story.js. Left visible on its own, either one leaves
   overlapping text (this was a shipped bug: name1 never faded out). */
.mv-top-name2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
}

.mv-top-name {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-top-sub {
  display: block;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  color: #16a34a;
  margin-top: 1px;
}

.mv-top-tag {
  flex-shrink: 0;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mv-green-600);
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 999px;
  padding: 3px 6px;
  opacity: 0;
}

/* ── Chat area ── */
.mv-chat {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 0 9px;
}

.mv-msgs {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 10px;
  will-change: transform;
}

/* ── Composer ── */
.mv-input {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px 14px;
  background: #f6f6f6;
  border-top: 1px solid rgba(15, 23, 42, .06);
}

.mv-input span {
  flex: 1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 10.5px;
  color: #9ca3af;
  font-weight: 500;
}

.mv-input em {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--mv-wa);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ──────────────────────────────────────────────────────────────
   3. CHAT BUBBLES
   ────────────────────────────────────────────────────────────── */
.mv-msg {
  position: relative;
  max-width: 84%;
  padding: 6px 9px 5px;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.42;
  font-weight: 500;
  color: #111b21;
  box-shadow: 0 1px 1px rgba(11, 20, 26, .13);
  white-space: pre-line;
}

/* Customer (this phone's owner) — right, green */
.mv-msg--out {
  align-self: flex-end;
  background: var(--mv-out);
  border-top-right-radius: 2px;
}

/* Adfliker AI / human agent — left, white */
.mv-msg--in {
  align-self: flex-start;
  background: var(--mv-in);
  border-top-left-radius: 2px;
}

.mv-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 2px;
  font-size: 8px;
  font-weight: 600;
  color: #667781;
}

.mv-meta svg {
  width: 12px;
  height: 12px;
  color: #53bdeb;
}

/* Typing indicator is absolute inside the list: it rides along with the
   auto-scroll but never takes flow space, so message offsets stay stable. */
.mv-typing {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--mv-in);
  border-radius: 9px;
  border-top-left-radius: 2px;
  padding: 8px 10px;
  box-shadow: 0 1px 1px rgba(11, 20, 26, .13);
  opacity: 0;
}

.mv-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa6ac;
  display: block;
  animation: mv-type 1.2s ease-in-out infinite;
}

.mv-typing i:nth-child(2) {
  animation-delay: .16s;
}

.mv-typing i:nth-child(3) {
  animation-delay: .32s;
}

@keyframes mv-type {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .45;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ──────────────────────────────────────────────────────────────
   4. SCENE OVERLAYS
   ────────────────────────────────────────────────────────────── */

/* — Scene 3: the address drops into the CRM — */
.mv-crm {
  position: absolute;
  z-index: 5;
  left: -34px;
  top: 46%;
  width: 168px;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 14px;
  padding: 9px 11px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35);
  opacity: 0;
}

.mv-crm-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
}

.mv-crm-arrow {
  display: block;
  text-align: center;
  font-size: 9px;
  color: #cbd5e1;
  line-height: 1;
  margin: 3px 0;
}

.mv-crm-done {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--mv-green-600);
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 7px;
  padding: 4px 7px;
}

/* — Scene 4: qualified lead — */
.mv-badge {
  position: absolute;
  z-index: 5;
  right: -26px;
  top: 30%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--mv-green-600), var(--mv-teal));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(22, 163, 74, .7);
  opacity: 0;
}

.mv-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* — Scene 5: the handoff — */
.mv-handoff {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 42%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .93);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 46px -16px rgba(15, 23, 42, .7);
  opacity: 0;
}

.mv-handoff-ico {
  font-size: 22px;
  line-height: 1.1;
}

.mv-handoff-arrow {
  font-size: 11px;
  color: var(--mv-green);
  line-height: 1;
}

/* — Scene 5: team notification — */
.mv-notif {
  position: absolute;
  z-index: 6;
  right: -40px;
  top: 8%;
  width: 186px;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 20px 44px -16px rgba(15, 23, 42, .4);
  opacity: 0;
}

/* Amber, not alarm-red: this is a routine handoff inside a success story,
   not an error state — red read as "something's wrong" against the rest
   of the movie's calm green palette. */
.mv-notif-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b45309;
  margin-bottom: 4px;
}

.mv-notif-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  display: block;
}

.mv-notif-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, .5);
  animation: mv-notif-ping 1.8s ease-out infinite;
}

@keyframes mv-notif-ping {
  0% {
    transform: scale(.6);
    opacity: .9;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.mv-notif-n {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

/* "Assigning…" and "Assigned to Manav Patel" occupy the SAME slot and
   cross-fade — one card, one continuous read, instead of the old design
   where the assignment line stacked below on a dashed divider. */
.mv-notif-row {
  position: relative;
  margin-top: 5px;
  min-height: 16px;
}

.mv-notif-s,
.mv-notif-assign {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.mv-notif-s {
  color: var(--mv-muted);
}

.mv-notif-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.mv-notif-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--mv-muted);
  display: block;
  animation: mv-notif-dot-pulse 1.3s ease-in-out infinite;
}

.mv-notif-dots i:nth-child(2) {
  animation-delay: .15s;
}

.mv-notif-dots i:nth-child(3) {
  animation-delay: .3s;
}

@keyframes mv-notif-dot-pulse {

  0%,
  60%,
  100% {
    opacity: .3;
  }

  30% {
    opacity: 1;
  }
}

.mv-notif-assign {
  font-weight: 800;
  color: var(--mv-green-600);
  opacity: 0;
}

.mv-notif-av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mv-green), var(--mv-teal));
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* — Scene 5: push notification on the phone — */
.mv-toast {
  position: absolute;
  z-index: 7;
  left: 14px;
  right: 14px;
  top: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .5);
  opacity: 0;
}

.mv-toast-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--mv-wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}

.mv-toast-t {
  display: block;
  font-size: 9.5px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.mv-toast-s {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--mv-muted);
}

/* ──────────────────────────────────────────────────────────────
   5. FINALE — deal won → Meta → campaign learns
   ────────────────────────────────────────────────────────────── */
.mv-final {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  border-radius: 42px;
  background: linear-gradient(165deg, rgba(15, 23, 42, .97), rgba(6, 78, 59, .97));
  opacity: 0;
  pointer-events: none;
}

.mv-final-won {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--mv-green), var(--mv-teal));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 16px 34px -12px rgba(34, 197, 94, .8);
}

.mv-final-step {
  width: 100%;
  text-align: center;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #d1fae5;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .01em;
  opacity: 0;
}

.mv-final-arrow {
  color: rgba(255, 255, 255, .35);
  font-size: 10px;
  line-height: 1;
  opacity: 0;
}

.mv-final-boom {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  line-height: 1.35;
  opacity: 0;
}

.mv-final-boom b {
  color: #6ee7b7;
}

/* ──────────────────────────────────────────────────────────────
   6. SCENE CAPTIONS (left column)
   Each caption owns a screenful of scroll — that runway is what the
   conversation is scrubbed against.
   ────────────────────────────────────────────────────────────── */
.mv-cap {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 30rem;
  padding: 2rem 0;
}

.mv-cap-n {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--mv-green-600);
  margin-bottom: 14px;
}

.mv-cap-n i {
  width: 22px;
  height: 1px;
  background: var(--mv-green);
  display: block;
}

.mv-cap-h {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--mv-ink);
  margin-bottom: 12px;
}

.mv-cap-p {
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 500;
  color: var(--mv-muted);
}

/* ──────────────────────────────────────────────────────────────
   7. RESPONSIVE
   ────────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {

  /* Block flow so the sticky phone can travel over the captions below it */
  .mv-grid {
    display: block;
  }

  .mv-sticky {
    position: sticky;
    top: 76px;
    margin: 2.5rem auto 0;
    width: fit-content;
  }

  .mv-cap {
    min-height: 74vh;
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
    align-items: center;
  }

  /* Overlays pull inside the phone so nothing can overflow the viewport */
  .mv-crm {
    left: 4px;
    width: 150px;
  }

  .mv-notif {
    right: 4px;
    width: 168px;
  }

  .mv-badge {
    right: 2px;
  }
}

@media (max-width: 640px) {
  #story {
    --mv-phone-h: 430px;
  }

  .mv-phone {
    width: 258px;
    border-radius: 36px;
    padding: 8px;
  }

  .mv-screen {
    border-radius: 29px;
  }

  .mv-final {
    border-radius: 36px;
  }

  .mv-msg {
    font-size: 10.5px;
  }

  .mv-crm {
    width: 138px;
    left: -2px;
  }

  .mv-notif {
    width: 156px;
    right: -2px;
  }

  .mv-aura {
    display: none;
  }
}

/* ──────────────────────────────────────────────────────────────
   8. ACCESSIBILITY / FALLBACKS
   `.mv-js` is set by an inline guard and removed if GSAP never loads,
   which reveals the whole conversation as a plain readable transcript.
   ────────────────────────────────────────────────────────────── */
.mv-js #story .mv-msg,
.mv-js #story .mv-typing {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

  #story *,
  #story *::before,
  #story *::after {
    animation: none !important;
    transition: none !important;
  }

  .mv-js #story .mv-msg {
    opacity: 1 !important;
  }

  .mv-js #story .mv-typing,
  #story .mv-typing {
    display: none !important;
  }

  /* Static transcript: let the chat grow instead of scrolling under script */
  #story .mv-sticky {
    position: static;
  }

  #story .mv-phone {
    height: auto;
    min-height: 420px;
  }

  #story .mv-chat {
    overflow: visible;
    min-height: 340px;
  }

  #story .mv-msgs {
    position: static;
    transform: none !important;
  }

  #story .mv-crm,
  #story .mv-badge,
  #story .mv-notif,
  #story .mv-notif-assign {
    opacity: 1 !important;
  }

  /* Transient/decorative overlays with no unique content (handoff icons,
     the phone-buzz toast — both already said by the transcript and the
     notif card) are dropped; they'd otherwise cover the transcript with
     nothing able to animate away. The finale is NOT dropped — it carries
     real content (Deal Won → Meta CAPI → Facebook Learning) that reduced-
     motion visitors still need to receive, so it's un-overlaid into a
     plain block instead of hidden outright. */
  #story .mv-handoff,
  #story .mv-toast,
  /* Superseded by its resolved state below — see .mv-notif-s note. */
  #story .mv-top-tag {
    display: none !important;
  }

  /* The header must land on ONE resolved state (human agent), not both —
     showing name1+name2 or the AI tag alongside "Manav" reproduces the
     exact overlapping-text bug the JS crossfade exists to avoid. */
  #story .mv-top-name:not(.mv-top-name2) {
    display: none !important;
  }

  #story .mv-top-name2,
  #story .mv-top-av2 {
    opacity: 1 !important;
  }

  /* Same reasoning for the notification card's status line — it resolved
     to "Assigned", so the transient "Assigning…" line is redundant. */
  #story .mv-notif-s {
    display: none !important;
  }

  #story .mv-final {
    position: static !important;
    inset: auto;
    opacity: 1 !important;
    margin-top: 12px;
    border-radius: 20px;
  }

  #story .mv-final-step,
  #story .mv-final-arrow,
  #story .mv-final-boom {
    opacity: 1 !important;
  }

  #story .mv-cap {
    min-height: 0;
    padding: 1.5rem 0;
  }
}

/* No-JS / dead-CDN: same static transcript treatment */
html:not(.mv-js) #story .mv-sticky {
  position: static;
}

html:not(.mv-js) #story .mv-phone {
  height: auto;
  min-height: 430px;
}

html:not(.mv-js) #story .mv-chat {
  overflow: visible;
  min-height: 350px;
}

html:not(.mv-js) #story .mv-msgs {
  position: static;
}

html:not(.mv-js) #story .mv-typing,
html:not(.mv-js) #story .mv-handoff,
html:not(.mv-js) #story .mv-toast,
/* Superseded by its resolved state below — see .mv-notif-s note. */
html:not(.mv-js) #story .mv-top-tag {
  display: none;
}

/* Same reasoning as the reduced-motion block above: the finale carries
   content, not just decoration, so it un-overlays instead of hiding. */
html:not(.mv-js) #story .mv-final {
  position: static;
  inset: auto;
  opacity: 1;
  margin-top: 12px;
  border-radius: 20px;
}

/* One resolved header state (human agent) — see the matching reduced-
   motion rule above for why both names can never be shown at once. */
html:not(.mv-js) #story .mv-top-name:not(.mv-top-name2) {
  display: none;
}

html:not(.mv-js) #story .mv-top-name2,
html:not(.mv-js) #story .mv-top-av2 {
  opacity: 1;
}

html:not(.mv-js) #story .mv-notif-s {
  display: none;
}

html:not(.mv-js) #story .mv-crm,
html:not(.mv-js) #story .mv-badge,
html:not(.mv-js) #story .mv-notif,
html:not(.mv-js) #story .mv-notif-assign,
html:not(.mv-js) #story .mv-final-step,
html:not(.mv-js) #story .mv-final-arrow,
html:not(.mv-js) #story .mv-final-boom {
  opacity: 1;
}

html:not(.mv-js) #story .mv-cap {
  min-height: 0;
  padding: 1.75rem 0;
}

/* ──────────────────────────────────────────────────────────────
   9. LOW-POWER MODE
   `.mv-lite` is set by story.js on weak CPU/RAM/save-data devices.
   filter/backdrop-filter are expensive to paint and composite — drop
   them; the choreography itself (transform/opacity) is unaffected.
   ────────────────────────────────────────────────────────────── */
.mv-lite #story .mv-aura {
  display: none;
}

.mv-lite #story .mv-handoff,
.mv-lite #story .mv-toast {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(15, 23, 42, .97);
}

/* ──────────────────────────────────────────────────────────────
   10. IDLE PAUSE — off-screen or tab hidden
   A handful of CSS `infinite` loops (typing dots, notification ping)
   live inside elements that are opacity:0 most of the time, but a
   paused CSS animation keeps ticking even while invisible. story.js
   toggles `.mv-idle` on <html> via IntersectionObserver + the page
   visibility API so they truly stop costing anything when nobody
   can see them.
   ────────────────────────────────────────────────────────────── */
.mv-idle #story .mv-typing i,
.mv-idle #story .mv-notif-dot::after,
.mv-idle #story .mv-notif-dots i {
  animation-play-state: paused;
}
