/* Racket hero layer. Sits behind the hero copy and never takes pointer events. */
.v2-hero:has(> .v2-racket) { position: relative; overflow: hidden; }
.v2-racket { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.v2-hero:has(> .v2-racket) > :not(.v2-racket) { position: relative; z-index: 1; }
/* .v2-racket-poster is the runtime poster, painted on a 2D <canvas> by the loader (a canvas is never an LCP candidate; an <img> was).
   .v2-racket-live is the WebGL canvas. .v2-racket-img survives only for the <noscript> poster. All three fill the same square layer. */
.v2-racket-img, .v2-racket canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom; pointer-events: none;
  transition: opacity .6s ease;
}
.v2-racket .v2-racket-live { opacity: 0; }
.v2-racket .v2-racket-poster { opacity: 1; }
.v2-racket.is-live .v2-racket-live { opacity: 1; }
.v2-racket.is-live .v2-racket-poster { opacity: 0; }
.v2-racket.is-still .v2-racket-poster{opacity:1}
.v2-racket.is-still .v2-racket-img{opacity:1}
@media (prefers-reduced-motion: reduce) { .v2-racket-img, .v2-racket canvas { transition: none; } }

/* The layer is always square, like the 1200px poster, and the img and canvas fill it, so the poster->canvas crossfade is the same box and framing. */
/* Placement (Task 8, verified against screenshots at 320/375/1440, EN + DE).
   The racket owns its own frame (the scene sizes itself to .v2-racket, not the hero), so it can never sit under the copy:
   - below 1000px: a square strip centred under the copy, hero gets bottom padding to make room;
   - from 1000px: right-hand column (square, vertically centred), home copy is left-aligned in the left half.
   The scene is framed (racket-scene.js FRAME_*) so poster and live canvas keep a transparent margin on every side: no edge mask is needed. */
body.v2 .v2-hero.v2-hero--home.v2-hero--stage:has(> .v2-racket) { padding-bottom: calc(min(300px, 80vw) + 16px); }
body.v2 .v2-hero--home .v2-racket { inset: auto auto 0 50%; width: min(300px, 80vw); height: min(300px, 80vw); transform: translateX(-50%); }
@media (min-width: 1000px) {
  body.v2 .v2-hero.v2-hero--home.v2-hero--stage:has(> .v2-racket) { padding-bottom: 64px; }
  /* The square layer stays inside the hero: below the 64px sticky header (+8px), 8px above the hero bottom, and a right gutter so it
     does not sit on the viewport edge. Height is the free hero height (capped at 42vw so it never reaches the copy), width follows
     from the 1:1 ratio, auto margins centre it vertically. */
  body.v2 .v2-hero--home .v2-racket { inset: 72px clamp(16px, 2.5vw, 48px) 8px auto; margin-block: auto; width: auto; height: min(calc(100% - 80px), 42vw); aspect-ratio: 1; transform: none; }
  body.v2 .v2-hero--home:has(> .v2-racket) .v2-hero-copy { margin-inline: 0; max-width: min(600px, 54%); text-align: left; }
  body.v2 .v2-hero--home:has(> .v2-racket) .v2-actions { justify-content: flex-start; }
  body.v2 .v2-hero--home:has(> .v2-racket) .v2-sub { margin-inline: 0; }
}
/* the no-JS poster lives in a <noscript> child of the hero; it must not become the (zero-size) containing block */
body.v2 .v2-hero:has(> .v2-racket) > noscript { position: static; z-index: auto; }
