/* ==========================================================================
   Lumen motion layer (optional)
   The Lumen design system says "no decorative motion". This file is a
   deliberate, removable exception. To switch ALL animation off, delete the
   lumen-motion .css <link>, the motion .js <script> and the small inline
   script in <head> from each page. Everything here is skipped for visitors
   who prefer reduced motion (they see the finished, still versions).
   ========================================================================== */

:root {
  --motion-dist: 12px;
  --motion-time: 360ms;
  --motion-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reveal on scroll (only when html.motion is set by the head script) ---------- */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(var(--motion-dist));
  transition: opacity var(--motion-time) var(--motion-ease), transform var(--motion-time) var(--motion-ease);
  transition-delay: var(--d, 0ms);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }
/* a revealed block animates once; things inside it ride along */
.motion [data-reveal] [data-reveal] { opacity: 1; transform: none; transition: none; }
/* anything already on screen at load appears almost immediately */
.motion [data-reveal][data-first] { --motion-time: 260ms; }

/* ---------- Headlines: words rise out of a mask ---------- */
.motion [data-split]:not(.is-split) { opacity: 0; }
.motion .wm {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: .1em .06em .18em; margin: -.1em -.06em -.18em;
}
.motion .wi {
  display: inline-block; transform: translateY(112%);
  transition: transform 620ms var(--motion-ease); transition-delay: calc(var(--k, 0) * 55ms);
}
.motion [data-split].is-in .wi { transform: none; }

/* Headline highlight: the Volt mark wipes in behind the word */
.motion .on-volt-mark { color: var(--paper); transition: color 150ms ease-out 480ms; }
.motion .on-volt-mark::before { transform: scaleX(0); transition: transform 460ms var(--motion-ease) 420ms; }
.motion [data-split].is-in .on-volt-mark { color: var(--ink); }
.motion [data-split].is-in .on-volt-mark::before { transform: none; }

/* Label dots switch on */
.motion .label[data-reveal]::before { transform: scale(0); }
.motion .label[data-reveal].is-in::before { transform: none; transition: transform 380ms var(--motion-ease) 260ms; }

/* ---------- Hover and focus nudges (colour and small arrow shifts only) ---------- */
.btn .icon, .text-link .icon { transition: transform 150ms ease-out; }
.btn:hover .icon, .text-link:hover .icon { transform: translateX(4px); }
.card, .step, .way { transition: border-color 150ms ease-out; }
.card:hover, .step:hover, .way:not(.block-flare):hover { border-color: var(--border-strong); }
.card .icon-chip { transition: background-color 150ms ease-out, color 150ms ease-out; }
.card:hover .icon-chip { background: var(--volt); color: var(--ink); }

/* ---------- Logo animation frame ---------- */
.motion .vid:not(.is-fallback) .vid-poster { opacity: 0; }

/* ---------- Brand graphics: loop only while on screen ---------- */
.viz.is-live { --e: cubic-bezier(.2, .7, .2, 1); }

