/* ============================================================================
   story-stage.css — the Story page's looping hero phone, for the home page.
   A copy of the stage + .story-emu rules in css/the-story.css, which the Story
   page keeps loading on its own; the home page can't load the-story.css whole
   because it also restyles the nav, body and hero. js/story-emulator.js drives
   both pages and finds its phone by .story-stage / #story-emu.
   ========================================================================== */

/* Column that stacks the phone and the use-cases link beneath it. */
.story-stage-col {
  justify-self: center;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(18px, 2.4vw, 30px);
}
.story-stage {
  perspective: 1600px;                 /* 3D context the .iphone-frame spin needs */
  display: flex; align-items: center; justify-content: center;
}
/* Contextual CTA under the demo — glass pill. */
.story-stage-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--terracotta); text-decoration: none;
  font-size: .92rem; font-weight: 600;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .92);
  transition: background .18s ease, border-color .18s ease;
}
.story-stage-link:hover { background: #fff; border-color: #fff; }
.story-stage-link .mi { font-size: 20px; transition: transform .18s ease; }
.story-stage-link:hover .mi { transform: translateX(3px); }
.story-stage .iphone-screen { display: flex; flex-direction: column; background: #ECE5DD; }

/* Live scenario-player emulator embedded in the phone. */
.story-emu { flex: 1 1 auto; min-height: 0; text-align: start; } /* home.css centres .hero text ≤768px */
.story-emu,
.story-emu .nui-wa-container { height: 100%; max-width: none; }
.story-emu .nui-wa-container { border-radius: 0; }
/* Drop the WhatsApp header clear of the iOS status bar (.iphone-status-bar is 46px). */
.story-emu .nui-wa-header { padding-top: 46px; }

/* Verified tick + "the customer picked this" selection highlights. */
.story-emu .nui-wa-verified { color: #25d366; font-size: .85em; margin-left: .15em; }
.story-emu .nui-wa-list-row.is-selected { background: rgba(37, 211, 102, .12); }
.story-emu .nui-wa-list-row.is-selected .nui-wa-list-row-title { font-weight: 600; color: #111b21; }
.story-emu .nui-wa-list-row.is-selected .nui-wa-list-row-arrow { display: none; }
.story-emu .nui-wa-list-row.is-selected::after {
  content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: #25d366; font-size: 1em; flex: 0 0 auto;
}
.story-emu .nui-wa-interactive-button.is-selected {
  background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .45); font-weight: 600;
}
.story-emu .nui-wa-interactive-button.is-selected .nui-wa-btn-icon::before { content: "\f00c"; color: #25d366; }
.story-emu .nui-wa-carousel-btn.is-selected { background: rgba(37, 211, 102, .14); font-weight: 600; }
.story-emu .nui-wa-carousel-btn.is-selected::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: #25d366; font-size: .85em;
}

@media (max-width: 860px) {
  .story-stage { margin-top: 12px; }
}
/* Mobile: demo.css (≤640px) turns .iphone-frame into a hidden fullscreen
   overlay for the old interactive emulator. The looping player is ambient, so
   on the home page it stays inline: undo the overlay and draw a smaller phone
   (300px wide fits a 320px viewport with gutters). The Story page doesn't load
   this file and keeps demo.css's mobile behaviour. */
@media (max-width: 640px) {
  .story-stage .iphone-frame {
    display: block; position: relative; inset: auto; z-index: auto;
    zoom: 1; width: 300px; height: 600px; margin: 0; padding: 10px;
    background: #0a0a0a; border-radius: 46px;
    box-shadow: 0 0 0 2px #222, 0 24px 48px -12px rgba(0,0,0,.6);
  }
  .story-stage .iphone-frame::before {
    display: block; top: 18px; width: 96px; height: 28px; border-radius: 16px;
  }
  .story-stage .iphone-screen { border-radius: 36px; clip-path: inset(0 round 36px); }
  .story-stage .iphone-status-bar { display: flex; height: 44px; padding: 0 26px; font-size: 14px; }
  .story-emu .nui-wa-header { padding-top: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-stage .iphone-frame { animation: none !important; }
  .story-stage .face { visibility: hidden; }   /* without the spin they'd sit as a flat slab */
}
