/* ============================================================
   PURCHASE-FLOW SHOWCASE  (2026-07-16)
   Left: authentic WhatsApp phone. Right: chater360 profile
   filling itself with AI-dust particles. Namespaced .sc-* / .wa-*.
   ============================================================ */

.showcase-section { position: relative; overflow: hidden; }

.sc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

/* ---------- Section copy ---------- */
.sc-copy { min-width: 0; max-width: 560px; }
.sc-copy h2 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.6rem); line-height: 1.14; margin: 0 0 14px; }
.sc-copy .lede { color: var(--text-2); font-size: 1.05rem; margin: 0 0 22px; }
.sc-points { display: grid; gap: 12px; margin: 0; list-style: none; }
.sc-points li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-2); font-size: 0.96rem; }
.sc-points .dot {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bubble-out); border: 1px solid var(--bubble-out-border); color: #fff;
}

/* ============================================================
   LEFT: WhatsApp phone
   ============================================================ */
.sc-stage { position: relative; display: flex; justify-content: center; }
.sc-stage .sc-glow {
  position: absolute; inset: -12% -10% -6%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 40% at 42% 40%, rgba(37, 211, 102, calc(var(--glow-a) * 0.22)), transparent 70%),
    radial-gradient(44% 42% at 62% 66%, rgba(124, 58, 237, calc(var(--glow-a) * 0.5)), transparent 72%);
  filter: blur(20px);
}

