/* ============================================================
   IXXO Cart — animated "flow" hero mockups for feature pages.
   Each scene tells the page's story as a short looping sequence.
   Reuses .cmock / .cm-chip from cart.css. All motion is gated
   behind prefers-reduced-motion: no-preference; the reduced
   state settles on a meaningful final frame.
   ============================================================ */

.flow { position: relative; }
.flow .cmock-body { min-height: 250px; }

/* generic state-cycler: stacked children, one shown at a time */
.cyc { position: relative; display: inline-grid; }
.cyc > * { grid-area: 1 / 1; opacity: 0; }
.cyc.n3 > *:nth-child(1) { }
@media (prefers-reduced-motion: no-preference) {
  .cyc.n3 > *:nth-child(1) { animation: cyc 9s infinite 0s; }
  .cyc.n3 > *:nth-child(2) { animation: cyc 9s infinite 3s; }
  .cyc.n3 > *:nth-child(3) { animation: cyc 9s infinite 6s; }
  .cyc.n4 > *:nth-child(1) { animation: cyc 12s infinite 0s; }
  .cyc.n4 > *:nth-child(2) { animation: cyc 12s infinite 3s; }
  .cyc.n4 > *:nth-child(3) { animation: cyc 12s infinite 6s; }
  .cyc.n4 > *:nth-child(4) { animation: cyc 12s infinite 9s; }
}
.cyc > *:last-child { opacity: 1; }              /* reduced-motion fallback */
@media (prefers-reduced-motion: no-preference) { .cyc > *:last-child { opacity: 0; } }
@keyframes cyc {
  0%, 3% { opacity: 0; transform: translateY(7px); }
  8%, 28% { opacity: 1; transform: none; }
  33%, 100% { opacity: 0; transform: translateY(-7px); }
}