@keyframes vz-rise  { 0% { opacity: 0; transform: translateY(10px); } 8%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes vz-grow  { 0%, 6% { transform: scaleX(0); } 26%, 88% { transform: scaleX(1); } 96%, 100% { transform: scaleX(0); } }
@keyframes vz-pop   { 0%, 18% { opacity: 0; transform: scale(.4); } 26% { opacity: 1; transform: scale(1.14); } 32%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scale(.4); } }
@keyframes vz-draw  { 0%, 20% { stroke-dashoffset: 100; } 32%, 88% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: 100; } }
@keyframes vz-glint { 0% { transform: translateX(0) skewX(-18deg); opacity: 0; } 6% { opacity: .5; } 34% { transform: translateX(150px) skewX(-18deg); opacity: .5; } 40%, 100% { transform: translateX(150px) skewX(-18deg); opacity: 0; } }
@keyframes vz-press { 0%, 52% { transform: none; } 58% { transform: scale(.93); } 66%, 100% { transform: none; } }
@keyframes vz-ping  { 0%, 56% { opacity: 0; transform: scale(.8); } 58% { opacity: .9; } 80%, 100% { opacity: 0; transform: scale(2.1); } }
@keyframes vz-thumb { 0%, 30% { stroke: #D4FF3F; } 34%, 100% { stroke: #2A2A2C; } }
@keyframes vz-step  { 0%, 10% { fill: #0B0B0C; } 16%, 84% { fill: #D4FF3F; } 92%, 100% { fill: #0B0B0C; } }
@keyframes vz-win   { 0%, 38% { stroke: #2A2A2C; } 46%, 88% { stroke: #D4FF3F; } 96%, 100% { stroke: #2A2A2C; } }
@keyframes vz-comet { 0% { opacity: 1; stroke-dashoffset: 14; } 10% { opacity: 1; stroke-dashoffset: -100; } 10.01%, 100% { opacity: 0; stroke-dashoffset: -100; } }
@keyframes vz-node  { 0%, 2% { stroke: #2A2A2C; } 6%, 70% { stroke: #D4FF3F; } 82%, 100% { stroke: #2A2A2C; } }
@keyframes vz-vv    { 0%, 40% { transform: none; } 46% { transform: scale(1.16); } 56%, 100% { transform: none; } }
@keyframes vz-toggle{ 0%, 56% { fill: #2A2A2C; } 62%, 88% { fill: #D4FF3F; } 96%, 100% { fill: #2A2A2C; } }
@keyframes vz-knob  { 0%, 56% { transform: none; } 62%, 88% { transform: translateX(20px); } 96%, 100% { transform: none; } }
@keyframes vz-beat  { 0%, 40% { stroke-opacity: 1; } 55% { stroke-opacity: .25; } 70%, 100% { stroke-opacity: 1; } }

.viz.is-live .rise, .viz.is-live .swatch {
  animation: vz-rise 7s var(--e) infinite both; animation-delay: calc(var(--i, 0) * .28s);
}
.viz.is-live .grow {
  transform-box: fill-box; transform-origin: 0 50%;
  animation: vz-grow 7s var(--e) infinite both; animation-delay: calc(var(--i, 0) * .28s + .5s);
}
.viz.is-live .pop {
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: vz-pop 7s var(--e) infinite both; animation-delay: calc(var(--i, 0) * .28s);
}
.viz.is-live .draw-ink, .viz.is-live .draw-volt {
  animation: vz-draw 7s var(--e) infinite both; animation-delay: calc(var(--i, 0) * .9s + .5s);
}
.viz.is-live .glint { animation: vz-glint 4.5s ease-in-out infinite; }
.viz.is-live .press { transform-box: fill-box; transform-origin: 50% 50%; animation: vz-press 4.5s ease-in-out infinite; }
.viz.is-live .ping  { transform-box: fill-box; transform-origin: 50% 50%; animation: vz-ping 4.5s ease-out infinite; }
.viz.is-live .thumb { animation: vz-thumb 6s steps(1, end) infinite; animation-delay: calc(var(--i, 0) * 2s); }
.viz.is-live .stepdot { animation: vz-step 6s ease-out infinite; animation-delay: calc(var(--i, 0) * 1s); }
.viz.is-live .winner { animation: vz-win 7s ease-out infinite; animation-delay: .6s; }
.viz.is-live .comet { animation: vz-comet 6s linear infinite; animation-delay: calc(var(--i, 0) * .75s); }
.viz.is-live .node  { animation: vz-node 6s ease-out infinite; animation-delay: calc(var(--i, 0) * .75s - .1s); }
.viz.is-live .vv { transform-box: fill-box; transform-origin: 50% 50%; animation: vz-vv 7s ease-in-out infinite; }
.viz.is-live .toggle { animation: vz-toggle 7s ease-out infinite; }
.viz.is-live .knob { animation: vz-knob 7s var(--e) infinite; }
.viz.is-live .review { animation: vz-beat 3s ease-in-out infinite; }

/* ---------- Reduced motion: show everything, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .motion [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .motion [data-split]:not(.is-split) { opacity: 1; }
  .motion .wi { transform: none; transition: none; }
  .motion .on-volt-mark { color: var(--ink); transition: none; }
  .motion .on-volt-mark::before { transform: none; transition: none; }
  .motion .scrub .w { color: var(--text); transition: none; }
  .ticker-track { transform: none !important; }
  .btn:hover .icon, .text-link:hover .icon { transform: none; }
  .viz.is-live * { animation: none !important; }
  .sun, .scroll-progress { transform: none !important; }
}
