/* Vorin scroll ambience — loaded after style.css; CSP-safe (no inline). */

/* Readable content above the fixed canvas */
body.sfx-ready {
  background-color: transparent;
  background-image: none;
}
body.sfx-ready::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Soft veil only — canvas waveform must stay visible underneath */
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(27, 20, 48, 0.45) 0%, transparent 60%),
    linear-gradient(180deg, rgba(7, 6, 13, 0.25) 0%, rgba(7, 6, 13, 0.2) 50%, rgba(7, 6, 13, 0.35) 100%);
}

#sfx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  display: block;
}

/* Playhead progress in sticky nav */
.sfx-playhead {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
  overflow: visible;
}
.sfx-playhead-track {
  position: absolute;
  inset: 0;
  background: #2a244066;
}
.sfx-playhead-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #ff2bd6, #8a3bff 55%, #22d3ff);
  box-shadow: 0 0 12px #ff2bd688, 0 0 24px #22d3ff44;
  will-change: width;
}
.sfx-playhead-dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #ff2bd6, 0 0 18px #22d3ff;
  will-change: left;
}
.sfx-beat {
  position: absolute;
  right: clamp(0.5rem, 2vw, 1.25rem);
  bottom: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a59fc4;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}
.sfx-beat b {
  color: #22d3ff;
  font-weight: 700;
}

.nav {
  position: sticky; /* reinforce */
}

/* Floating decorative layer */
.sfx-floaters {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sfx-floater {
  position: absolute;
  opacity: 0.22;
  will-change: transform;
  color: #8a3bff;
}
.sfx-floater svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
@media (max-width: 820px) {
  .sfx-floater { opacity: 0.14; }
  .sfx-floater[data-hide-mobile="1"] { display: none; }
}

/* Waveform section dividers */
.sfx-wave-div {
  display: block;
  width: min(1150px, calc(100% - 2.5rem));
  height: 48px;
  margin: -1.25rem auto 0;
  opacity: 0.55;
  pointer-events: none;
  overflow: hidden;
}
.sfx-wave-div svg {
  display: block;
  width: 200%;
  height: 100%;
  will-change: transform;
}

/* Section / card reveals (finer than whole-section only) */
.sfx-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.sfx-reveal.sfx-in {
  opacity: 1;
  transform: none;
}
.sfx-stagger > .sfx-reveal:nth-child(1) { transition-delay: 0.02s; }
.sfx-stagger > .sfx-reveal:nth-child(2) { transition-delay: 0.07s; }
.sfx-stagger > .sfx-reveal:nth-child(3) { transition-delay: 0.12s; }
.sfx-stagger > .sfx-reveal:nth-child(4) { transition-delay: 0.17s; }
.sfx-stagger > .sfx-reveal:nth-child(5) { transition-delay: 0.22s; }
.sfx-stagger > .sfx-reveal:nth-child(6) { transition-delay: 0.27s; }
.sfx-stagger > .sfx-reveal:nth-child(7) { transition-delay: 0.32s; }
.sfx-stagger > .sfx-reveal:nth-child(8) { transition-delay: 0.37s; }
.sfx-stagger > .sfx-reveal:nth-child(9) { transition-delay: 0.42s; }

/* Tiny EQ meters on feature cards */
.features li {
  overflow: hidden;
}
.sfx-card-eq {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
  margin-top: 0.9rem;
  opacity: 0.55;
}
.sfx-card-eq span {
  flex: 1;
  max-width: 6px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #22d3ff, #ff2bd6);
  transition: height 0.25s ease;
}
.features li:hover .sfx-card-eq span:nth-child(1) { height: 10px; }
.features li:hover .sfx-card-eq span:nth-child(2) { height: 16px; }
.features li:hover .sfx-card-eq span:nth-child(3) { height: 8px; }
.features li:hover .sfx-card-eq span:nth-child(4) { height: 14px; }
.features li:hover .sfx-card-eq span:nth-child(5) { height: 6px; }
.features li:hover .sfx-card-eq { opacity: 0.9; }

/* Hero EQ driven by scroll velocity when live */
body.sfx-live .eq i {
  animation: none;
  height: 12px;
  transition: height 0.08s linear;
}

/* Content above floaters; nav stays on top */
main, .foot { position: relative; z-index: 1; }
.nav { z-index: 20; }
.section, .hero {
  position: relative;
}
.hero .lead, .hero h1, .sub, .features p, figcaption {
  text-shadow: 0 1px 12px #07060dcc;
}
.shot, .features li, .timeline li, .card, .changelog, .store, .dl-item {
  backdrop-filter: blur(8px);
  background-color: #141122cc;
}

@media (prefers-reduced-motion: reduce) {
  .sfx-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sfx-playhead-fill,
  .sfx-playhead-dot,
  .sfx-floater,
  .sfx-wave-div svg {
    transition: none;
    will-change: auto;
  }
  body.sfx-live .eq i {
    animation: none;
    height: 20px;
  }
  .features li:hover .sfx-card-eq span {
    transition: none;
  }
}
