/* ==========================================================================
   NEXTESCAYPE — "SCROLL FILM" MOTION LAYER (v2)
   Loaded after cinematic.css. Adds the title sequence, film progress rail,
   scene slates, and every motion-graphics scene of the story.
   Pure CSS/SVG motion; JS only feeds scroll progress. Reduced-motion safe.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TITLE SEQUENCE (opening card — auto-dismisses even without JS)
   -------------------------------------------------------------------------- */
.cine-title-sequence {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(900px 500px at 50% 42%, rgba(37, 99, 235, 0.14), transparent 65%), #E0EBFD;
  animation: cts-exit 0.7s cubic-bezier(0.16, 1, 0.3, 1) 2.1s forwards;
  pointer-events: none;
}

.cine-title-sequence.done { display: none; }

.cts-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.cts-logo {
  width: 72px;
  height: auto;
  opacity: 0;
  animation: cts-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  filter: drop-shadow(0 0 24px rgba(37, 99, 235, 0.6));
}

.cts-wordmark {
  font-family: var(--ne-font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.08em;
  color: #18202E;
  opacity: 0;
  animation: cts-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.cts-wordmark span { color: var(--cx-sky, #2563EB); }

.cts-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2563EB, transparent);
  animation: cts-line 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.cts-tagline {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #64748B;
  opacity: 0;
  animation: cts-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
}

@keyframes cts-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cts-line { to { width: 220px; } }
@keyframes cts-exit { to { opacity: 0; visibility: hidden; } }

/* --------------------------------------------------------------------------
   2. FILM PROGRESS RAIL
   -------------------------------------------------------------------------- */
.cine-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2500;
  background: rgba(37, 99, 235, 0.064);
}

.cine-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #2563EB, #2563EB 70%, #FC4F05);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

/* --------------------------------------------------------------------------
   3. SCENE SLATES (film-slate chapter markers)
   -------------------------------------------------------------------------- */
.scene-slate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  font-family: var(--ne-font-heading);
}

.scene-slate .slate-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cx-ember, #FC4F05);
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(252, 79, 5, 0.3);
  border-radius: 4px;
  background: rgba(252, 79, 5, 0.07);
  position: relative;
}

.scene-slate .slate-num::before,
.scene-slate .slate-num::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(252, 79, 5, 0.45));
}

.scene-slate .slate-num::before { right: 100%; margin-right: 8px; }
.scene-slate .slate-num::after { left: 100%; margin-left: 8px; transform: scaleX(-1); }

.scene-slate .slate-name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ne-text-muted, #64748B);
}

#story-problem .scene-slate { justify-content: center; margin-bottom: 2rem; }

/* --------------------------------------------------------------------------
   4. HERO VIDEO PHONE
   -------------------------------------------------------------------------- */
