/* Scroll wrapper: the hero is pinned (sticky) while the visitor scrolls the "travel" distance.
   JS adds .is-tear only when motion is allowed; without it the page is a normal flow. */
.hero-scroll { position: relative; }
.hero-scroll.is-tear { --tear-travel: 50svh; height: calc(100vh + var(--tear-travel)); height: calc(100svh + var(--tear-travel)); }
/* the cards section slides up underneath the pinned hero, so the pixel holes show it */
.hero-scroll.is-tear + .learn { margin-top: -100vh; margin-top: -100svh; }

.hero { position: relative; z-index: 2; height: 100vh; height: 100svh; overflow: hidden; background: var(--orbs), var(--black); color: var(--white); }
.hero-scroll.is-tear .hero { position: sticky; top: 0; }
.hero.is-cutting { background: none; pointer-events: none; }
/* while the pixel canvas is active it draws the video itself, so hide the real one (otherwise it shows through the holes) */
.hero.is-playing.is-tearing .hero__video { opacity: 0; transition: none; }

/* Video fills the whole screen (the nav floats over it). Cover = no bars; the text is in the centre. */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
.hero.is-playing .hero__video, .hero.is-reduced .hero__video { opacity: 1; }

/* Soft blue glow around the edges */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  box-shadow: inset 0 0 clamp(60px, 12vw, 180px) 0 color-mix(in srgb, var(--electric) 22%, transparent); }
.hero.is-cutting::after { opacity: 0; }

/* Opening pixels */
.hero__pixels { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
/* Scroll effect: the video, pixelated, zooming and cut away in pixels */
.hero__tear { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; display: none; }
.hero.is-tearing .hero__tear { display: block; }
.hero.is-reduced .hero__pixels, .hero.is-reduced .hero__tear { display: none; }

.hero__mute {
  position: absolute; z-index: 4; right: max(var(--gutter), env(safe-area-inset-right)); bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  width: 48px; height: 48px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 50%; color: var(--white);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  opacity: 0; pointer-events: none; transition: opacity var(--dur-med), transform var(--dur-fast);
}
.hero.is-playing:not(.is-tearing) .hero__mute { opacity: 1; pointer-events: auto; }
.hero__mute:hover { transform: scale(1.08); }
.hero__mute svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero__mute .icon-on { display: none; }
.hero__mute.is-sound .icon-on { display: block; }
.hero__mute.is-sound .icon-off { display: none; }
.hero.is-reduced .hero__mute, .hero.is-blocked .hero__mute { display: none; }

@media (max-width: 600px) { .hero-scroll.is-tear { --tear-travel: 45svh; } }
