/* LURA-PADEL-03 — polish layer for THE COURT.
 *
 * Loaded after the built stylesheet, so it overrides rather than edits it.
 * Everything here is additive: delete this file and the script beside it and
 * the page falls back to the V2 behaviour exactly.
 *
 * WHAT THIS FIXES, found on the live page on 15 Oct 2026:
 *  1. Headlines frozen or missing (reveal backstop + descender room).
 *  2. Glass walls ending part-way down the viewport.
 *  3. The scroll-bouncing ball, replaced by the LURA ball on the cursor.
 *  4. 4 Tubes and 24 Tubes cards that were stills beside a living 8 Tubes.
 *  5. "Designed for experience" with nothing under its headline.
 *  6. The shop section repeating the three product photos.
 *
 * British English, no em dashes.
 */

:root {
  --lx-d: clamp(44px, 4.4vw, 62px);
  --lx-ink: #121413;
  --lx-lime: #ced722;
}

/* ============================================ 1. reveal backstop ======== */

/* SplitText mask wrappers clip at the line box. Archivo's descenders and the
   tight 0.93 line height were being sliced, so the clip needs room below. */
.court-line-mask {
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}

/* Whatever the animation did, a section that has been on screen for a couple of
   seconds shows its copy. court-extras.js adds .is-settled. */
.is-settled .court-line {
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ================================================ 2. glass walls ========= */

/* The walls are translated by script (parallax, wrapped at 2 viewport heights).
   A wall exactly one viewport tall therefore left its bottom edge hanging in
   the middle of the screen. Three viewports of glass cannot run out. */
.court-wall {
  top: 0;
  bottom: auto;
  height: 300vh;
}

/* ============================================ 3. the LURA ball cursor ==== */

/* The old scroll rally ball keeps running (the sections still reveal from it)
   but it is no longer drawn. */
.court-ball-layer {
  opacity: 0 !important;
}

.lx-cursor {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  contain: layout style;
}

html.lx-has-cursor,
html.lx-has-cursor * {
  cursor: none !important;
}

/* Shared look of every LURA ball on the page: the product's own lime, felt,
   a seam, and the client's LP monogram and wordmark printed in ink. */
.lx-orb {
  display: block;
  position: relative;
  border-radius: 50%;
  background: #ced722 url('/lura/lura-ball-strip.webp') 0 0 / 100% auto no-repeat;
  box-shadow:
    inset -6px -8px 14px rgba(40, 48, 0, 0.45),
    inset 4px 5px 8px rgba(255, 255, 255, 0.28),
    0 0 0 1.5px rgba(18, 20, 19, 0.3),
    0 16px 22px -10px rgba(18, 20, 19, 0.5);
}

.lx-ball,
.lx-trail {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--lx-d);
  height: var(--lx-d);
  margin: calc(var(--lx-d) / -2) 0 0 calc(var(--lx-d) / -2);
  opacity: 0;
  will-change: transform;
  transition: opacity 0.25s ease;
}

.lx-cursor.is-on .lx-ball {
  opacity: 1;
}

.lx-trail {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e9f23f, #ced722 60%, #aab81a);
}

.lx-cursor.is-on .lx-trail {
  opacity: var(--a, 0.2);
}

/* The exact pointer, so precision is never lost to the ball's lag. */
.lx-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--lx-ink);
  box-shadow: 0 0 0 2px rgba(244, 245, 240, 0.95);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lx-cursor.is-on .lx-dot {
  opacity: 1;
}

.lx-cursor.lx-touch .lx-dot {
  display: none;
}

/* ============================================ 4. the range cards ========= */

.court-tube {
  transform: perspective(1100px) rotateX(var(--lx-rx, 0deg)) rotateY(var(--lx-ry, 0deg));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.court-tube.is-tilting {
  transition: transform 0.08s linear, box-shadow 0.35s ease;
  box-shadow: 0 34px 60px -34px rgba(18, 20, 19, 0.5);
}

.lx-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.lx-fx__glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--lx-gx, 50%) var(--lx-gy, 50%), rgba(255, 255, 255, 0.34), rgba(206, 215, 34, 0.16) 28%, transparent 55%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.court-tube.is-tilting .lx-fx__glare {
  opacity: 1;
}

/* ---- 4 TUBES: a rally across the four tube tops, one hop per tube ---- */

.lx-hop {
  position: absolute;
  top: 23.5%;
  left: 10%;
  width: 11%;
  aspect-ratio: 1;
  margin: -5.5% 0 0 -5.5%;
  opacity: 0;
  animation: lx-hop-x 4s linear infinite;
  animation-play-state: paused;
}

.lx-hop .lx-orb {
  width: 100%;
  height: 100%;
  animation: lx-hop-y 0.8s infinite, lx-roll 1.6s steps(17) infinite;
  animation-play-state: paused;
}

.is-live .lx-hop,
.is-live .lx-hop .lx-orb,
.is-live .lx-puff,
.is-live .lx-pulse {
  animation-play-state: running;
}

