/* ============================================================
   1С:СБП B2B — Presentation styles
   "High-end corporate fintech meets liquid data"
   ============================================================ */

:root {
  /* Graphite base */
  --bg-0: #0a0b0e;
  --bg-1: #0e1014;
  --bg-2: #14171d;
  --panel: rgba(255, 255, 255, 0.022);
  --panel-2: rgba(255, 255, 255, 0.04);
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --ink: #f4f5f7;
  --ink-soft: #b9bdc7;
  --ink-mute: #7c818d;
  --ink-faint: #565b66;

  /* 1C brand */
  --yellow: #ffcc00;
  --yellow-deep: #f0b400;
  --red: #e2231a;
  --red-deep: #c01510;

  --glow-yellow: rgba(255, 204, 0, 0.55);
  --glow-red: rgba(226, 35, 26, 0.45);

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; width: 100%; }

::selection { background: var(--yellow); color: #1a1505; }

/* ---------- Stage / background ---------- */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% -10%, #181b22 0%, rgba(24,27,34,0) 55%),
    radial-gradient(100% 80% at 10% 110%, #15171d 0%, rgba(21,23,29,0) 50%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(110% 90% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(130% 120% at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  pointer-events: none;
  will-change: transform;
}
.orb--yellow { background: radial-gradient(circle, var(--glow-yellow) 0%, rgba(255,204,0,0) 70%); }
.orb--red { background: radial-gradient(circle, var(--glow-red) 0%, rgba(226,35,26,0) 70%); }
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(var(--dx, 40px), var(--dy, 30px)); }
}
.orb { animation: orbDrift 22s ease-in-out infinite; }