.hero-video-phone .phone-screen { background: #E0EBFD; }

.hero-video-phone .phone-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-video-badge {
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-family: var(--ne-font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #18202E;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  z-index: 4;
  pointer-events: none;
}

.hero-video-badge .hvb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #FF5C5C;
  box-shadow: 0 0 10px rgba(255, 92, 92, 0.8);
  animation: hvb-blink 1.6s ease-in-out infinite;
}

@keyframes hvb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --------------------------------------------------------------------------
   5. DESTINATION MARQUEE
   -------------------------------------------------------------------------- */
.cine-marquee {
  overflow: hidden;
  border-top: 1px solid var(--cx-line-soft, rgba(37, 99, 235, 0.064));
  border-bottom: 1px solid var(--cx-line-soft, rgba(37, 99, 235, 0.064));
  background: #F8FAFC;
  padding: 0.95rem 0;
  position: relative;
}

.cine-marquee::before,
.cine-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.cine-marquee::before { left: 0; background: linear-gradient(90deg, #F8FAFC, transparent); }
.cine-marquee::after { right: 0; background: linear-gradient(270deg, #F8FAFC, transparent); }

.cine-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  white-space: nowrap;
  animation: marquee 46s linear infinite;
  will-change: transform;
}

.cine-marquee-track span {
  font-family: var(--ne-font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748B;
}

.cine-marquee-track i {
  font-style: normal;
  color: var(--cx-ember, #FC4F05);
  font-size: 0.7rem;
}

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.cine-marquee:hover .cine-marquee-track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   6. CHAT SCENE (the group chat where trips go to die — looping)
   -------------------------------------------------------------------------- */
.chat-scene {
  display: flex;
  justify-content: center;
  margin: 3rem auto 0;
}

.chat-frame {
  width: min(430px, 92vw);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--cx-line, rgba(37, 99, 235, 0.112));
  box-shadow: 0 30px 70px -20px rgba(255, 255, 255, 0.7), 0 0 50px -18px rgba(37, 99, 235, 0.3);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--cx-line-soft, rgba(37, 99, 235, 0.064));
  background: rgba(255, 255, 255, 0.5);
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ne-font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: #FFF;
  background: linear-gradient(145deg, #2563EB, #0056D6);
}

.chat-title {
  font-family: var(--ne-font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: #18202E;
}

.chat-title em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 500;
  color: #64748B;
}

.chat-body {
  padding: 1.1rem 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 310px;
}

.chat-msg {
  max-width: 82%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #4B5563;
  background: rgba(37, 99, 235, 0.064);
  border: 1px solid rgba(37, 99, 235, 0.08);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.chat-msg b {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 0.15rem;
}

.chat-msg.status {
  align-self: center;
  max-width: none;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.chat-msg.ne {
  align-self: flex-end;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.28), rgba(0, 86, 214, 0.28));
  border-color: rgba(37, 99, 235, 0.45);
  color: #18202E;
  box-shadow: 0 0 28px -8px rgba(37, 99, 235, 0.55);
}

.chat-msg.ne b { color: #2563EB; }

/* 14s loop: messages appear in sequence, hold, then reset */
.chat-msg.m1 { animation: chat-in 14s cubic-bezier(0.16, 1, 0.3, 1) 0s infinite; }
.chat-msg.m2 { animation: chat-in 14s cubic-bezier(0.16, 1, 0.3, 1) 1.4s infinite; }
.chat-msg.m3 { animation: chat-in 14s cubic-bezier(0.16, 1, 0.3, 1) 2.8s infinite; }
.chat-msg.m4 { animation: chat-in 14s cubic-bezier(0.16, 1, 0.3, 1) 4.2s infinite; }
.chat-msg.m5 { animation: chat-in 14s cubic-bezier(0.16, 1, 0.3, 1) 5.8s infinite; }
.chat-msg.m6 { animation: chat-in-glow 14s cubic-bezier(0.16, 1, 0.3, 1) 7.6s infinite; }

@keyframes chat-in {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); }
  3.5%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@keyframes chat-in-glow {
  0% { opacity: 0; transform: translateY(14px) scale(0.96); }
  4%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(14px) scale(0.96); }
}

/* --------------------------------------------------------------------------
   7. PROOF STRIP (live product crops)
   -------------------------------------------------------------------------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin: 0 auto 3rem;
  max-width: 980px;
}

.proof-cell {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--cx-line-soft, rgba(37, 99, 235, 0.064));
  background: #EEF4FF;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s;
}

.proof-cell:hover { transform: translateY(-5px); border-color: rgba(37, 99, 235, 0.4); }

.proof-cell img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: top;
  display: block;
  opacity: 0.92;
}

.proof-cell figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--ne-font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #18202E;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(37, 99, 235, 0.16);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   8. ROUTE STAGE (scroll-drawn Hyderabad → Araku route)
   -------------------------------------------------------------------------- */
.route-stage { margin: 1rem 0 2.2rem; }

.route-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.route-draw {
  stroke-dasharray: var(--route-len, 1400);
  stroke-dashoffset: calc(var(--route-len, 1400) * (1 - var(--route-progress, 0)));
  filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.5));
}

.route-stop .rs-dot {
  fill: #FFFFFF;
  stroke: #2563EB;
  stroke-width: 2.5;
}

.route-stop .rs-end { stroke: #FC4F05; }

.route-stop text {
  font-family: var(--ne-font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  fill: #4B5563;
  text-transform: uppercase;
}

.route-rider {
  fill: #FFFFFF;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.9));
  offset-path: path("M 40 190 C 220 190, 260 80, 420 80 S 640 190, 790 160 S 1000 60, 1060 50");
  offset-distance: calc(var(--route-progress, 0) * 100%);
}

.route-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ne-text-muted, #64748B);
  max-width: 640px;
  margin: 0.8rem auto 0;
}

/* --------------------------------------------------------------------------
   9. FILM STRIP (journey frames)
   -------------------------------------------------------------------------- */
.film-strip {
  position: relative;
  margin: 0 0 3rem;
  padding: 14px 0;
  overflow: hidden;
  border-top: 1px dashed rgba(37, 99, 235, 0.144);
  border-bottom: 1px dashed rgba(37, 99, 235, 0.144);
  background:
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.096) 0 10px, transparent 10px 34px) top / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.096) 0 10px, transparent 10px 34px) bottom / 100% 6px no-repeat;
}