/* ---------- SCENE: no transaction fees ---------- */
.nf-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.nf-orders { display: flex; flex-direction: column; gap: 8px; }
.nf-order {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; background: #fff;
}
.nf-order .oi { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.nf-order .oi .lucide { width: 14px; height: 14px; color: #fff; }
.nf-order .grow { flex: 1; }
.nf-order .grow .cm-line { width: 60%; }
.nf-order .amt { font-family: var(--display); font-weight: 800; color: var(--ink); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) {
  .nf-order { opacity: 0; animation: nf-drop .6s cubic-bezier(.2,.7,.2,1) forwards; }
  .nf-order:nth-child(1) { animation-delay: .3s; }
  .nf-order:nth-child(2) { animation-delay: 1.5s; }
  .nf-order:nth-child(3) { animation-delay: 2.7s; }
}
@keyframes nf-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.nf-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nf-meter { border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.nf-meter .lab { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--slate-400); }
.nf-meter .big { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; margin-top: 6px; }
.nf-meter.keep { background: var(--c-teal-bg); border-color: var(--c-teal-bd); }
.nf-meter.keep .big { color: var(--c-teal); }
.nf-meter.fee .big { color: var(--slate-400); }
.nf-bar { height: 7px; border-radius: 4px; background: var(--bg-soft); margin-top: 9px; overflow: hidden; }
.nf-bar i { display: block; height: 100%; border-radius: 4px; }
.nf-bar.keep i { background: linear-gradient(90deg,var(--c-teal),#18b79c); width: 100%; }
.nf-bar.fee i { background: var(--border-strong); width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .nf-bar.keep i { width: 0; animation: nf-fill 3.2s cubic-bezier(.3,.7,.2,1) 1s forwards; }
  .nf-meter.fee .big::after { content: ""; }
}
@keyframes nf-fill { to { width: 100%; } }

/* ---------- SCENE: headless (one backend, every channel) ---------- */
.hl { position: relative; padding: 6px 4px 2px; }
.hl-core {
  margin: 0 auto 4px; width: 82%;
  background: var(--navy-900); color: #fff; border-radius: 12px; padding: 12px 14px;
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .62rem; line-height: 1.7;
  position: relative; z-index: 2;
}
.hl-core .tagm { position: absolute; top: -9px; left: 14px; background: var(--accent); color: #fff; font-family: var(--body); font-weight: 800; font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.hl-core .k { color: #f0a437; } .hl-core .p { color: #8fb4f0; } .hl-core .s { color: #6fc9b8; }
.hl-channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 20px; position: relative; z-index: 2; }
.hl-ch { border: 1px solid var(--border); border-radius: 11px; padding: 12px 6px 10px; text-align: center; background: #fff; }
.hl-ch .ci { width: 34px; height: 34px; border-radius: 10px; margin: 0 auto 8px; display: grid; place-items: center; }
.hl-ch .ci .lucide { width: 17px; height: 17px; color: #fff; }
.hl-ch b { font-size: .64rem; color: var(--ink); font-weight: 700; }
.hl-wire { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hl-wire path { fill: none; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 3 4; }
@media (prefers-reduced-motion: no-preference) {
  .hl-ch { animation: hl-light 8s ease-in-out infinite; }
  .hl-ch:nth-child(1) { animation-delay: .2s; }
  .hl-ch:nth-child(2) { animation-delay: .5s; }
  .hl-ch:nth-child(3) { animation-delay: .8s; }
  .hl-ch:nth-child(4) { animation-delay: 1.1s; }
  .hl-core { animation: hl-pulse 8s ease-in-out infinite; }
  .hl-pulse-dot { offset-path: none; }
}
@keyframes hl-light {
  0%, 100% { border-color: var(--border); box-shadow: none; transform: none; }
  10%, 22% { border-color: var(--accent); box-shadow: 0 8px 20px -10px rgba(216,105,15,.4); transform: translateY(-3px); }
}
@keyframes hl-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(216,105,15,0); } 50% { box-shadow: 0 0 0 4px rgba(216,105,15,.10); } }

/* ---------- SCENE: B2B role-based pricing ---------- */
.b2b-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.b2b-top { display: flex; align-items: center; gap: 11px; padding: 13px; border-bottom: 1px solid var(--border); }
.b2b-top .ph { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-items: center; }
.b2b-top .ph .lucide { width: 22px; height: 22px; color: #fff; }
.b2b-top .grow .cm-line { width: 70%; } .b2b-top .grow .cm-line.s { width: 45%; margin-top: 6px; }
.b2b-price { padding: 14px 13px; }
.b2b-grouprow { display: flex; align-items: center; justify-content: space-between; }
.b2b-group { display: inline-flex; align-items: center; gap: 6px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 20px; }
.b2b-group.retail { background: var(--c-blue-bg); color: var(--c-blue); }
.b2b-group.wholesale { background: var(--c-teal-bg); color: var(--c-teal); }
.b2b-group.distributor { background: var(--accent-soft); color: var(--accent-dark); }
.b2b-amt { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; color: var(--ink); }
.b2b-amt s { color: var(--slate-400); font-size: 1rem; font-weight: 600; margin-right: 8px; }
.b2b-qty { display: flex; gap: 6px; margin-top: 14px; }
.b2b-qty span { flex: 1; text-align: center; font-size: .6rem; font-weight: 700; color: var(--slate-500); border: 1px solid var(--border); border-radius: 7px; padding: 6px 0; }
.b2b-qty span.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- SCENE: international (multi-currency + language) ---------- */
.intl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.intl-loc { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px 4px 5px; font-size: .64rem; font-weight: 700; color: var(--ink); }
.intl-flag { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; display: block; }
.intl-card { border: 1px solid var(--border); border-radius: 12px; padding: 13px; }
.intl-card .ph { height: 84px; border-radius: 10px; display: grid; place-items: center; }
.intl-card .ph .lucide { width: 30px; height: 30px; color: #fff; }
.intl-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.intl-title { font-size: .74rem; font-weight: 700; color: var(--ink); }
.intl-price { font-family: var(--display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; color: var(--ink); }
.intl-btn { margin-top: 12px; text-align: center; font-size: .64rem; font-weight: 800; color: #fff; background: var(--accent); border-radius: 8px; padding: 9px; }
.intl-rtl { direction: rtl; }

@media (max-width: 900px) { .flow .cmock-body { min-height: 0; } }

/* ============================================================
   Tier-2 feature flow scenes
   ============================================================ */

/* ---------- SCENE: abandoned cart recovery (storyboard) ---------- */
.ac-flow { position: relative; padding: 2px 0 2px 2px; }
.ac-item { display: flex; gap: 13px; align-items: flex-start; padding: 7px 0; position: relative; }
.ac-line { position: absolute; left: 16px; top: 24px; bottom: 24px; width: 2px; background: var(--bg-soft); z-index: 0; }
.ac-line i { position: absolute; inset: 0 0 auto 0; height: 0; background: linear-gradient(180deg,var(--accent),var(--c-teal)); border-radius: 2px; }
.ac-node { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg-soft); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); z-index: 1; }
.ac-node .lucide { width: 15px; height: 15px; color: var(--slate-400); }
.ac-body { flex: 1; padding-top: 4px; }
.ac-body b { display: block; font-size: .82rem; color: var(--ink); }
.ac-body small { font-size: .72rem; color: var(--slate-400); }
.ac-mail { margin-top: 8px; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; background: var(--bg-alt); }
.ac-mail .lucide { width: 14px; height: 14px; color: var(--accent); }
.ac-mail span { font-size: .68rem; color: var(--slate-500); font-weight: 600; }
.ac-win { font-family: var(--display); font-weight: 800; color: var(--c-teal); font-size: .82rem; }
.ac-node.i1 { background: var(--c-blue-bg); } .ac-node.i1 .lucide { color: var(--c-blue); }
.ac-node.i2 { background: #fdf0dd; } .ac-node.i2 .lucide { color: var(--accent-dark); }
.ac-node.i3 { background: var(--accent-soft); } .ac-node.i3 .lucide { color: var(--accent-dark); }
.ac-node.i4 { background: var(--c-teal-bg); } .ac-node.i4 .lucide { color: var(--c-teal); }
@media (prefers-reduced-motion: no-preference) {
  .ac-line i { animation: ac-fill 9s cubic-bezier(.4,.6,.3,1) infinite; }
  .ac-item { animation: ac-wake 9s ease infinite; }
  .ac-item:nth-child(2) { }
  .ac-item.s1 { animation-delay: 0s; } .ac-item.s2 { animation-delay: 2.2s; }
  .ac-item.s3 { animation-delay: 4.4s; } .ac-item.s4 { animation-delay: 6.4s; }
  .ac-node { animation: ac-pop 9s ease infinite; }
  .ac-node.i1 { animation-delay: 0s; } .ac-node.i2 { animation-delay: 2.2s; }
  .ac-node.i3 { animation-delay: 4.4s; } .ac-node.i4 { animation-delay: 6.4s; }
}
@keyframes ac-fill { 0% { height: 0; } 80%, 100% { height: 100%; } }
@keyframes ac-wake { 0%, 100% { opacity: .5; } 12%, 90% { opacity: 1; } }
@keyframes ac-pop { 0% { transform: scale(.9); } 8% { transform: scale(1.12); } 16%, 100% { transform: scale(1); } }

/* ---------- SCENE: split payments ---------- */
.sp { display: grid; gap: 12px; }
.sp-in { border: 1px solid var(--c-blue-bd); background: var(--c-blue-bg); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; }
.sp-in .ci { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.sp-in .ci .lucide { width: 17px; height: 17px; color: #fff; }
.sp-in .grow { flex: 1; } .sp-in .grow b { font-size: .78rem; color: var(--ink); } .sp-in .grow small { display: block; font-size: .68rem; color: var(--slate-500); }
.sp-in .amt { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.sp-fork { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-out { border: 1px solid var(--border); border-radius: 11px; padding: 11px; text-align: center; }
.sp-out .ci { width: 30px; height: 30px; border-radius: 8px; margin: 0 auto 7px; display: grid; place-items: center; }
.sp-out .ci .lucide { width: 15px; height: 15px; color: #fff; }
.sp-out .l { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-400); }
.sp-out .v { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--ink); margin-top: 4px; }
.sp-arrow { display: grid; place-items: center; color: var(--slate-400); }
.sp-arrow .lucide { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .sp-in { animation: cm-rise .6s both; }
  .sp-out { opacity: 0; animation: sp-drop 3.4s ease infinite; }
  .sp-out:nth-child(1) { animation-delay: .2s; } .sp-out:nth-child(2) { animation-delay: .5s; }
  .sp-arrow .lucide { animation: cm-float 3.4s ease-in-out infinite; }
}
@keyframes sp-drop { 0% { opacity: 0; transform: translateY(-8px); } 20%, 88% { opacity: 1; transform: none; } 100% { opacity: 1; } }

/* ---------- SCENE: integrations (connecting tiles) ---------- */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.ig-tile { border: 1px solid var(--border); border-radius: 10px; padding: 10px 6px; text-align: center; position: relative; background: #fff; }
.ig-tile .ci { width: 30px; height: 30px; border-radius: 8px; margin: 0 auto 6px; display: grid; place-items: center; }
.ig-tile .ci .lucide { width: 15px; height: 15px; color: #fff; }
.ig-tile b { font-size: .6rem; color: var(--slate-500); font-weight: 700; }
.ig-tile .plug { position: absolute; top: 5px; right: 5px; width: 15px; height: 15px; border-radius: 50%; background: var(--c-teal); display: grid; place-items: center; opacity: 0; }
.ig-tile .plug .lucide { width: 9px; height: 9px; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .ig-tile .plug { animation: ig-connect 6s ease infinite; }
  .ig-tile:nth-child(1) .plug { animation-delay: .3s; } .ig-tile:nth-child(2) .plug { animation-delay: .7s; }
  .ig-tile:nth-child(3) .plug { animation-delay: 1.1s; } .ig-tile:nth-child(4) .plug { animation-delay: 1.5s; }
  .ig-tile:nth-child(5) .plug { animation-delay: 1.9s; } .ig-tile:nth-child(6) .plug { animation-delay: 2.3s; }
}
.ig-tile:last-child .plug { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .ig-tile:last-child .plug { opacity: 0; } }
@keyframes ig-connect { 0% { opacity: 0; transform: scale(0); } 18%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 1; transform: scale(1); } }