/* ---------- Persistent chrome ---------- */
.chrome { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.chrome > * { pointer-events: auto; }

.logo {
  position: absolute;
  top: clamp(20px, 3vh, 40px);
  left: clamp(24px, 3.4vw, 60px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-mark {
  position: relative;
  width: clamp(40px, 3.6vw, 54px);
  height: clamp(40px, 3.6vw, 54px);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 20px);
  letter-spacing: -0.04em;
  color: #1a1505;
  background: linear-gradient(150deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  box-shadow: 0 0 0 1px rgba(255,204,0,0.4), 0 8px 30px rgba(255,204,0,0.22);
}
.logo-mark::after {
  content: "";
  position: absolute;
  right: -3px; bottom: -3px;
  width: 38%; height: 38%;
  border-radius: 6px;
  background: linear-gradient(150deg, var(--red) 0%, var(--red-deep) 100%);
  box-shadow: 0 0 14px rgba(226,35,26,0.55);
}
/* Official 1C logo image variant */
.logo-mark--img {
  width: clamp(46px, 4.2vw, 64px);
  height: clamp(46px, 4.2vw, 64px);
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  filter: drop-shadow(0 2px 8px rgba(255,204,0,0.3));
}
.logo-mark--img::after { display: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-size: clamp(16px, 1.5vw, 22px); font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.logo-text span {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(9px, 0.8vw, 12px);
  letter-spacing: 0.32em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 5px;
  white-space: nowrap;
}

.counter {
  position: absolute;
  top: clamp(20px, 3vh, 40px);
  right: clamp(24px, 3.4vw, 60px);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.counter .cur { color: var(--ink); font-weight: 600; }
.counter .sep { color: var(--ink-faint); }

/* progress */
.progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.05);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--yellow) 100%);
  box-shadow: 0 0 18px rgba(255,204,0,0.5);
  transition: width 0.6s var(--ease);
}

/* nav arrows */
.nav {
  position: absolute;
  bottom: clamp(20px, 3.4vh, 38px);
  right: clamp(24px, 3.4vw, 60px);
  display: flex;
  gap: 12px;
}
.nav-btn {
  width: clamp(44px, 3.6vw, 56px);
  height: clamp(44px, 3.6vw, 56px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.nav-btn:hover {
  color: #1a1505;
  background: linear-gradient(150deg, var(--yellow), var(--yellow-deep));
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(255,204,0,0.3);
  transform: translateY(-2px);
}
.nav-btn:disabled { opacity: 0.28; cursor: default; transform: none; box-shadow: none; }
.nav-btn:disabled:hover { color: var(--ink-soft); background: var(--panel-2); border-color: var(--hairline); }

.dots {
  position: absolute;
  bottom: clamp(26px, 4vh, 46px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.dot.active { background: var(--yellow); box-shadow: 0 0 10px var(--glow-yellow); width: 22px; border-radius: 4px; }

/* ---------- Slide layout ---------- */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 11vh, 130px) clamp(40px, 7vw, 130px);
  z-index: 10;
}
.slide-inner { width: 100%; max-width: 1500px; margin: 0 auto; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(11px, 0.95vw, 14px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: clamp(16px, 2.2vh, 26px);
}
.kicker .num {
  color: var(--yellow);
  font-weight: 700;
}
.kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px var(--glow-yellow);
}

.title {
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.title .accent { color: var(--yellow); }
.subtitle {
  font-size: clamp(16px, 1.55vw, 25px);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 60ch;
  text-wrap: pretty;
}

.lead {
  font-size: clamp(15px, 1.35vw, 21px);
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Glass card ---------- */
.glass {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-hi { background: var(--panel-2); }

/* icon chip */
.chip {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(255,204,0,0.16), rgba(255,204,0,0.04));
  border: 1px solid rgba(255,204,0,0.2);
  color: var(--yellow);
  box-shadow: inset 0 0 18px rgba(255,204,0,0.08);
}
.chip--red {
  background: linear-gradient(160deg, rgba(226,35,26,0.16), rgba(226,35,26,0.03));
  border-color: rgba(226,35,26,0.22);
  color: #ff5a51;
  box-shadow: inset 0 0 18px rgba(226,35,26,0.07);
}
.chip--ghost {
  background: var(--panel-2);
  border-color: var(--hairline);
  color: var(--ink-soft);
  box-shadow: none;
}

.num-badge {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--yellow);
  -webkit-text-stroke: 0;
  line-height: 1;
}

.gradient-text {
  background: linear-gradient(100deg, #fff 0%, #fff 28%, var(--yellow) 55%, var(--yellow-deep) 78%, #fff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheenText 9s ease-in-out infinite;
}
@keyframes sheenText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ---------- Idle life: hover, sheen, breathe, scan, particles ---------- */

/* cards respond to the cursor */
.glass, .flow-node {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.glass:hover {
  transform: translateY(-5px);
  border-color: var(--hairline-strong);
  box-shadow: 0 22px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,204,0,0.12), 0 0 38px rgba(255,204,0,0.07);
}
.flow-node:hover {
  transform: translateY(-3px);
  border-color: rgba(255,204,0,0.3);
}

/* gentle breathing glow on brand icon chips */
@keyframes chipBreathe {
  0%, 100% { box-shadow: inset 0 0 18px rgba(255,204,0,0.06), 0 0 0 rgba(255,204,0,0); }
  50% { box-shadow: inset 0 0 22px rgba(255,204,0,0.16), 0 0 22px rgba(255,204,0,0.12); }
}
.chip:not(.chip--ghost):not(.chip--red) { animation: chipBreathe 5.5s ease-in-out infinite; }
.chip--red { animation: chipBreathe 5.5s ease-in-out infinite; }

/* sweeping light across a surface */
.sheen-host { position: relative; overflow: hidden; }
.sheen-host::after {
  content: "";
  position: absolute;
  top: -60%; left: -120%;
  width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.14) 50%, transparent);
  transform: rotate(8deg);
  animation: sheenSweep 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheenSweep {
  0% { left: -120%; }
  55%, 100% { left: 160%; }
}

/* status dot pulse */
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.6;
  animation: pulseRing 2.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* QR scan line */
.qr-scan {
  position: absolute;
  left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  box-shadow: 0 0 14px var(--glow-yellow);
  border-radius: 2px;
  animation: qrScan 3.4s cubic-bezier(0.45,0,0.55,1) infinite;
}
@keyframes qrScan {
  0%, 100% { top: 12%; opacity: 0; }
  12% { opacity: 1; }
  50% { top: 84%; opacity: 1; }
  62% { opacity: 0; }
}

/* travelling particle along a flow connector */
.flow-particle {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--glow-yellow);
  top: 50%;
}
.flow-conn-h { position: relative; flex: 1 1 0; min-width: 14px; }
.flow-conn-h .flow-particle {
  margin-top: -3.5px;
  animation: travelH 2.6s linear infinite;
}
@keyframes travelH {
  0% { left: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.flow-conn-v { position: relative; }
.flow-conn-v .flow-particle {
  left: 50%; margin-left: -3.5px; top: 0;
  animation: travelV 2.2s linear infinite;
}
@keyframes travelV {
  0% { top: 0%; opacity: 0; }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* parallax layer wrapper */
.parallax { position: absolute; inset: 0; will-change: transform; transition: transform 0.9s cubic-bezier(0.16,1,0.3,1); }

/* flow node / arrow */
.flow-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(14px, 1.5vw, 22px) clamp(16px, 1.8vw, 26px);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  border: 1px solid var(--hairline);
}
.flow-node.is-key {
  background: linear-gradient(150deg, rgba(255,204,0,0.14), rgba(255,204,0,0.03));
  border-color: rgba(255,204,0,0.3);
  box-shadow: 0 0 40px rgba(255,204,0,0.1);
}

.glow-line { color: var(--yellow); filter: drop-shadow(0 0 6px var(--glow-yellow)); }

/* qr placeholder */
.qr {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 8px, transparent 8px 16px),
    var(--panel-2);
  border: 1px dashed var(--hairline-strong);
  color: var(--ink-faint);
}

.mono-label {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(9px, 0.75vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hairline { height: 1px; background: var(--hairline); border: 0; width: 100%; }

.hint {
  position: absolute;
  bottom: clamp(22px, 3.6vh, 40px);
  left: clamp(24px, 3.4vw, 60px);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(9px, 0.72vw, 11px);
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  z-index: 40;
}

/* ============================================================
   CINEMATIC UPGRADE LAYER
   ============================================================ */

/* ---- Ambient drifting light (slow shifting radial coords) ---- */
.ambient {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(34% 40% at var(--ax, 70%) var(--ay, 20%), rgba(255,204,0,0.16), transparent 70%),
    radial-gradient(40% 44% at var(--bx, 18%) var(--by, 86%), rgba(226,35,26,0.12), transparent 72%);
  animation: ambientShift 26s ease-in-out infinite;
  will-change: background-position, transform;
}
@keyframes ambientShift {
  0%   { --ax: 68%; --ay: 14%; --bx: 16%; --by: 84%; }
  33%  { --ax: 82%; --ay: 38%; --bx: 30%; --by: 66%; }
  66%  { --ax: 54%; --ay: 26%; --bx: 10%; --by: 92%; }
  100% { --ax: 68%; --ay: 14%; --bx: 16%; --by: 84%; }
}
@property --ax { syntax: '<percentage>'; inherits: true; initial-value: 70%; }
@property --ay { syntax: '<percentage>'; inherits: true; initial-value: 20%; }
@property --bx { syntax: '<percentage>'; inherits: true; initial-value: 18%; }
@property --by { syntax: '<percentage>'; inherits: true; initial-value: 86%; }

/* sweeping laser beam (cover) */
.laser {
  position: absolute;
  top: -30%;
  bottom: -30%;
  width: 2px;
  left: 0;
  background: linear-gradient(180deg, transparent, var(--yellow) 45%, #fff 50%, var(--yellow) 55%, transparent);
  filter: blur(0.4px) drop-shadow(0 0 6px var(--glow-yellow));
  opacity: 0;
  transform: skewX(-14deg);
  animation: laserSweep 9s cubic-bezier(0.7,0,0.3,1) infinite;
  pointer-events: none;
}
.laser.l2 { animation-delay: 4.5s; background: linear-gradient(180deg, transparent, var(--red) 45%, #fff 50%, var(--red) 55%, transparent); filter: blur(0.4px) drop-shadow(0 0 6px var(--glow-red)); }
@keyframes laserSweep {
  0%   { left: -6%; opacity: 0; }
  8%   { opacity: 0.28; }
  40%  { opacity: 0.28; }
  52%  { left: 106%; opacity: 0; }
  100% { left: 106%; opacity: 0; }
}

/* ---- 3D tilt wrapper ---- */
.tilt-scene { perspective: 1300px; }
.tilt-inner {
  transition: transform 0.45s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-layer { transform: translateZ(40px); transform-style: preserve-3d; }

/* moving glare overlay for glass slabs / QR */
.glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.16) 48%, rgba(255,255,255,0.04) 54%, transparent 66%);
  background-size: 280% 280%;
  background-position: var(--glare-pos, 120% 0%);
  transition: background-position 0.2s linear;
  mix-blend-mode: screen;
}
.glare--auto { animation: glareMove 5.5s ease-in-out infinite; }
@keyframes glareMove {
  0%, 100% { background-position: 130% 0%; }
  50% { background-position: -30% 0%; }
}

/* ---- Neural pipeline SVG ---- */
.neural { width: 100%; display: block; overflow: visible; }
.neural-line { fill: none; stroke: rgba(255,204,0,0.16); stroke-width: 2; }
.neural-flow {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--glow-yellow));
  stroke-dasharray: 34 360;
  animation: neuralDash 3.2s linear infinite;
}
@keyframes neuralDash { to { stroke-dashoffset: -394; } }
.neural-orb-core { filter: drop-shadow(0 0 10px var(--glow-yellow)); }

/* ---- Gooey elastic payment widget ---- */
.pay-spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: var(--yellow);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-burst {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #43e08a;
  box-shadow: 0 0 10px #43e08a;
  pointer-events: none;
}

/* ---- Kinetic watermark type ---- */
.kinetic-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.kinetic-word {
  position: absolute;
  white-space: nowrap;
  font-weight: 800;
  font-size: clamp(120px, 17vw, 280px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.05);
  opacity: 0.9;
  will-change: transform;
}
.kinetic-word.solid {
  -webkit-text-stroke: 0;
  color: rgba(255,204,0,0.045);
}
@keyframes kineticL { from { transform: translateX(8%); } to { transform: translateX(-60%); } }
@keyframes kineticR { from { transform: translateX(-60%); } to { transform: translateX(8%); } }

/* ============================================================
   PRESENTER LIVE LAYER
   Everything reacts to the cursor so the speaker can point,
   spotlight, and "tap" attention onto any element mid-pitch.
   ============================================================ */

@media (hover: hover) and (pointer: fine) {

  /* ---- Universal card pop (override framer inline transform only on hover) ---- */
  .glass:hover {
    transform: translateY(-6px) scale(1.022) !important;
    border-color: rgba(255, 204, 0, 0.4) !important;
    box-shadow:
      0 28px 72px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 204, 0, 0.28),
      0 0 56px rgba(255, 204, 0, 0.16) !important;
    z-index: 6;
  }
  /* red-toned groups glow red instead */
  .glass[style*="226,35,26"]:hover,
  .glass[style*="226, 35, 26"]:hover {
    border-color: rgba(226, 35, 26, 0.42) !important;
    box-shadow:
      0 28px 72px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(226, 35, 26, 0.3),
      0 0 56px rgba(226, 35, 26, 0.18) !important;
  }

  /* ---- Icon chips: scale + ignite when their card (or themselves) is hovered ---- */
  .chip { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease); }
  .chip svg { transition: transform 0.45s var(--ease); }
  .glass:hover .chip:not(.chip--ghost):not(.chip--red),
  .chip:not(.chip--ghost):not(.chip--red):hover {
    transform: scale(1.09);
    border-color: rgba(255, 204, 0, 0.55);
    box-shadow: inset 0 0 28px rgba(255, 204, 0, 0.3), 0 0 30px rgba(255, 204, 0, 0.28);
  }
  .glass:hover .chip--ghost,
  .chip--ghost:hover {
    transform: scale(1.09);
    border-color: var(--hairline-strong);
    color: var(--yellow);
    box-shadow: 0 0 24px rgba(255, 204, 0, 0.12);
  }
  .glass:hover .chip--red,
  .chip--red:hover {
    transform: scale(1.09);
    border-color: rgba(226, 35, 26, 0.55);
    box-shadow: inset 0 0 28px rgba(226, 35, 26, 0.26), 0 0 30px rgba(226, 35, 26, 0.3);
  }
  .glass:hover .chip svg,
  .chip:hover svg { transform: scale(1.12) rotate(-4deg); }

  /* number badge brightens with its card */
  .glass:hover .num-badge { color: #fff; text-shadow: 0 0 18px var(--glow-yellow); transition: color 0.4s, text-shadow 0.4s; }

  /* ---- flow nodes ---- */
  .flow-node { cursor: default; }
  .flow-node:hover {
    transform: translateY(-4px) scale(1.015) !important;
    border-color: rgba(255, 204, 0, 0.4) !important;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 204, 0, 0.1);
  }
  .flow-node:hover .chip:not(.chip--ghost) {
    transform: scale(1.08);
    box-shadow: inset 0 0 26px rgba(255, 204, 0, 0.28), 0 0 26px rgba(255, 204, 0, 0.22);
  }

  /* ---- QR placeholders come to life ---- */
  .qr { transition: border-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease); cursor: default; }
  .qr:hover {
    border-color: rgba(255, 204, 0, 0.6);
    border-style: solid;
    color: var(--yellow);
    box-shadow: 0 0 48px rgba(255, 204, 0, 0.16);
    transform: scale(1.03);
  }
  .qr:hover .qr-scan { animation-duration: 1.5s; }

  /* ---- nav dots: bigger, brighter, clearer hit ---- */
  .dot { cursor: pointer; }
  .dot:hover { background: var(--yellow); box-shadow: 0 0 12px var(--glow-yellow); transform: scale(1.5); }

  /* ---- kicker dot glows brighter on title hover ---- */
  .kicker { transition: color 0.4s var(--ease); }
  .kicker:hover { color: var(--ink-soft); }
  .kicker:hover .kicker-dot { box-shadow: 0 0 20px var(--glow-yellow); animation: chipBreathe 1.4s ease-in-out infinite; }

  /* ---- title responds with a soft glow when pointed at ---- */
  .title { transition: text-shadow 0.5s var(--ease); }
  .title:hover { text-shadow: 0 0 42px rgba(255, 204, 0, 0.14); }
}

/* 3D grid scroll animation */
@keyframes gridScroll {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 60px, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .laser, .kinetic-layer, .glare { display: none !important; }
}

/* ============================================================
   LIGHT THEME
   ============================================================ */

/* smooth transition between themes */
html, body,
.stage, .glass, .chip, .flow-node, .qr, .nav-btn, .dot, .progress,
.logo-mark, .kicker, .title, .subtitle, .lead, .mono-label, .hairline,
.hint, .counter, .chrome {
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

[data-theme="light"] {
  /* Graphite base → warm white */
  --bg-0: #f5f3ef;
  --bg-1: #efece7;
  --bg-2: #e8e5df;
  --panel: rgba(0, 0, 0, 0.028);
  --panel-2: rgba(0, 0, 0, 0.045);
  --hairline: rgba(0, 0, 0, 0.1);
  --hairline-strong: rgba(0, 0, 0, 0.18);

  /* Text → dark */
  --ink: #1a1a1f;
  --ink-soft: #4a4a55;
  --ink-mute: #7a7a88;
  --ink-faint: #a0a0ac;

  /* Brand — slightly richer for light bg contrast */
  --yellow: #e6b800;
  --yellow-deep: #cc9e00;
  --red: #d41a12;
  --red-deep: #b01008;

  --glow-yellow: rgba(230, 184, 0, 0.4);
  --glow-red: rgba(212, 26, 18, 0.35);
}

/* Stage background */
[data-theme="light"] .stage {
  background:
    radial-gradient(120% 90% at 78% -10%, #ebe8e2 0%, rgba(235,232,226,0) 55%),
    radial-gradient(100% 80% at 10% 110%, #e5e2dc 0%, rgba(229,226,220,0) 50%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
}

/* Grid: dark lines on light */
[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* Vignette: lighter */
[data-theme="light"] .vignette {
  background: radial-gradient(130% 120% at 50% 50%, transparent 55%, rgba(0,0,0,0.08) 100%);
}

/* Orbs — muted for light theme */
[data-theme="light"] .orb { filter: blur(90px); opacity: 0.3; }
[data-theme="light"] .orb--yellow { background: radial-gradient(circle, rgba(230,184,0,0.35) 0%, rgba(230,184,0,0) 70%); }
[data-theme="light"] .orb--red { background: radial-gradient(circle, rgba(212,26,18,0.25) 0%, rgba(212,26,18,0) 70%); }

/* Ambient */
[data-theme="light"] .ambient {
  mix-blend-mode: multiply;
  opacity: 0.3;
}

/* Glass cards */
[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .glass::before {
  background: linear-gradient(160deg, rgba(255,255,255,0.8), rgba(255,255,255,0) 40%);
}
[data-theme="light"] .glass-hi {
  background: rgba(255, 255, 255, 0.75);
}

/* Glass hover */
@media (hover: hover) and (pointer: fine) {
  [data-theme="light"] .glass:hover {
    box-shadow:
      0 22px 60px rgba(0,0,0,0.1),
      0 0 0 1px rgba(230,184,0,0.2),
      0 0 38px rgba(230,184,0,0.08) !important;
  }
}

/* Chip */
[data-theme="light"] .chip {
  background: linear-gradient(160deg, rgba(230,184,0,0.18), rgba(230,184,0,0.06));
  border-color: rgba(230,184,0,0.25);
  box-shadow: inset 0 0 12px rgba(230,184,0,0.08);
}
[data-theme="light"] .chip--ghost {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--ink-soft);
  box-shadow: none;
}
[data-theme="light"] .chip--red {
  background: linear-gradient(160deg, rgba(212,26,18,0.14), rgba(212,26,18,0.04));
  border-color: rgba(212,26,18,0.2);
}

/* Flow nodes */
[data-theme="light"] .flow-node {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .flow-node.is-key {
  background: linear-gradient(150deg, rgba(230,184,0,0.14), rgba(230,184,0,0.04));
  border-color: rgba(230,184,0,0.3);
  box-shadow: 0 0 30px rgba(230,184,0,0.08);
}

/* QR blocks */
[data-theme="light"] .qr {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.025) 0 8px, transparent 8px 16px),
    rgba(255,255,255,0.6);
  border-color: rgba(0, 0, 0, 0.14);
}

/* Nav buttons */
[data-theme="light"] .nav-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--ink-soft);
}
[data-theme="light"] .nav-btn:hover {
  color: #1a1505;
  background: linear-gradient(150deg, var(--yellow), var(--yellow-deep));
  box-shadow: 0 8px 24px rgba(230,184,0,0.25);
}
[data-theme="light"] .nav-btn:disabled:hover {
  color: var(--ink-soft);
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.1);
}

/* Dots */
[data-theme="light"] .dot { background: rgba(0, 0, 0, 0.14); }
[data-theme="light"] .dot.active { background: var(--yellow); box-shadow: 0 0 10px var(--glow-yellow); }

/* Progress */
[data-theme="light"] .progress { background: rgba(0, 0, 0, 0.06); }

/* Selection */
[data-theme="light"] ::selection { background: var(--yellow); color: #1a1505; }

/* Logo mark */
[data-theme="light"] .logo-mark {
  box-shadow: 0 0 0 1px rgba(230,184,0,0.3), 0 4px 16px rgba(230,184,0,0.18);
}

/* Glare — tone down on light */
[data-theme="light"] .glare {
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.4) 48%, rgba(255,255,255,0.1) 54%, transparent 66%);
  mix-blend-mode: soft-light;
}

/* Laser */
[data-theme="light"] .laser { opacity: 0; animation: none; }
[data-theme="light"] .laser.l2 { opacity: 0; animation: none; }

/* Kinetic words */
[data-theme="light"] .kinetic-word {
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .kinetic-word.solid {
  -webkit-text-stroke: 0;
  color: rgba(230, 184, 0, 0.06);
}

/* Pay spinner */
[data-theme="light"] .pay-spinner {
  border-color: rgba(0, 0, 0, 0.12);
  border-top-color: var(--yellow);
}

/* Sheen sweep */
[data-theme="light"] .sheen-host::after {
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5) 50%, transparent);
}

/* Neural pipeline */
[data-theme="light"] .neural-line { stroke: rgba(230,184,0,0.18); }

/* ---- Theme toggle button ---- */
.theme-toggle {
  position: absolute;
  bottom: clamp(22px, 3.6vh, 40px);
  left: clamp(24px, 3.4vw, 60px);
  width: clamp(36px, 3vw, 44px);
  height: clamp(36px, 3vw, 44px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  z-index: 50;
  padding: 0;
  outline: none;
}
.theme-toggle:hover {
  color: var(--yellow);
  border-color: rgba(255,204,0,0.4);
  box-shadow: 0 0 24px var(--glow-yellow);
  transform: scale(1.12);
}
[data-theme="light"] .theme-toggle:hover {
  box-shadow: 0 0 20px rgba(230,184,0,0.2);
}

/* Move hint to make room for toggle */
.hint {
  left: clamp(76px, 7vw, 120px) !important;
}