/* ============================================================
   HERO — interactive extruded "VOLT" engine
   Each letter is a stack of layered glyph slices forming a 3D
   extrusion. Mouse proximity swells each letter's depth (in-and-
   back wave); deep layers carry an energy-green charge that lights
   up on the active letter. Pure type — crisp at any size.
   ============================================================ */
.volt-engine{
  position:absolute; inset:0; z-index:0;
  display:flex; align-items:center; justify-content:center;
  gap:0.012em;
  padding-bottom:14vh;
  pointer-events:none;            /* clicks/cursor pass through to hero */
  user-select:none;
  --volt-size:clamp(150px, 27vw, 430px);
}

.vletter{
  position:relative;
  display:inline-block;
  font-family:var(--font-sans);
  font-weight:700;
  font-size:var(--volt-size);
  line-height:0.78;
  letter-spacing:-0.012em;
  /* live, JS-driven */
  --charge:0;        /* @kind other */
  --ext-x:0.085em;
  --ext-y:0.30em;
  /* energy wave travelling through depth slices (back -> front) */
  --wave:1;          /* @kind other */
  --w2:0.0022;       /* @kind other */
  --egain:0.5;       /* @kind other */
  --glow:0;          /* @kind other */
  --energy:#ffffff;  /* bright white-hot highlight (single travelling slice) */
  filter:
    drop-shadow(0.045em 0.075em 0.02em rgba(1,2,4,0.30))
    drop-shadow(0 0 calc(var(--glow) * 0.11em) rgba(201,228,0, calc(var(--glow) * 0.9)));
  will-change:filter;
}

.vletter .vlayer{
  position:absolute; left:0; top:0;
  transform:translate(calc(var(--ext-x) * var(--f)), calc(var(--ext-y) * var(--f)));
  /* base side-face colour ramps ink -> dark olive with depth (--f),
     mixes toward energy-green by charge, then a bright travelling band
     lights whichever slice the wave is currently passing through */
  color:color-mix(in oklab,
          color-mix(in oklab,
            color-mix(in oklab, #0a0f05, #36480c calc(var(--f) * 100%)),
            #c9e400 calc(var(--charge) * var(--f) * 72%)),
          var(--energy) calc(
            clamp(0, 1 - (var(--f) - var(--wave)) * (var(--f) - var(--wave)) / var(--w2), 1)
            * var(--egain) * 100%));
}
/* front face: in flow (sizes the box), painted on top; shares the same
   formula so the energy band can flash across the surface as it lands */
.vletter .vlayer.front{
  position:relative;
  z-index:50;
}

/* a faint charge halo behind the active letter */
.vletter::after{
  content:""; position:absolute; inset:8% 6% 2% 8%; z-index:-1;
  border-radius:24% 24% 30% 30%/30%;
  background:radial-gradient(closest-side, rgba(201,228,0,0.55), rgba(201,228,0,0));
  opacity:calc(var(--charge) * 0.55);
  transform:translate(calc(var(--ext-x) * 0.6), calc(var(--ext-y) * 0.6)) scale(1.04);
  filter:blur(10px);
}

/* tighten optical kerning between specific pairs */
.vletter[data-ch="O"]{ margin:0 -0.01em; }
.vletter[data-ch="T"]{ margin-left:-0.02em; }

/* ---- mobile: engine becomes a stacked top band (matches old art flow) ---- */
@media (max-width:767px){
  .volt-engine{
    position:relative; inset:auto;
    height:auto; padding:90px 14px 8px;
    --volt-size:clamp(96px, 30vw, 200px);
  }
}

@media (prefers-reduced-motion: reduce){
  .vletter{ transition:none; }
}