@keyframes lx-hop-x {
  0%   { left: 10%;   opacity: 0; }
  6%   {              opacity: 1; }
  20%  { left: 26.5%; }
  40%  { left: 43.3%; }
  60%  { left: 59.7%; }
  80%  { left: 76.8%; }
  94%  {              opacity: 1; }
  100% { left: 93%;   opacity: 0; }
}

@keyframes lx-roll {
  from { background-position: 0 0; }
  to   { background-position: 0 100%; }
}

@keyframes lx-hop-y {
  0%   { transform: translateY(0) scale(1.1, 0.88);   animation-timing-function: cubic-bezier(0.22, 0.75, 0.4, 1); }
  50%  { transform: translateY(-125%) scale(1, 1);    animation-timing-function: cubic-bezier(0.6, 0, 0.78, 0.3); }
  100% { transform: translateY(0) scale(1.1, 0.88); }
}

/* The pressure ring that leaves each tube top as the ball lands on it. */
.lx-puff {
  position: absolute;
  width: 15%;
  aspect-ratio: 1;
  margin: -7.5% 0 0 -7.5%;
  border-radius: 50%;
  border: 2px solid var(--lx-lime);
  box-shadow: 0 0 14px rgba(206, 215, 34, 0.6);
  opacity: 0;
  animation: lx-puff 4s linear infinite;
  animation-play-state: paused;
}

@keyframes lx-puff {
  0%   { transform: scale(0.2); opacity: 0.95; }
  12%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---- 24 TUBES: a scan counts the crate, then reads out the balls ---- */

.lx-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 24%;
  background: linear-gradient(100deg, transparent 0%, rgba(206, 215, 34, 0) 15%, rgba(232, 240, 80, 0.6) 50%, rgba(206, 215, 34, 0) 85%, transparent 100%);
  mix-blend-mode: screen;
  filter: blur(2px);
}

.lx-pulse {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  margin: -8% 0 0 -8%;
  border-radius: 50%;
  border: 2px solid rgba(206, 215, 34, 0.85);
  opacity: 0;
  animation: lx-puff 4.5s linear infinite;
  animation-play-state: paused;
}