.wa-phone {
  position: relative; z-index: 1;
  width: min(340px, 84vw);
  padding: 11px;
  border-radius: 44px;
  background: linear-gradient(150deg, #1a1a22, #0a0a0e 60%, #050506);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 44px 90px -34px rgba(0, 0, 0, 0.8), 0 20px 46px -26px rgba(124, 58, 237, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.wa-cam {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: #050507; z-index: 6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.wa-screen {
  position: relative; overflow: hidden;
  border-radius: 34px; height: 620px;
  background-color: #0b141a;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1.4px);
  background-size: 22px 22px;
  display: flex; flex-direction: column;
}

/* WhatsApp header */
.wa-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 10px; background: #202c33; flex: 0 0 auto;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.wa-back { color: #aebac1; display: inline-flex; }
.wa-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem;
}
.wa-hdr-meta { min-width: 0; flex: 1; }
.wa-hdr-name { color: #e9edef; font-weight: 600; font-size: 0.95rem; line-height: 1.1; }
.wa-hdr-sub { color: #8696a0; font-size: 0.75rem; }
.wa-hdr-sub.typing { color: #25d366; }
.wa-hdr-icons { display: flex; gap: 18px; color: #aebac1; }

/* Chat body */
.wa-body {
  flex: 1; overflow: hidden; padding: 12px 9px 8px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative;
}
.wa-day {
  align-self: center; margin: 2px 0 6px;
  background: #182229; color: #8696a0; font-size: 0.68rem; font-weight: 500;
  padding: 5px 12px; border-radius: 8px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* Bubbles */
.wa-msg {
  display: none;
  max-width: 82%; padding: 7px 9px 8px; border-radius: 9px;
  font-size: 0.86rem; line-height: 1.4; color: #e9edef; position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.wa-msg.show { display: inline-block; animation: sc-msg-in 0.34s ease both; }
@keyframes sc-msg-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.wa-in { align-self: flex-start; background: #202c33; border-top-left-radius: 3px; }
.wa-out { align-self: flex-end; background: #005c4b; border-top-right-radius: 3px; }
.wa-time { display: inline-block; float: right; margin: 4px 0 -2px 8px; font-size: 0.62rem; color: rgba(233, 237, 239, 0.5); }
.wa-tick { color: #53bdeb; margin-left: 2px; }

/* Voice note */
.wa-voice { align-items: center; gap: 8px; min-width: 172px; }
.wa-voice.show { display: flex; }
.wa-voice .play { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.12); display: inline-flex; align-items: center; justify-content: center; color: #e9edef; flex: 0 0 auto; }
.wa-voice .wave { flex: 1; color: #8696a0; }
.wa-voice .dur { font-size: 0.66rem; color: #8696a0; }

/* Product card bubble */
.wa-product { padding: 4px; max-width: 78%; }
.wa-product .thumb {
  width: 100%; aspect-ratio: 16 / 11; border-radius: 6px; overflow: hidden;
  background: #0e1a20 center/cover no-repeat; display: block;
}
.wa-product .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-prod-info { padding: 7px 6px 4px; }
.wa-prod-name { font-weight: 600; font-size: 0.82rem; }
.wa-prod-price { color: #8696a0; font-size: 0.78rem; margin-top: 1px; }
.wa-prod-price b { color: #e9edef; font-weight: 600; }
.wa-prod-btn {
  display: block; text-align: center; margin-top: 6px; padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08); color: #53bdeb;
  font-size: 0.8rem; font-weight: 600;
}
/* the shoe that flies in from the store strip */
.wa-product .thumb { position: relative; }
.wa-product .thumb.dropping img { animation: sc-drop 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes sc-drop {
  0% { transform: translate(-40%, -120%) scale(0.5) rotate(-12deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* Order recap bubble with a WhatsApp-style interactive button */
.wa-recap { min-width: 232px; }

.wa-recap .rc-h { font-weight: 700; font-size: 0.82rem; margin-bottom: 6px; }
.wa-recap .rc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; padding: 3px 0; color: #cfd6da; }
.wa-recap .rc-row span:last-child { color: #e9edef; font-weight: 600; text-align: right; }
.wa-recap .rc-tot { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 5px; padding-top: 6px; }
.wa-recap .wa-time { float: none; display: block; text-align: right; margin: 4px 0 0; }
/* WhatsApp-style detached reply buttons: separate rounded rows below the
   bubble, same bubble green, centered light-blue label. */
.wa-btnrow {
  display: none;
  align-self: flex-end;
  width: min(240px, 82%);
  flex-direction: column;
  gap: 3px;
  margin-top: -3px;
}
.wa-btnrow.show { display: flex; animation: sc-msg-in 0.34s ease both; }
.wa-btn {
  border: 0; border-radius: 9px;
  padding: 11px 10px;
  background: #005c4b; color: #53bdeb;
  font-family: inherit; font-size: 0.84rem; font-weight: 600; text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  transition: filter 0.2s ease;
}
.wa-btn.tapped { filter: brightness(1.35); animation: sc-press 0.45s ease; }
@keyframes sc-press { 0% { transform: scale(1); } 45% { transform: scale(0.96); } 100% { transform: scale(1); } }

/* typing dots in a bubble */
.wa-typing { align-self: flex-start; background: #202c33; border-radius: 9px; border-top-left-radius: 3px; padding: 11px 12px; display: none; }
.wa-typing.show { display: inline-flex; gap: 4px; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696a0; animation: sc-blink 1s infinite; }
.wa-typing i:nth-child(2) { animation-delay: 0.15s; }
.wa-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes sc-blink { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Input bar */
.wa-input {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #0b141a;
}
.wa-input .field {
  flex: 1; background: #202c33; border-radius: 20px; padding: 9px 14px;
  color: #8696a0; font-size: 0.8rem;
}
.wa-input .mic { width: 38px; height: 38px; border-radius: 50%; background: #00a884; display: inline-flex; align-items: center; justify-content: center; color: #0b141a; flex: 0 0 auto; }

/* ============================================================
   RIGHT: chater360 profile filling itself
   ============================================================ */
.sc-crm-wrap { position: relative; }
.sc-crm-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.sc-crm-label .spark { color: var(--fuchsia); }

.crm-panel {
  position: relative;
  border-radius: 16px; padding: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.crm-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.crm-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
}
.crm-name-wrap { min-width: 0; }
.crm-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.crm-sub { font-size: 0.8rem; color: var(--text-3); }
.crm-badges { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.crm-badge { font-size: 0.68rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.crm-badge.vip { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
.crm-badge.new { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }

.crm-rows { display: grid; gap: 12px; margin-top: 14px; }
.crm-row { display: grid; gap: 3px; }
.crm-row .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.crm-row .v { font-size: 0.95rem; color: var(--text); font-weight: 600; min-height: 1.2em; }

/* a value not captured yet: dim, shows a placeholder until particles fill it */
.crm-field { opacity: 0.55; transition: opacity 0.4s ease; }
.crm-field .v { color: var(--text); font-weight: 600; }
.crm-field:not(.filled):not(.filling) .v::before { content: attr(data-ph); color: var(--text-3); font-weight: 500; }
.crm-field.filled { opacity: 1; }
.crm-field.filled .k { color: var(--violet); }

/* order card that snaps in */
.crm-order {
  margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  background: rgba(124, 58, 237, 0.06);
  opacity: 0; transform: translateY(12px) scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.crm-order.in { opacity: 1; transform: none; }
.crm-order .oh { display: flex; align-items: center; justify-content: space-between; }
.crm-order .oh b { font-size: 0.9rem; }
.crm-order .tag { font-size: 0.66rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(255, 176, 92, 0.16); color: #fcd34d; }
.crm-order .oline { display: flex; gap: 10px; align-items: center; margin-top: 9px; }
.crm-order .oline img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: #14141a; }
.crm-order .oinfo { font-size: 0.8rem; }
.crm-order .oinfo .p { color: var(--text-3); font-size: 0.74rem; }
.crm-order .ofoot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.78rem; color: var(--text-2); }
.crm-order .ofoot b { color: var(--text); }

/* particle canvas overlays the whole panel */
.crm-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* the small store strip the shoe flies from (desktop only, decorative) */
.sc-storestrip {
  display: none;
  position: absolute; z-index: 2; top: 8%; right: -8%;
  width: 120px; padding: 7px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-2);
  box-shadow: var(--frame-shadow);
}
.sc-storestrip .st-h { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; margin-bottom: 6px; text-align: center; }
.sc-storestrip .st-shoe { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: #14141a; opacity: 0.9; }
.sc-storestrip .st-shoe.flew { opacity: 0.25; }

/* ---------- Desktop layout ---------- */
@media (min-width: 900px) {
  .sc-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 64px; }
  .sc-stage { justify-content: flex-start; }
  .sc-storestrip { display: block; }
}

/* ---------- Clarity: voice transcript, source highlights, spotlight ---------- */
.wa-transcript {
  display: none; align-self: flex-start; max-width: 90%;
  margin: -1px 0 2px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.3); background: rgba(124, 58, 237, 0.12);
  font-size: 0.76rem; line-height: 1.38; color: #cdc6e6; gap: 7px; align-items: flex-start;
}
.wa-transcript.show { display: inline-flex; animation: sc-msg-in 0.34s ease both; }
.wa-transcript .tr-ic { color: #c4b5fd; flex: 0 0 auto; margin-top: 1px; }
.wa-transcript b { color: #ede9fe; font-weight: 700; }

.tr-name, .hl { color: #c4b5fd; font-weight: 700; border-radius: 4px; padding: 0 2px; }
.pulse { animation: sc-hl 1.6s ease; }
@keyframes sc-hl {
  0%, 100% { background: transparent; box-shadow: none; }
  22%, 58% { background: rgba(167, 139, 250, 0.34); box-shadow: 0 0 14px rgba(167, 139, 250, 0.55); }
}

.crm-field { border-radius: 9px; padding: 5px 9px; margin: 0 -9px; position: relative;
  transition: background 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease; }
.crm-field.spotlight {
  opacity: 1;
  background: rgba(167, 139, 250, 0.09);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.28), 0 0 26px -6px rgba(167, 139, 250, 0.6);
}
.crm-field.spotlight::after {
  content: attr(data-src); position: absolute; top: 6px; right: 9px;
  font-size: 0.6rem; font-weight: 700; color: #f0abfc;
  background: rgba(217, 70, 239, 0.14); border: 1px solid rgba(217, 70, 239, 0.34);
  padding: 2px 8px; border-radius: 999px; animation: sc-tag-in 0.4s ease both;
}
@keyframes sc-tag-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.crm-panel.focusing .crm-head,
.crm-panel.focusing .crm-order.in,
.crm-panel.focusing .crm-interest.in,
.crm-panel.focusing .crm-row:not(.spotlight) { opacity: 0.38; transition: opacity 0.35s ease; }

/* ---------- Reduced motion: show the finished state, no motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .wa-msg, .crm-order { transition: none; }
  .wa-typing { display: none !important; }
  .crm-panel.focusing .crm-head,
  .crm-panel.focusing .crm-order.in,
  .crm-panel.focusing .crm-interest.in,
  .crm-panel.focusing .crm-row:not(.spotlight) { opacity: 1; }
}


/* ---------- Photo message + catalog match (vision flow) ---------- */
.wa-photo { padding: 3px; max-width: 182px; }
.wa-photo-wrap { position: relative; border-radius: 7px; overflow: hidden; }
.wa-photo-wrap img { width: 100%; display: block; }
.wa-photo-cap { padding: 5px 7px 1px; font-size: 0.84rem; }
.wa-scanote b { color: #7dd3fc; }
.tr-size, .tr-addr { color: #c4b5fd; font-weight: 700; border-radius: 4px; padding: 0 2px; }

.sc-shoelist {
  display: none; align-self: flex-start; max-width: 92%;
  margin: 1px 0 3px; padding: 8px 9px 9px; border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.32); background: rgba(124, 58, 237, 0.1); overflow: hidden;
}
.sc-shoelist.show { display: block; animation: sc-msg-in 0.34s ease both; }
.sc-shoelist.collapsing { animation: sl-collapse 0.55s ease forwards; }
@keyframes sl-collapse { to { opacity: 0; transform: scale(0.94); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }
.sc-shoelist .sl-h { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: #c4b5fd; margin-bottom: 7px; }
.sc-shoelist .sl-row { display: flex; gap: 6px; }
.sc-shoelist .sl-shoe {
  width: 52px; height: 42px; object-fit: cover; border-radius: 7px;
  background: #0e1a20; border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0.45; transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), box-shadow 0.35s ease;
}
.sc-shoelist .sl-matched {
  opacity: 1; border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.45), 0 0 18px -4px rgba(167, 139, 250, 0.75);
}
.sc-shoelist.picked .sl-matched { transform: translateY(30px) scale(1.12); opacity: 0; }
.sc-shoelist.picked .sl-shoe:not(.sl-matched) { opacity: 0.22; }


/* ===== money-pop module ===== */
/* ============================================================
   money-pop  celebratory money emoji burst
   Paste into showcase.css
   The emitter container (root) must be position: relative
   so the absolutely positioned spans anchor to it.
   ============================================================ */

.sc-money-pop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
  /* subtle themed glow ties each glyph into the violet and fuchsia palette */
  filter: drop-shadow(0 0 6px var(--sc-glow, #7c3aed));
  animation: sc-money-burst var(--sc-dur, 1.6s) cubic-bezier(0.18, 0.7, 0.28, 1) both;
  animation-delay: var(--sc-delay, 0s);
}

@keyframes sc-money-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.35) rotate(0deg);
  }
  14% {
    opacity: 1;
    transform:
      translate3d(calc(var(--sc-x, 0px) * 0.32), calc(var(--sc-y, -140px) * 0.16), 0)
      scale(var(--sc-scale, 1.3)) rotate(calc(var(--sc-rot, 0deg) * 0.2));
  }
  60% {
    opacity: 1;
    transform:
      translate3d(calc(var(--sc-x, 0px) * 0.82), calc(var(--sc-y, -140px) * 0.66), 0)
      scale(var(--sc-scale, 1.3)) rotate(calc(var(--sc-rot, 0deg) * 0.72));
  }
  100% {
    opacity: 0;
    transform:
      translate3d(var(--sc-x, 0px), var(--sc-y, -140px), 0)
      scale(calc(var(--sc-scale, 1.3) * 0.96)) rotate(var(--sc-rot, 0deg));
  }
}

/* Reduced motion: minimal, mostly static pop that finishes fast. */
@media (prefers-reduced-motion: reduce) {
  .sc-money-pop {
    animation-name: sc-money-soft;
    animation-duration: 0.5s;
    animation-delay: 0s;
    animation-timing-function: ease-out;
  }
}

@keyframes sc-money-soft {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
  35%  { opacity: 1; transform: translate3d(0, -8px, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -14px, 0) scale(1); }
}

/* ===== vision-scan module ===== */
/* ==========================================================================
   vision-scan: AI image analysis overlay for a chat-bubble photo.
   Injected by runScan(wrapEl, done) inside a position:relative wrapper.
   Thin lines, violet to cyan, low opacity, no layout shift.
   ========================================================================== */

.vscan{
  position:absolute;
  inset:0;
  border-radius:inherit;      /* match the photo corners */
  overflow:hidden;            /* clip the beam, grid and shimmer */
  pointer-events:none;
  z-index:2;
  opacity:0;
  animation:vscan-fade-in 0.18s ease-out forwards;
  /* soft process wash so the photo reads as being analyzed */
  background:linear-gradient(180deg, rgba(124,58,237,0.10), rgba(34,211,238,0.06));
  /* palette tokens */
  --vscan-violet:#7c3aed;
  --vscan-fuchsia:#d946ef;
  --vscan-cyan:#22d3ee;
}
.vscan.vscan--out{ animation:vscan-fade-out 0.24s ease-in forwards; }

@keyframes vscan-fade-in{ from{ opacity:0 } to{ opacity:1 } }
@keyframes vscan-fade-out{ from{ opacity:1 } to{ opacity:0 } }

/* faint tech grid ---------------------------------------------------------- */
.vscan__grid{
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(to right, rgba(34,211,238,0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124,58,237,0.10) 1px, transparent 1px);
  background-size:22px 22px;
  mix-blend-mode:screen;
  opacity:0;
  animation:vscan-grid 2.2s ease-in-out both;
}
@keyframes vscan-grid{
  0%{ opacity:0 }
  15%{ opacity:0.55 }
  85%{ opacity:0.5 }
  100%{ opacity:0 }
}

/* diagonal shimmer sweep --------------------------------------------------- */
.vscan__shimmer{
  position:absolute;
  top:-30%;
  left:-60%;
  width:55%;
  height:160%;
  filter:blur(6px);
  background:linear-gradient(90deg, transparent, rgba(217,70,239,0.14), rgba(34,211,238,0.10), transparent);
  transform:translateX(0) rotate(18deg);
  animation:vscan-shimmer 2.2s ease-in-out both;
}
@keyframes vscan-shimmer{
  0%{ transform:translateX(0) rotate(18deg); opacity:0 }
  20%{ opacity:1 }
  100%{ transform:translateX(400%) rotate(18deg); opacity:0 }
}

/* sweeping scan line (two passes) ------------------------------------------ */
/* The beam fills the container, so translateY(100%) equals one full height. */
.vscan__beam{
  position:absolute;
  inset:0;
  will-change:transform;
  animation:vscan-sweep 0.95s cubic-bezier(0.4,0,0.2,1) 2 both;
}
.vscan__beam::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:2px;
  background:linear-gradient(90deg, transparent, var(--vscan-violet) 22%, var(--vscan-cyan) 78%, transparent);
  box-shadow:0 0 10px 1px rgba(124,58,237,0.55), 0 0 22px 2px rgba(34,211,238,0.30);
}
.vscan__beam::after{
  content:"";
  position:absolute;
  left:0; right:0; top:2px;
  height:38px;
  background:linear-gradient(180deg, rgba(124,58,237,0.18), transparent);
  opacity:0.7;
}
@keyframes vscan-sweep{
  0%{ transform:translateY(-2%); opacity:0 }
  8%{ opacity:1 }
  92%{ opacity:1 }
  100%{ transform:translateY(100%); opacity:0 }
}

/* corner reticle ----------------------------------------------------------- */
.vscan__corner{
  position:absolute;
  width:18px; height:18px;
  border:1.5px solid rgba(34,211,238,0.85);
  opacity:0;
  animation:vscan-corner 2.2s ease-out both;
}
.vscan__corner--tl{ top:8px; left:8px; border-right:none; border-bottom:none; border-top-left-radius:4px; }
.vscan__corner--tr{ top:8px; right:8px; border-left:none; border-bottom:none; border-top-right-radius:4px; }
.vscan__corner--bl{ bottom:8px; left:8px; border-right:none; border-top:none; border-bottom-left-radius:4px; }
.vscan__corner--br{ bottom:8px; right:8px; border-left:none; border-top:none; border-bottom-right-radius:4px; }
@keyframes vscan-corner{
  0%{ opacity:0; transform:scale(0.6) }
  12%{ opacity:1; transform:scale(1) }
  50%{ opacity:0.6 }
  85%{ opacity:0.9 }
  100%{ opacity:0 }
}

/* status pill -------------------------------------------------------------- */
.vscan__pill{
  position:absolute;
  left:10px; bottom:10px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:5px 10px;
  font:600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing:0.02em;
  color:#eadcff;
  white-space:nowrap;
  background:rgba(24,10,38,0.62);
  border:1px solid rgba(217,70,239,0.35);
  border-radius:999px;
  box-shadow:0 2px 10px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.03);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  opacity:0;
  transform:translateY(6px);
  animation:vscan-pill 2.2s ease-out both;
}
@keyframes vscan-pill{
  0%{ opacity:0; transform:translateY(6px) }
  10%{ opacity:1; transform:translateY(0) }
  88%{ opacity:1; transform:translateY(0) }
  100%{ opacity:0; transform:translateY(2px) }
}

.vscan__spin{
  width:12px; height:12px;
  border-radius:50%;
  border:2px solid rgba(34,211,238,0.25);
  border-top-color:var(--vscan-cyan);
  animation:vscan-spin 0.7s linear infinite;
}
@keyframes vscan-spin{ to{ transform:rotate(360deg) } }

.vscan__dots{ display:inline-flex; align-items:flex-end; }
.vscan__dots i{
  width:3px; height:3px;
  margin-left:2px;
  border-radius:50%;
  background:var(--vscan-cyan);
  opacity:0.25;
  animation:vscan-dot 1s ease-in-out infinite;
}
.vscan__dots i:nth-child(2){ animation-delay:0.15s; }
.vscan__dots i:nth-child(3){ animation-delay:0.30s; }
@keyframes vscan-dot{
  0%,100%{ opacity:0.25; transform:translateY(0) }
  40%{ opacity:1; transform:translateY(-1px) }
}

/* reduced motion: static, minimal, finishes fast --------------------------- */
@media (prefers-reduced-motion: reduce){
  .vscan{ animation:vscan-fade-in 0.12s ease-out forwards; }
  .vscan.vscan--out{ animation:vscan-fade-out 0.12s ease-in forwards; }
  .vscan__grid{ animation:none; opacity:0.4; }
  .vscan__shimmer{ display:none; }
  .vscan__beam{ animation:none; }            /* line rests near the top */
  .vscan__corner{ animation:none; opacity:0.8; }
  .vscan__pill{ animation:none; opacity:1; transform:none; }
  .vscan__spin{ animation:none; }
  .vscan__dots i{ animation:none; opacity:0.7; }
}

/* ---------- Store side panel + gravitational drag-out ---------- */
.sc-storepanel {
  position: absolute; z-index: 5; top: 5%; right: -6%; width: 172px;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.6));
  opacity: 0; transform: translateX(34px) scale(0.95);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
}
.sc-storepanel .sp-img { width: 100%; display: block; border-radius: 14px; }
.sc-storepanel.show { opacity: 1; transform: none; }
.sc-storepanel.gone { opacity: 0; transform: translateX(30px) scale(0.94); }
.sc-dragshoe {
  position: absolute; z-index: 6; top: 12%; right: 7%; width: 50px; height: 40px;
  object-fit: cover; border-radius: 8px; transform-origin: center; opacity: 0;
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(167, 139, 250, 0.55), 0 0 22px -4px rgba(167, 139, 250, 0.7);
}
.sc-dragshoe.drag { animation: sc-drag 2s cubic-bezier(0.4, 0, 0.85, 0.6) forwards; }
@keyframes sc-drag {
  0%   { opacity: 0; transform: translate(0, 0) scale(1) rotate(0deg); }
  14%  { opacity: 1; transform: translate(-6px, -6px) scale(1.16) rotate(-6deg); }
  100% { opacity: 0; transform: translate(-186px, 322px) scale(0.66) rotate(-50deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-storepanel, .sc-dragshoe.drag { transition: none; animation: none; }
}


/* ---------- v3 layout: head on top, phone | profile side by side, bullets below ---------- */
.sc-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.sc-head h2 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.6rem); line-height: 1.14; margin: 6px 0 0; }
.sc-main { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: start; justify-items: center; }
.sc-crm-wrap { width: 100%; max-width: 560px; }
.sc-points { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 900px; margin: 42px auto 0; list-style: none; padding: 0; }
@media (min-width: 900px) {
  .sc-main { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 50px; justify-items: stretch; align-items: center; }
  .sc-stage { justify-content: flex-start; }
  .sc-crm-wrap { max-width: none; }
}
@media (min-width: 700px) {
  .sc-points { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
/* the store-panel drag is a desktop flourish */
@media (max-width: 899px) { .sc-storepanel { display: none !important; } }


/* ---------- Clarity beats ---------- */
/* the scan-match note flashes as its own beat */
.wa-scanote.beat { animation: sc-beat 1.5s ease 2; }
@keyframes sc-beat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); transform: scale(1); }
  40% { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.65), 0 0 22px -4px rgba(167, 139, 250, 0.8); transform: scale(1.025); }
}
/* the customer's Confirm message = the order trigger */
.wa-m7.trigger { animation: sc-trig 1.6s ease 2; }
@keyframes sc-trig {
  0%, 100% { box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18); }
  40% { box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.7), 0 0 22px -4px rgba(52, 211, 153, 0.8); }
}
.wa-trignote b { color: #6ee7b7; }

/* ---------- Interested-in chip (logged before the order) ---------- */
.crm-interest {
  margin-top: 14px;
  opacity: 0; transform: translateY(10px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.crm-interest.in { opacity: 1; transform: none; }
.crm-interest .k {
  display: block; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 7px;
}
.crm-interest.in .k { color: var(--violet); }
.int-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px; border-radius: 11px;
  border: 1px solid var(--bubble-out-border); background: var(--bubble-out);
}
.int-chip img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: #14141a; }
.int-chip .int-info b { display: block; font-size: 0.85rem; color: var(--text); }
.int-chip .int-info span { display: block; font-size: 0.72rem; color: var(--text-3); }


/* ---------- Hold-for-confirmation note (amber, waiting state) ---------- */
.wa-holdnote { border-color: rgba(252, 211, 77, 0.32); background: rgba(252, 211, 77, 0.08); }
.wa-holdnote .tr-ic { color: #fcd34d; }
.wa-holdnote b { color: #fcd34d; }


/* ============================================================
   MOBILE: phone + profile visible TOGETHER in one viewport.
   Shorter phone, condensed profile, tight rhythm.
   ============================================================ */
@media (max-width: 899px) {
  .sc-head { margin-bottom: 16px; }
  .sc-main { gap: 12px; }

  /* shorter phone */
  .wa-phone { width: min(296px, 82vw); padding: 9px; border-radius: 36px; }
  .wa-screen { height: 400px; border-radius: 28px; }
  .wa-cam { top: 16px; width: 8px; height: 8px; }
  .wa-header { padding: 9px 10px 8px; }
  .wa-avatar { width: 32px; height: 32px; font-size: 0.75rem; }
  .wa-msg { font-size: 0.8rem; }
  .wa-input { padding: 6px 8px; }
  .wa-input .field { padding: 7px 12px; font-size: 0.75rem; }
  .wa-input .mic { width: 32px; height: 32px; }

  /* condensed profile card */
  .sc-crm-label { margin-bottom: 7px; font-size: 0.66rem; }
  .crm-panel { padding: 13px; border-radius: 14px; }
  .crm-head { gap: 9px; padding-bottom: 10px; }
  .crm-avatar { width: 36px; height: 36px; font-size: 0.8rem; }
  .crm-name { font-size: 0.95rem; }
  .crm-sub { font-size: 0.72rem; }
  .crm-badges { display: none; }
  .crm-rows { grid-template-columns: 1fr 1fr; gap: 9px 14px; margin-top: 10px; }
  .crm-rows .crm-row:first-child { display: none; }  /* channel row is implied on mobile */
  .crm-row .k { font-size: 0.6rem; }
  .crm-row .v { font-size: 0.82rem; }
  .crm-interest { margin-top: 10px; }
  .crm-interest .k { font-size: 0.6rem; margin-bottom: 5px; }
  .int-chip { padding: 6px 10px 6px 6px; gap: 8px; }
  .int-chip img { width: 28px; height: 28px; }
  .int-chip .int-info b { font-size: 0.78rem; }
  .int-chip .int-info span { font-size: 0.66rem; }
  .crm-order { margin-top: 10px; padding: 10px; }
  .crm-order .oh b { font-size: 0.82rem; }
  .crm-order .oline { margin-top: 6px; }
  .crm-order .oline img { width: 32px; height: 32px; }
  .crm-order .oinfo { font-size: 0.74rem; }
  .crm-order .ofoot { margin-top: 7px; font-size: 0.72rem; }
}
