/* ---------- scrolly: one sale through the rail (pinned dark block) ---------- */
.scrolly { background: #0E0E12; color: #F2F2F0; height: 800vh; position: relative; }
.scrolly-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.scrolly-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; width: 100%; }
.scrolly-copy h2 { color: #F2F2F0; margin-bottom: 8px; }
.scrolly-copy .eyebrow { color: rgba(242,242,240,0.5); }
.scrolly-copy .eyebrow::before { background: #6D82FF; }
.scrolly-copy { position: relative; }
.scap { position: absolute; top: calc(100% + 26px); left: 0; right: 0; opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1); }
.scap h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.scap p { color: rgba(242,242,240,0.58); max-width: 34ch; }
.scap.on { opacity: 1; transform: none; }
.scap .w { display: inline-block; opacity: 0; transform: translateY(0.7em); transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1); }
.scap.on .w { opacity: 1; transform: none; transition-delay: var(--wd, 0ms); }

/* the infrastructure panel */
.flowpanel {
  position: relative;
  background: linear-gradient(180deg, #15151B, #101014 70%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 0 8px rgba(255,255,255,0.025), 0 40px 100px rgba(0,0,0,0.5);
  padding: 48px 10px 16px;
  overflow: hidden;
}
.flowpanel::before {
  content: ""; position: absolute; inset: -44px 0 0 -44px; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 44px 100%;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 45%, #000 20%, transparent 100%);
  mask-image: radial-gradient(80% 80% at 50% 45%, #000 20%, transparent 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .flowpanel::before { animation: griddrift 60s linear infinite; }
  @keyframes griddrift { from { transform: translate(0, 0); } to { transform: translate(44px, 44px); } }
}
.flowpanel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: radial-gradient(46% 40% at 54% 42%, rgba(109,130,255,0.09), transparent 74%);
}
.flowpanel { display: flex; align-items: center; min-height: 520px; }

.statusrail { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.statuschip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1A1A21; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; padding: 7px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem; font-weight: 600; color: #E8E8E4;
  transition: border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.statuschip i { width: 7px; height: 7px; border-radius: 50%; background: #6E6E76; transition: background 0.3s ease, box-shadow 0.3s ease; flex: none; }
.statuschip.ok i { background: var(--success); box-shadow: 0 0 10px rgba(31,175,98,0.7); }
.statuschip.credit { opacity: 0; transform: translateY(-6px); }
.statuschip.credit i { background: #6D82FF; }
.statuschip.credit.on { opacity: 1; transform: none; }

/* ---------- the transaction scene: teardown, snap, pocket, return ---------- */
.sxstage { position: relative; width: 100%; max-width: 560px; height: 420px; margin: 0 auto; z-index: 1; }
.sxstage .actor { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.sx-cam { position: absolute; inset: 0; will-change: transform; }
.sx-vig { position: absolute; inset: -30px; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(62% 56% at 50% 47%, transparent 42%, rgba(0, 0, 0, 0.6) 100%); }
.sx-floor { position: absolute; left: 0; top: 0; width: 300px; height: 42px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 66%); filter: blur(7px); opacity: 0; }

/* mini terminal (continuity with the hero object) */
.sx-term { width: 190px; }
.sx-tbody { position: relative; width: 190px; height: 172px;
  background: linear-gradient(180deg, #24242C, #17171D 58%, #1A1A21);
  border: 1px solid rgba(255,255,255,0.11); border-radius: 16px;
  box-shadow: 0 22px 44px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1); }
.sx-chan { position: absolute; left: 8px; right: 8px; top: 6px; height: 20px; border-radius: 7px;
  background: linear-gradient(180deg, #08080C, #101016); box-shadow: inset 0 2px 4px rgba(0,0,0,0.75); }
.sx-screen { position: absolute; left: 16px; right: 16px; top: 46px; height: 74px; border-radius: 10px;
  background: linear-gradient(165deg, #0A0A10, #10101A); border: 1px solid rgba(255,255,255,0.07);
  padding: 12px 12px 0; overflow: hidden; }
.sx-screen .st { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242,242,240,0.55); transition: color 0.3s ease; white-space: nowrap; }
.sx-screen .sa { margin-top: 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86rem; font-weight: 700; color: #E8E8E4; }
.sx-term.ok .sx-screen .st { color: #5ECF96; }
.sx-tled { position: absolute; right: 18px; bottom: 16px; width: 7px; height: 7px; border-radius: 50%;
  background: #4A4A54; transition: background 0.3s ease, box-shadow 0.3s ease; }
.sx-term.ok .sx-tled { background: var(--success); box-shadow: 0 0 9px rgba(31,175,98,0.75); }
.sx-card { width: 130px; height: 80px; z-index: 2; }
.sx-card .ci { position: absolute; inset: 0; border-radius: 10px; overflow: hidden;
  background: linear-gradient(132deg, #21212A, #15151B 55%, #1B1B23);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 8px rgba(0,0,0,0.35); }
.sx-card .cchip2 { position: absolute; left: 12px; top: 22px; width: 20px; height: 15px; border-radius: 3px;
  background: linear-gradient(135deg, #D8D8D2, #9A9A94 60%, #C4C4BE); }
.sx-card .cnum2 { position: absolute; left: 12px; bottom: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.66rem; letter-spacing: 0.12em; color: rgba(242,242,240,0.8); }
.sx-wall { width: 190px; height: 22px; z-index: 3;
  background: linear-gradient(180deg, #282833, #1C1C23 65%, #17171D);
  border: 1px solid rgba(255,255,255,0.12); border-top-color: rgba(255,255,255,0.26);
  border-radius: 7px; box-shadow: 0 5px 10px rgba(0,0,0,0.3); }

/* the exploded card: real layers, real perspective, engineered teardown */
.sx-card { perspective: 1100px; }
.c3d { position: absolute; inset: 0; transform-style: preserve-3d; }
.cl { position: absolute; inset: 0; border-radius: 10px; will-change: transform;
  border: 1px solid rgba(255,255,255,0.07); }
.cl-back { background: linear-gradient(150deg, #17171D, #101015 70%);
  border-color: rgba(255,255,255,0.05); }
.cl-back::after { content: ""; position: absolute; left: 10px; right: 46px; top: 30px; height: 12px;
  border-radius: 3px; background: rgba(242,242,240,0.1); }
.cl-core { background: linear-gradient(150deg, #1C1C23, #14141A 65%);
  border-color: rgba(255,255,255,0.06); }
.cl-mag { background: linear-gradient(150deg, rgba(26,26,32,0.94), rgba(18,18,24,0.94));
  border-color: rgba(255,255,255,0.05); }
.cl-mag::after { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 22px;
  background: linear-gradient(180deg, #0A0A0D, #050507); }
.cl-fee { top: auto; height: 15%; bottom: 10%; border-radius: 4px;
  background: linear-gradient(170deg, #D25A2C, #A83D18 80%);
  border-color: rgba(240,112,60,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 0 rgba(240,112,60,0);
  transition: box-shadow 0.4s ease; }
.cl-fee::after { content: ""; position: absolute; left: 6px; right: 6px; top: 45%; height: 1px;
  background: rgba(0,0,0,0.25); }
.cl-fee.lit { box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 22px rgba(240,112,60,0.6); }
.cl-coil { background: transparent; border: none; }
.cl-coil::before, .cl-coil::after { content: ""; position: absolute; border-radius: 8px;
  border: 1.5px solid rgba(196,152,108,0.5); }
.cl-coil::before { inset: 7px 9px; }
.cl-coil::after { inset: 13px 16px; border-color: rgba(196,152,108,0.32); }
.cl-face { background: linear-gradient(132deg, #21212A, #15151B 55%, #1B1B23);
  border-color: rgba(255,255,255,0.15); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); }
.cl-face::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 45%, transparent 60%); }
.cl-face .cchip2 { position: absolute; left: 12px; top: 22px; width: 20px; height: 15px; border-radius: 3px;
  background: linear-gradient(135deg, #D8D8D2, #9A9A94 60%, #C4C4BE); }
.cl-face .cchip2::after { content: ""; position: absolute; inset: 3px 2px;
  border-top: 1px solid rgba(20,20,20,0.35); border-bottom: 1px solid rgba(20,20,20,0.35); }
.cl-face .cwave2 { position: absolute; left: 40px; top: 23px; width: 13px; height: 13px; }
.cl-face .cwave2 path { fill: none; stroke: rgba(242,242,240,0.4); stroke-width: 1.2; stroke-linecap: round; }
.cl-face .cbrand2 { position: absolute; top: 9px; right: 11px; font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242,242,240,0.4); }
.cl-face .cnum2 { position: absolute; left: 12px; bottom: 22px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.66rem; letter-spacing: 0.12em; color: rgba(242,242,240,0.85);
  text-shadow: 0 1px 1px rgba(0,0,0,0.8), 0 -0.5px 0 rgba(255,255,255,0.18); }
.cl-face .crow2 { position: absolute; left: 12px; right: 11px; bottom: 9px; display: flex; justify-content: space-between;
  font-size: 0.44rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(242,242,240,0.4);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.cl-chipm { inset: auto; left: 12px; top: 22px; width: 20px; height: 15px; border-radius: 3px;
  background: linear-gradient(135deg, #D8D8D2, #9A9A94 60%, #C4C4BE);
  border-color: rgba(255,255,255,0.32); }
.cl-chipm::after { content: ""; position: absolute; inset: 3px 2px;
  border-top: 1px solid rgba(20,20,20,0.35); border-bottom: 1px solid rgba(20,20,20,0.35); }

.sx-tag { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.74rem; font-weight: 700;
  white-space: nowrap; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.sx-tag::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: 0.55; }
.sx-tag.r { flex-direction: row-reverse; }
.sx-tag.tech { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(242,242,240,0.48); }
.sx-striplab { color: #F0906A; }
.sx-salelab { color: rgba(242,242,240,0.62); }
@media (max-width: 860px) { .sx-tag.tech { display: none; } }

/* the traveling value chip: fee out, credit back */
.sx-chip { padding: 7px 13px; border-radius: 9px; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem; font-weight: 700;
  color: #F0906A; background: #241A16; border: 1px solid rgba(240,112,60,0.6);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 16px rgba(240,112,60,0.25);
  transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; }
.sx-chip.back { color: #A9B7FF; background: #171B33; border-color: rgba(109,130,255,0.7);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 18px rgba(109,130,255,0.35); }
.sx-mini { padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.7rem; font-weight: 700;
  color: #A9B7FF; background: #171B33; border: 1px solid rgba(109,130,255,0.65); }

/* customer credit pocket */
.sx-pocket { width: 172px; border-radius: 14px; padding: 13px 15px 12px;
  background: linear-gradient(165deg, rgba(35,35,44,0.9), rgba(19,19,25,0.92));
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sx-pocket .pk-h { display: flex; justify-content: space-between; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242,242,240,0.45); }
.sx-pocket .pk-l { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242,242,240,0.4); margin-top: 10px; }
.sx-pocket .pk-b { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.5rem; font-weight: 700;
  color: #F2F2F0; letter-spacing: -0.01em; margin-top: 2px; transition: color 0.35s ease; }
.sx-pocket.lit { border-color: rgba(109,130,255,0.55); }
.sx-pocket.lit .pk-b { color: #A9B7FF; }
.sx-pocket::after { content: ""; position: absolute; inset: -2px; border-radius: 15px;
  border: 1.5px solid rgba(109,130,255,0.8); opacity: 0; pointer-events: none; }
.sx-pocket.hit::after { animation: pkring 0.8s var(--ease-standard); }
@keyframes pkring { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.22); } }

/* return-visit bill */
.sx-bill { width: 210px; border-radius: 14px; padding: 14px 16px 13px;
  background: linear-gradient(160deg, #1B1B22, #131319 70%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.sx-bill .b-h { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.62rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242,242,240,0.45); }
.sx-bill .b-v { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.7rem; font-weight: 700;
  color: #F2F2F0; margin-top: 4px; }
.sx-bill .b-app { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #A9B7FF;
  opacity: 0; }
.sx-bill .b-app i { width: 5px; height: 5px; border-radius: 50%; background: #6D82FF; }
.sx-stamp { padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #5ECF96; background: rgba(31,175,98,0.1); border: 1px solid rgba(31,175,98,0.45); }
.sx-later { padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #A9B7FF; background: rgba(109,130,255,0.12); border: 1px solid rgba(109,130,255,0.32); }
.sx-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sx-trail path { fill: none; stroke: #6D82FF; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(109,130,255,0.6)); }
.statuschip.visit { opacity: 0; transform: translateY(-6px); }
.statuschip.visit i { background: var(--success); }
.statuschip.visit.on { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .sxstage { max-width: 330px; height: 452px; }
  .sx-plate { width: 280px; height: 188px; }
  .sx-plate .pv { font-size: 2.1rem; margin-top: 26px; }
  .sx-strip { width: 280px; }
  .sx-back { width: 260px; height: 174px; }
  .sx-pocket { width: 158px; }
  .sx-bill { width: 196px; }
}


.scrollcue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(242,242,240,0.4); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  pointer-events: none;
}
.scrollcue i { display: block; width: 1px; height: 26px;
  background: linear-gradient(rgba(242,242,240,0.65), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .scrollcue i { animation: cuedrop 1.7s cubic-bezier(0.16,1,0.3,1) infinite; }
  @keyframes cuedrop {
    0% { transform: scaleY(0); transform-origin: top; }
    45% { transform: scaleY(1); transform-origin: top; }
    55% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
  }
}
@media (prefers-reduced-motion: reduce) { .scrollcue { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .scrolly { height: auto; padding: 80px 0; }
  .scrolly-pin { position: static; height: auto; overflow: visible; }
  .scap { position: static; opacity: 1; transform: none; margin-top: 22px; }
  .node.active .npulse { animation: none; }
}
@media (max-width: 860px) {
  .scrolly { height: 700vh; }
  .scrolly-pin { align-items: flex-start; }
  .scrolly-grid { grid-template-columns: 1fr; gap: 18px; align-content: start; padding-top: 72px; }
  .scrolly-copy { min-height: 232px; }
  .scap { top: 104px; }
  .flowpanel { padding: 14px 14px 12px; }
  .flowpanel { min-height: 0; }
  .statusrail { top: 12px; right: 12px; gap: 6px; }
  .statuschip { font-size: 0.7rem; padding: 5px 11px; }
  .statuschip .crlong { display: none; }
  .node .nlabel { font-size: 15px; }
  .node .nsub { font-size: 13.5px; }
  .node .storeamt { font-size: 16px; }
  #pkt text, #feetok text { font-size: 14.5px; }
  #railcard .cardnum { font-size: 14px; }
  #railcard .cardsub { font-size: 13px; }
}