.film-strip-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: filmstrip 60s linear infinite;
  will-change: transform;
}

.film-strip:hover .film-strip-track { animation-play-state: paused; }

.film-strip-track img {
  height: 120px;
  width: auto;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.3s;
}

.film-strip-track img:hover { opacity: 1; transform: scale(1.04); }

@keyframes filmstrip { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   10. ESCROW METER (payment section fills + counts on reveal)
   -------------------------------------------------------------------------- */
.payment-milestone-bar { display: flex; height: 18px; border-radius: 999px; }

.payment-milestone-bar > div {
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.payment-milestone-bar .milestone-seg-1 { width: 15%; background: linear-gradient(90deg, #2563EB, #2563EB); border-radius: 999px 0 0 999px; }
.payment-milestone-bar .milestone-seg-2 { width: 42.5%; background: linear-gradient(90deg, #2563EB, #2563EB); transition-delay: 0.55s; }
.payment-milestone-bar .milestone-seg-3 { width: 42.5%; background: linear-gradient(90deg, #2563EB, #22C55E); border-radius: 0 999px 999px 0; transition-delay: 1.1s; }

.payment-milestone-bar.is-filled > div { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   11. FLYWHEEL — slow perpetual rotation (nodes counter-rotate upright)
   -------------------------------------------------------------------------- */
.flywheel-circle { animation: fw-spin 80s linear infinite; }

.flywheel-circle .flywheel-node-item { animation: fw-counter 80s linear infinite; }

.flywheel-circle .flywheel-center-badge { animation: fw-counter 80s linear infinite; }

@keyframes fw-spin { from { transform: scale(var(--ne-fw-scale, 1)) rotate(0deg); } to { transform: scale(var(--ne-fw-scale, 1)) rotate(360deg); } }
@keyframes fw-counter { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.flywheel-wrapper:hover .flywheel-circle,
.flywheel-wrapper:hover .flywheel-node-item,
.flywheel-wrapper:hover .flywheel-center-badge { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   12. AUDIENCE CARD ART + FINAL QR
   -------------------------------------------------------------------------- */
.audience-art {
  width: calc(100% + 0px);
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(37, 99, 235, 0.096);
  opacity: 0.9;
}

.final-cta-device { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }

.final-qr-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 360px;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--cx-line, rgba(37, 99, 235, 0.112));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.final-qr-card img {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 6px;
  flex-shrink: 0;
}

.final-qr-text strong {
  display: block;
  font-family: var(--ne-font-heading);
  font-size: 0.95rem;
  color: #18202E;
  margin-bottom: 0.2rem;
}

.final-qr-text span {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ne-text-muted, #64748B);
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .proof-strip { grid-template-columns: 1fr; max-width: 430px; }
  .proof-cell img { height: 120px; }
  .route-stop text { font-size: 22px; }
  .scene-slate { flex-wrap: wrap; row-gap: 0.4rem; }
  .scene-slate .slate-num::before, .scene-slate .slate-num::after { display: none; }
}

@media (max-width: 767px) {
  .chat-body { min-height: 340px; }
  .film-strip-track img { height: 88px; }
  .hero-video-badge { font-size: 0.54rem; padding: 0.28rem 0.55rem; max-width: 92%; }
  .cine-marquee-track { gap: 1.4rem; }
  .final-qr-card { max-width: 320px; }
}

/* --------------------------------------------------------------------------
   14. REDUCED MOTION — the film becomes a readable photo essay
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cine-title-sequence { display: none; }

  .cts-logo, .cts-wordmark, .cts-line, .cts-tagline { animation: none; opacity: 1; }

  .cine-marquee-track,
  .film-strip-track,
  .flywheel-circle,
  .flywheel-circle .flywheel-node-item,
  .flywheel-circle .flywheel-center-badge,
  .hero-video-badge .hvb-dot { animation: none !important; }

  .chat-msg { opacity: 1 !important; transform: none !important; animation: none !important; }

  .route-draw { stroke-dashoffset: 0 !important; }
  .route-rider { display: none; }

  .payment-milestone-bar > div { transform: scaleX(1); transition: none; }

  .cine-progress { display: none; }
}

/* ==========================================================================
   15. HERO ANIMATED CALLOUTS — TripGuardian Active · Equipment Rentals ·
       Verified Local Experts. Visible on desktop, tablet AND mobile.
       Sequence: pop in after the title card → pin dot pings → gentle float →
       a 9s spotlight loop highlights each callout in turn.
   ========================================================================== */
.hero-phone-stage .hero-floating-card {
  display: flex !important;
  --d: 3s;
  opacity: 0;
  pointer-events: auto;
  overflow: visible;
  isolation: isolate;
}

.hero-phone-stage .hero-card-left  { --d: 3.0s; --spot: 0s;  animation: cx-callout-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards, cx-bob-a 6.5s ease-in-out calc(var(--d) + 0.9s) infinite alternate; }
.hero-phone-stage .hero-card-top-right { --d: 3.7s; --spot: 3s; animation: cx-callout-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards, cx-bob-b 7.2s ease-in-out calc(var(--d) + 0.9s) infinite alternate; }
.hero-phone-stage .hero-card-right { --d: 4.4s; --spot: 6s; animation: cx-callout-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards, cx-bob-c 6.9s ease-in-out calc(var(--d) + 0.9s) infinite alternate; }

@keyframes cx-callout-in {
  0%   { opacity: 0; transform: translateY(18px) scale(0.86); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cx-bob-a { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-9px) rotate(-1.2deg); } }
@keyframes cx-bob-b { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-7px) rotate(1.4deg); } }
@keyframes cx-bob-c { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(8px) rotate(-1deg); } }

/* spotlight ring: each callout lights up for 1/3 of a 9s loop */
.hero-phone-stage .hero-floating-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid transparent;
  z-index: -1;
  opacity: 0;
  animation: cx-spot 9s ease-in-out calc(var(--d) + 1s + var(--spot)) infinite;
}

@keyframes cx-spot {
  0%   { opacity: 0; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); border-color: transparent; }
  6%   { opacity: 1; border-color: rgba(37, 99, 235, 0.9); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5), 0 0 36px -4px rgba(37, 99, 235, 0.55); }
  22%  { opacity: 1; border-color: rgba(37, 99, 235, 0.9); box-shadow: 0 0 0 14px rgba(37, 99, 235, 0), 0 0 36px -4px rgba(37, 99, 235, 0.55); }
  33%, 100% { opacity: 0; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* pin dot + pinging ring pointing at the phone */
.hero-phone-stage .hero-floating-card::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2563EB;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.9);
  animation: cx-pin 2.2s ease-out calc(var(--d) + 1s) infinite;
}

.hero-phone-stage .hero-card-left::after       { right: -5px; top: 50%; margin-top: -4.5px; }
.hero-phone-stage .hero-card-right::after      { right: -5px; top: 50%; margin-top: -4.5px; background: #FC4F05; box-shadow: 0 0 12px rgba(252, 79, 5, 0.9); }
.hero-phone-stage .hero-card-top-right::after  { left: 28px; bottom: -5px; background: #FC4F05; box-shadow: 0 0 12px rgba(252, 79, 5, 0.9); }
.hero-phone-stage .hero-card-left::after       { background: #22C55E; box-shadow: 0 0 12px rgba(34, 197, 94, 0.9); }

@keyframes cx-pin {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* the pin's expanding ping rendered via the icon wrapper ring below */
.hero-card-icon { position: relative; }

.hero-card-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: cx-icon-ping 2.6s ease-out calc(var(--d, 3s) + 1.2s) infinite;
}

@keyframes cx-icon-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* per-callout icon motion */
.hero-card-left .hero-card-icon svg  { animation: cx-shield-beat 2.2s ease-in-out infinite; transform-origin: center; }
.hero-card-top-right .hero-card-icon svg { animation: cx-star-twinkle 3.2s ease-in-out infinite; transform-origin: center; }
.hero-card-right .hero-card-icon svg { animation: cx-clock-tilt 4s ease-in-out infinite; transform-origin: center; }

@keyframes cx-shield-beat   { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.18); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } 56% { transform: scale(1); } }
@keyframes cx-star-twinkle  { 0%, 100% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(72deg) scale(1.15); } }
@keyframes cx-clock-tilt    { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* live status dot after "TripGuardian Active" */
.hero-card-left .hero-card-info h4::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: #22C55E;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  vertical-align: middle;
  animation: hvb-blink 1.4s ease-in-out infinite;
}

/* ---- Tablet (768–1024): two-column hero, so left callouts become compact pills hugging the phone ---- */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-phone-stage .hero-floating-card { padding: 0.45rem 0.75rem 0.45rem 0.5rem; gap: 0.5rem; border-radius: 14px; }
  .hero-phone-stage .hero-card-icon { width: 30px; height: 30px; }
  .hero-phone-stage .hero-card-info h4 { font-size: 0.76rem; }
  .hero-phone-stage .hero-card-left .hero-card-info p,
  .hero-phone-stage .hero-card-right .hero-card-info p { display: none; }
  .hero-phone-stage .hero-card-left  { top: 16%;    left: -46px; }
  .hero-phone-stage .hero-card-right { bottom: 11%; left: -46px; }
  .hero-phone-stage .hero-card-top-right { top: -34px; right: -30px; }
}

/* ---- Mobile (<768): compact pills that hug the phone edges ---- */
@media (max-width: 767.98px) {
  .hero-phone-stage .hero-floating-card {
    padding: 0.4rem 0.65rem 0.4rem 0.45rem;
    gap: 0.45rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 28px -8px rgba(255, 255, 255, 0.7);
  }
  .hero-phone-stage .hero-card-icon { width: 28px; height: 28px; }
  .hero-phone-stage .hero-card-icon svg { width: 15px; height: 15px; }
  .hero-phone-stage .hero-card-info h4 { font-size: 0.7rem; line-height: 1.15; }
  .hero-phone-stage .hero-card-info p  { display: none; }

  .hero-phone-stage .hero-card-left      { top: 19%;    left: -30px;  right: auto; bottom: auto; }
  .hero-phone-stage .hero-card-top-right { top: 46%;    right: -14px; left: auto;  bottom: auto; }
  .hero-phone-stage .hero-card-right     { bottom: 11%; left: -30px;  right: auto; top: auto; }

  .hero-phone-stage .hero-card-left::after,
  .hero-phone-stage .hero-card-right::after { right: -4px; }
  .hero-phone-stage .hero-card-top-right::after { left: -4px; right: auto; bottom: auto; top: 50%; margin-top: -4.5px; }
}

@media (max-width: 380px) {
  .hero-phone-stage .hero-card-left, .hero-phone-stage .hero-card-right { left: -22px; }
  .hero-phone-stage .hero-card-info h4 { font-size: 0.66rem; }
}

/* ---- Reduced motion: callouts simply present, no movement ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-phone-stage .hero-floating-card { opacity: 1 !important; animation: none !important; transform: none !important; }
  .hero-phone-stage .hero-floating-card::before,
  .hero-phone-stage .hero-floating-card::after,
  .hero-card-icon::after,
  .hero-card-icon svg,
  .hero-card-left .hero-card-info h4::after { animation: none !important; }
}
