  /* Hero WebGL canvas: sits under the bottom cream fade (.hero::before) and the content */
  .hero-3d {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
  }
  .hero-3d canvas { display: block; width: 100%; height: 100%; }
  html.three-on .hero-3d { opacity: 1; }
  html.three-on .hero .blob,
  html.three-on .hero-deco,
  html.three-on .hero-cross { display: none; }

  /* GSAP owns the hero entrance */
  html.fx3d .hero-badge,
  html.fx3d .hero h1,
  html.fx3d .hero-sub,
  html.fx3d .hero-actions { animation: none; opacity: 0; }
  html.fx3d .hero-content { will-change: transform; }
  html.fx3d .hero h1 .w { display: inline-block; will-change: transform; }
  html.three-on .hero-sub { text-shadow: 0 0 14px rgba(247, 250, 253, 0.95), 0 0 4px rgba(247, 250, 253, 0.9); }
  html.fx3d .hero-actions .btn { transition-property: box-shadow, background, border-color, color; }

  /* Scroll reveals gain depth (only the hidden state changes; visible state is untouched) */
  html.fx3d .reveal:not(.visible) {
    transform: perspective(1000px) translate3d(0, 50px, -90px) rotateX(16deg);
    transform-origin: 50% 100%;
  }
  html.fx3d .reveal-left:not(.visible) {
    transform: perspective(1000px) translate3d(-60px, 0, -90px) rotateY(20deg);
  }
  html.fx3d .reveal-right:not(.visible) {
    transform: perspective(1000px) translate3d(60px, 0, -90px) rotateY(-20deg);
  }
  html.fx3d .reveal-scale:not(.visible) {
    transform: perspective(1000px) translateZ(-160px) scale(0.9);
  }

  /* 3D card tilt + glare */
  .tilt3d { position: relative; transform-style: preserve-3d; }
  html.fx3d .tilt3d.tilting { transition-property: box-shadow, border-color, background, opacity; }
  .tilt-glare {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
      rgba(184, 212, 240, 0.45) 0%, rgba(232, 216, 153, 0.12) 35%, rgba(255, 255, 255, 0) 65%);
  }

  /* Scroll-scrubbed elements must not fight a CSS transform transition */
  html.fx3d .verse-card { transition-property: box-shadow, border-color, background; }