.lx-chip {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  background: var(--lx-ink);
  color: var(--lx-lime);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ===================================== 5. designed for experience ======== */

.lx-spec {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 2px solid var(--lx-ink);
  padding-top: 1rem;
}

.lx-spec__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: var(--small);
  font-weight: 800;
  font-stretch: 108%;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.lx-spec__src {
  font-weight: 400;
  letter-spacing: 0.16em;
  opacity: 0.7;
}

.lx-spec__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.lx-spec__item {
  background: rgba(18, 20, 19, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.95rem 0.85rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.lx-spec.is-live .lx-spec__item {
  opacity: 1;
  transform: none;
}

.lx-spec__k {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(18, 20, 19, 0.7);
}

.lx-spec__v {
  display: block;
  margin-top: 0.15rem;
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.lx-spec__v small {
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 0.25em;
}

.lx-game {
  position: relative;
  margin-top: clamp(1.2rem, 2.6vw, 1.8rem);
  border-radius: 18px;
  overflow: hidden;
  background: var(--lx-ink);
  color: #f4f5f0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.lx-game canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  outline-offset: -4px;
}

.lx-game canvas:focus-visible {
  outline: 3px solid var(--lx-lime);
}

.lx-game__hud {
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.lx-game__hud b {
  color: var(--lx-lime);
  font-size: 1.15em;
}

.lx-game__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lx-game__hint.is-quiet {
  opacity: 0;
}

/* ======================================== 6. the shop section ============ */

/* The range above already shows the three photographs. Down here the same three
   become a plain, fast price list so the page stops repeating itself. */
.court-shelf__media {
  display: none;
}

.court-shelf__link {
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 1rem;
  padding: 1.2rem 1.3rem 1.3rem;
}

.court-shelf__link .court-price {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
}

.court-shelf__link .court-tube__name {
  grid-column: 1;
  grid-row: 1;
}

.court-shelf__link .court-shelf__tax {
  grid-column: 1 / -1;
}

.court-shelf__link::after {
  content: 'Buy at lurapadel.com';
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.8rem;
  padding: 0.7em 1.3em;
  border-radius: 999px;
  background: var(--lx-lime);
  color: var(--lx-ink);
  font-weight: 800;
  font-stretch: 108%;
  font-size: var(--small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================ reduced motion ============= */

@media (prefers-reduced-motion: reduce) {
  .lx-hop,
  .lx-puff,
  .lx-pulse,
  .lx-scan,
  .lx-trail {
    display: none !important;
  }
  .lx-spec__item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .court-tube {
    transform: none;
  }
}


/* ================================== 7. round two: game, ball, polish ====== */

/* The page switches pointer events off on every canvas. The game needs them. */
.lx-game, .lx-game canvas { pointer-events: auto !important; cursor: pointer; }

.lx-game__hint.is-cta {
  left: 50%;
  right: auto;
  bottom: 1.1rem;
  transform: translateX(-50%);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  background: var(--lx-lime);
  color: #121413;
  font-weight: 800;
  opacity: 1;
  white-space: nowrap;
  animation: lx-cta 1.8s ease-in-out infinite;
}
@keyframes lx-cta {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}

/* The ball is the pointer, so the little black dot on top of it goes. */
.lx-dot { display: none !important; }

/* Headings: balanced lines, no orphans, and sentence case that reads properly. */
h1, h2, h3, .court-line { text-wrap: balance; }
.court-social__pull, blockquote { text-wrap: balance; }

::selection { background: #ced722; color: #121413; }

/* Thin lime progress bar along the top edge. */
.lx-progress {
  position: fixed;
  left: 0; top: 0;
  width: 100%;
  height: 3px;
  background: #ced722;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
  pointer-events: none;
}

/* Cards and buttons feel alive. */
.court-shelf__link, .lx-spec__tile {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
@media (hover: hover) {
  .court-tube:hover { box-shadow: 0 18px 40px -22px rgba(18, 20, 19, 0.45); }
  .court-tube__cta, .court-shelf__link::after { transition: transform 0.25s ease, background-color 0.25s ease; }
  .court-tube__cta:hover { transform: translateY(-2px); }
}
a:focus-visible, button:focus-visible { outline: 3px solid #121413; outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .lx-game__hint.is-cta { animation: none; }
  .lx-progress { display: none; }
}


/* ================================= 8. round three: lines, About, game, ball == */

/* The drawn court markings crossed headlines, split sections and cut through
   photographs. The glass walls and posts already say "court", so they go. */
.court-lines { display: none !important; }

/* About: three tiles, identical size, identical crop. The old WebGL still goes. */
.court-refract { display: none !important; }
.court-social__grid { align-items: stretch; }
.court-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 18px;
  background: #121413;
}
.court-shot video, .court-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Cursor: the comet, the ripple and the sparks. */
.lx-cursor { transition: opacity 0.2s ease; }
.lx-cursor.is-away { opacity: 0; }
.lx-ripple {
  position: absolute;
  width: 46px; height: 46px;
  margin: 0;
  border-radius: 50%;
  border: 2.5px solid #ced722;
  pointer-events: none;
}
.lx-spark {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ced722;
  pointer-events: none;
}

/* The game, full width. */
.lx-gamewrap { margin-top: clamp(2.6rem, 6vw, 4.2rem); }
.lx-gamebar {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.lx-gamebar__k {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.7;
}
.lx-gamebar__t {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1;
}
.lx-gamebar__d { margin: 0; flex: 1 1 18rem; max-width: 34rem; font-size: 0.95rem; line-height: 1.5; }
.lx-gamebar__snd {
  appearance: none;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: 800 0.72rem/1 inherit;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.lx-gamebar__snd[aria-pressed="true"] { background: #121413; color: #ced722; border-color: #121413; }
.lx-game {
  border-radius: 22px;
  box-shadow: 0 30px 60px -32px rgba(18, 20, 19, 0.7);
}
.lx-game canvas {
  aspect-ratio: 25 / 14;
  cursor: none;
  touch-action: pan-y;
}
.lx-game__hud, .lx-game__hint { display: none !important; }


/* LURA Rally: the photoreal court is 25:12 once the empty foreground is trimmed. */
.lx-game canvas { aspect-ratio: 25 / 12; }


/* Headlines: reveal on entering the viewport, fast, whatever the old stage tween is doing. */
[data-court-split].lx-in .court-line {
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* v3 game: no text selection or tap flash while playing */
.lx-game canvas { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; outline-offset: 4px; }

/* The site hides the system cursor everywhere (html.lx-has-cursor * { cursor: none !important }).
   Inside the game the real pointer must show so the buttons are easy to hit. */
html.lx-has-cursor .lx-game,
html.lx-has-cursor .lx-game *,
html.lx-has-cursor .lx-gamebar__snd { cursor: default !important; }
html.lx-has-cursor .lx-game canvas { cursor: default !important; }
html.lx-has-cursor .lx-game canvas[data-cur="pointer"] { cursor: pointer !important; }
html.lx-has-cursor .lx-game canvas[data-cur="crosshair"] { cursor: crosshair !important; }
html.lx-has-cursor .lx-gamebar__snd { cursor: pointer !important; }
.lx-game canvas[data-cur="pointer"] { cursor: pointer; }
.lx-game canvas[data-cur="crosshair"] { cursor: crosshair; }
/* an earlier rule set cursor: none on the canvas itself, so restore it explicitly */
.lx-game canvas { cursor: default; }
.lx-game canvas[data-cur="pointer"] { cursor: pointer; }
.lx-game canvas[data-cur="crosshair"] { cursor: crosshair; }
