/* PadelPDX redesign. Three themes share one component layer; everything visual reads tokens. */

/* ---------- THEMES ---------- */

:root,
[data-theme="rain"] {
  --bg: #D3DAD7;
  --bg-deep: #C2CCC8;
  --surface: #E2E7E5;
  --ink: #0D1A17;
  --ink-soft: #2F3E3A;
  --muted: #5A6864;
  --line: rgb(13 26 23 / 0.15);

  --accent: #1E4A3C;
  --accent-ink: #EDF2F0;
  --ok: #2F7D5B;

  --court: #2C5AC2;
  --court-deep: #1D3F93;
  --court-line: #F2F6F5;
  --glass: rgb(200 226 233 / 0.30);
  --glass-edge: rgb(18 36 40 / 0.55);
  --glass-hit: rgb(235 250 255 / 0.85);
  --mesh: #22302C;
  --player: #0D1A17;
  --ball: #D5EF2C;
  --ball-edge: #8EA40F;

  --sky-top: #9DAEAB;
  --sky-bottom: #D3DAD7;
  --hill-far: #A9B8B4;
  --hill-near: #7F928C;
  --water: #7C8D8A;
  --bridge: #2F5C4F;
  --pier: #8C9894;
  --fog: 232 238 236;
  --lamp: rgb(255 244 214 / 0);
  --land: #C9D2CE;
  --map-water: #7C94A0;
  --park: #B5C4B8;

  --grain: 0.07;
  --rain: 1;

  --font-display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 800;
  --display-stretch: 100%;
  --display-track: -0.045em;
  --display-leading: 0.92;
  --display-case: none;
  --radius: 3px;
  --radius-lg: 6px;

  color-scheme: light;
}

[data-theme="night"] {
  --bg: #07090D;
  --bg-deep: #0B0F16;
  --surface: #111824;
  --ink: #EAF0F7;
  --ink-soft: #B9C4D3;
  --muted: #7E8A9B;
  --line: rgb(234 240 247 / 0.12);

  --accent: #3A66FF;
  --accent-ink: #FFFFFF;
  --ok: #4ADE80;

  --court: #1C41B5;
  --court-deep: #0F2A7D;
  --court-line: #DCE6FF;
  --glass: rgb(110 150 255 / 0.10);
  --glass-edge: rgb(170 200 255 / 0.60);
  --glass-hit: rgb(190 215 255 / 0.55);
  --mesh: #8C9CB6;
  --player: #EAF0F7;
  --ball: #E3FF2E;
  --ball-edge: #9DB600;

  --sky-top: #020306;
  --sky-bottom: #0D1626;
  --hill-far: #0A111C;
  --hill-near: #060A11;
  --water: #0A1220;
  --bridge: #5E9C87;
  --pier: #1A2433;
  --fog: 38 58 92;
  --lamp: rgb(255 236 190 / 0.95);
  --land: #0C121B;
  --map-water: #1B3150;
  --park: #0F1B1A;

  --grain: 0.09;
  --rain: 0;

  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 850;
  --display-stretch: 62%;
  --display-track: -0.005em;
  --display-leading: 0.88;
  --display-case: uppercase;
  --radius: 0px;
  --radius-lg: 0px;

  color-scheme: dark;
}

[data-theme="clubhouse"] {
  --bg: #A8C5E2;
  --bg-deep: #93B5D8;
  --surface: #C2D7EC;
  --ink: #0E1C33;
  --ink-soft: #223553;
  --muted: #3D5173;
  --line: rgb(14 28 51 / 0.18);

  --accent: #0E1C33;
  --accent-ink: #FFFFFF;
  --ok: #0F6B3F;

  --court: #2452A6;
  --court-deep: #173A7E;
  --court-line: #FFFFFF;
  --glass: rgb(255 255 255 / 0.30);
  --glass-edge: rgb(14 28 51 / 0.65);
  --glass-hit: rgb(255 255 255 / 0.9);
  --mesh: #0E1C33;
  --player: #0E1C33;
  --ball: #E4F53B;
  --ball-edge: #9FAE0C;

  --sky-top: #7EA6D0;
  --sky-bottom: #A8C5E2;
  --hill-far: #8DB0D6;
  --hill-near: #6F95C0;
  --water: #5D85B3;
  --bridge: #0E1C33;
  --pier: #86A6CB;
  --fog: 255 255 255;
  --lamp: rgb(255 255 255 / 0);
  --land: #B7D0E9;
  --map-water: #2452A6;
  --park: #95B9DC;

  --grain: 0.05;
  --rain: 0;

  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 800;
  --display-stretch: 125%;
  --display-track: -0.035em;
  --display-leading: 0.95;
  --display-case: none;
  --radius: 10px;
  --radius-lg: 18px;

  color-scheme: light;
}

/* ---------- BASE ---------- */

/* No cross-document @view-transition: navigating home -> /padel with it crashed
   Chrome's renderer in testing (the pages hold large decoded video in memory). */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

*, *::before, *::after { box-sizing: border-box; }
/* Also on html: body's clip alone still let a stray wide element widen a phone's layout
   viewport, stretching the fixed nav and pushing the Menu button off screen. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: clip;
}
/* Film grain, strength per theme. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
}
@media (min-width: 720px) {
  .wrap { width: min(1240px, 100% - 80px); }
}

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--display-track);
  line-height: var(--display-leading);
  text-transform: var(--display-case);
  text-wrap: balance;
}
h2.display { font-size: clamp(2.3rem, 6.2vw, 5.2rem); }
h3 {
  font-family: var(--font-display);
  font-weight: 750;
  font-stretch: var(--display-stretch);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 1.35rem;
}
[data-theme="night"] h3 { text-transform: uppercase; letter-spacing: 0.01em; font-size: 1.45rem; }

.muted { color: var(--muted); }

/* ---------- BUTTONS ---------- */

.btn {
  --pad-y: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: var(--pad-y) 1.25rem;
  border-radius: var(--radius);
  font: 650 0.98rem/1.1 var(--font-body);
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; transition: transform 0.25s cubic-bezier(.3,.7,.2,1); }
.btn:hover svg { transform: translateX(4px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink)); }
.btn-line { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-line:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
[data-theme="night"] .btn { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.86rem; font-weight: 700; }
[data-theme="clubhouse"] .btn { font-stretch: 112%; font-weight: 750; border-width: 2.5px; }
[data-theme="clubhouse"] .btn-solid { border-color: var(--accent); box-shadow: 0 4px 0 color-mix(in oklab, var(--accent) 55%, var(--bg)); }
[data-theme="clubhouse"] .btn-solid:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- NAV ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 16px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s ease;
}
@media (min-width: 720px) { .nav { padding: 16px 40px; } }
.nav.is-solid {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--display-stretch);
  letter-spacing: -0.02em;
  font-size: 1.2rem;
}
[data-theme="night"] .brand { text-transform: uppercase; letter-spacing: 0.02em; }
.brand-mark { width: 30px; height: 40px; flex: none; }
.mark-head { fill: var(--court); stroke: var(--ink); stroke-width: 2.4; }
.mark-hole { fill: var(--bg); }
.mark-throat { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.mark-handle { fill: var(--ink); }
.mark-ball { fill: var(--ball); stroke: var(--ink); stroke-width: 2; }
.mark-seam { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0.7; }

.nav-links {
  display: none;
  gap: 26px;
  margin-left: auto;
  font-weight: 550;
  font-size: 0.95rem;
}
.nav-links a { text-decoration: none; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s cubic-bezier(.3,.7,.2,1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (min-width: 960px) { .nav-actions { margin-left: 8px; } }
.nav-cta { --pad-y: 0.6rem; padding-inline: 1rem; font-size: 0.9rem; }
@media (max-width: 480px) { .nav-cta { display: none; } }

/* ---------- SITE MENU (below 960px) ---------- */

/* The links and the look fold into the menu; the bar keeps the brand, booking and this button. */
@media (max-width: 959px) { .nav-actions .theme-btn { display: none; } }

.menu-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 13px 0 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  color: var(--ink);
  font: 650 0.9rem/1 var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--ink); }
[data-theme="night"] .menu-btn { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }
@media (min-width: 960px) { .menu-btn { display: none; } }

/* "Menu" rolls up and "Close" rolls in; the two bars cross into an X. */
.menu-words { display: grid; overflow: hidden; line-height: 1.25; }
.menu-words > span { grid-area: 1 / 1; transition: transform 0.5s cubic-bezier(.3,.7,.2,1); }
.menu-words > span + span { transform: translateY(105%); }
[aria-expanded="true"] .menu-words > span:first-child { transform: translateY(-105%); }
[aria-expanded="true"] .menu-words > span + span { transform: none; }
.menu-icon { position: relative; width: 18px; height: 12px; flex: none; }
.menu-icon i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 1px; background: currentColor;
  transition: transform 0.5s cubic-bezier(.3,.7,.2,1), width 0.5s cubic-bezier(.3,.7,.2,1);
}
.menu-icon i:first-child { top: 1px; }
.menu-icon i:last-child { bottom: 1px; width: 62%; }
[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(4px) rotate(45deg); }
[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-4px) rotate(-45deg); width: 100%; }

/* While the menu is up the bar sits on it, see-through and never scrolled away. */
.nav.is-menu { z-index: 80; transform: none; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.menu-open { overflow: hidden; scrollbar-gutter: stable; }

.menu {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; gap: 28px;
  padding: 84px 16px max(20px, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
@media (min-width: 720px) { .menu { padding: 100px 40px 32px; } }
@media (min-width: 960px) { .menu { display: none; } }

/* Link size follows the width, and the height too so the menu fits a phone with its browser bars showing. */
.menu { --menu-h: 1vh; }
@supports (height: 1svh) { .menu { --menu-h: 1svh; } }
.menu-links {
  --menu-size: clamp(1.9rem, min(9.4vw, var(--menu-h) * 5.2), 3.4rem);
  display: grid;
}
[data-theme="night"] .menu-links { --menu-size: clamp(2.3rem, min(12.5vw, var(--menu-h) * 5.7), 4.4rem); }
[data-theme="clubhouse"] .menu-links { --menu-size: clamp(1.55rem, min(7.6vw, var(--menu-h) * 4.4), 2.9rem); }
.menu-links a {
  display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: 12px;
  padding: 14px 4px 15px;
  border-top: 1.5px solid var(--line);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.menu-links a:last-child { border-bottom: 1.5px solid var(--line); }
.menu-label {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--display-track);
  text-transform: var(--display-case);
  font-size: var(--menu-size);
  line-height: 1.02;
  transition: transform 0.35s cubic-bezier(.3,.7,.2,1);
}
.menu-num {
  padding-top: 0.35em;
  font: 650 0.78rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.menu-desc { grid-column: 1 / -1; margin-top: 5px; font-size: 0.92rem; line-height: 1.35; color: var(--muted); }
.menu-links a:is(:hover, :active) .menu-label { transform: translateX(6px); }
/* The page you're on gets the ball. */
.menu-links a[aria-current="page"] .menu-num {
  width: 14px; height: 14px; margin-top: 0.35em; padding: 0; overflow: hidden; color: transparent;
  border-radius: 50%; background: var(--ball); box-shadow: inset 0 0 0 1.5px var(--ink);
}

.menu-foot { display: grid; gap: 12px; margin-top: auto; }
.menu-kicker { margin: 0; font-weight: 700; font-size: 0.8rem; color: var(--muted); }
[data-theme="night"] .menu-kicker { text-transform: uppercase; letter-spacing: 0.1em; }
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.look {
  display: grid; justify-items: start; align-content: start; gap: 8px;
  padding: 8px 8px 10px; border-radius: var(--radius);
  border: 1.5px solid var(--line);
  font-weight: 650; font-size: 0.82rem; line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.look .opt-swatch { width: 100%; height: 30px; }
.look:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.look input { position: absolute; opacity: 0; pointer-events: none; }
.look:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-cta { justify-content: center; width: 100%; }
.menu-status { justify-self: center; font-size: 0.85rem; color: var(--ink-soft); }
@media (max-height: 700px) {
  .menu { gap: 18px; padding-top: 78px; }
  .menu-links a { padding-block: 10px 11px; }
  .menu-desc { margin-top: 3px; }
  .menu-foot { gap: 10px; }
  .look .opt-swatch { height: 22px; }
}
@media (max-height: 600px) { .menu-desc { display: none; } }

/* Links rise in one after another as the circle opens; they drop straight away on close. */
.menu-links a, .menu-foot { opacity: 0; transform: translateY(22px); transition: opacity 0.2s ease, transform 0.2s ease; }
.menu.is-open :is(.menu-links a, .menu-foot) {
  opacity: 1; transform: none;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(140ms + var(--i) * 55ms);
}
@media (prefers-reduced-motion: reduce) {
  .menu :is(.menu-links a, .menu-foot),
  .menu.is-open :is(.menu-links a, .menu-foot) { opacity: 1; transform: none; transition: none; }
  .menu-words > span, .menu-icon i { transition: none; }
}

/* ---------- THEME SWITCHER ---------- */

.theme-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  color: var(--ink);
  font: 600 0.85rem/1 var(--font-body);
  cursor: pointer;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-swatch, .opt-swatch {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: conic-gradient(#D3DAD7 0 33%, #07090D 0 66%, #A8C5E2 0);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: transform 0.6s cubic-bezier(.3,.7,.2,1);
}
.theme-btn:hover .theme-swatch { transform: rotate(120deg); }

.theme-menu {
  position: fixed;
  inset: 68px 16px auto auto;
  margin: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.35);
}
@media (min-width: 720px) { .theme-menu { inset: 72px 40px auto auto; } }
.theme-menu fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.theme-menu-title { margin: 2px 4px 10px; font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.theme-opt {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px solid transparent;
}
.theme-opt:hover { background: color-mix(in oklab, var(--ink) 6%, transparent); }
.theme-opt:has(input:checked) { border-color: var(--ink); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-opt strong { display: block; font-size: 0.98rem; }
.theme-opt small { color: var(--muted); font-size: 0.82rem; }
.opt-swatch { width: 34px; height: 34px; border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / 0.25); }
.opt-swatch[data-swatch="rain"] { background: linear-gradient(135deg, #D3DAD7 0 45%, #1E4A3C 45% 75%, #2C5AC2 75%); }
.opt-swatch[data-swatch="night"] { background: linear-gradient(135deg, #07090D 0 45%, #3A66FF 45% 75%, #E3FF2E 75%); }
.opt-swatch[data-swatch="clubhouse"] { background: linear-gradient(135deg, #A8C5E2 0 45%, #0E1C33 45% 75%, #FFFFFF 75%); }

/* ---------- HERO ---------- */

.hero { position: relative; }
.hero-stage {
  position: relative;
  /* Large viewport, so the pinned stage still reaches the bottom of the screen once a
     phone browser hides its toolbars. What must be seen with them showing sits within 100svh. */
  height: 100lvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--sky-bottom); }
.hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media video, .hero-media canvas, .hero-media img { object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 55%, transparent) 0%, transparent 42%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
[data-theme="night"] .hero-shade {
  background:
    radial-gradient(60% 50% at 20% 20%, rgb(58 102 255 / 0.18), transparent 70%),
    linear-gradient(180deg, rgb(7 9 13 / 0.7) 0%, transparent 45%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%);
}
.has-video .hero-shade {
  background:
    linear-gradient(100deg, color-mix(in oklab, var(--bg) 70%, transparent) 0%, transparent 55%),
    linear-gradient(0deg, var(--bg) 0%, transparent 20%);
}

/* Portland rain: two sheets of streaks, only where the theme asks for it. */
.hero-rain {
  position: absolute; inset: -20% 0 0 0; z-index: -1; pointer-events: none;
  opacity: calc(var(--rain) * 0.5);
  background-image:
    repeating-linear-gradient(102deg, transparent 0 22px, rgb(255 255 255 / 0.55) 22px 23px, transparent 23px 61px),
    repeating-linear-gradient(98deg, transparent 0 41px, rgb(255 255 255 / 0.35) 41px 42px, transparent 42px 97px);
  background-size: 100% 180px, 100% 260px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  animation: rain 0.9s linear infinite;
}
@keyframes rain { to { background-position: -38px 180px, -36px 260px; } }

.hero-copy {
  position: absolute;
  left: 0; right: 0;
  top: clamp(96px, 16vh, 170px);
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
}
@media (min-width: 720px) { .hero-copy { width: min(1240px, 100% - 80px); } }
.hero-copy h1 {
  font-size: clamp(3rem, min(10.5vw, 16vh), 9.6rem);
  max-width: 12ch;
  margin-bottom: 0.3em;
}
[data-theme="night"] .hero-copy h1 { font-size: clamp(3.2rem, min(10vw, 15vh), 10.5rem); max-width: 11ch; }
[data-theme="clubhouse"] .hero-copy h1 { font-size: clamp(2.6rem, min(8.2vw, 13vh), 7.4rem); max-width: 11ch; }
.hero-lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.scroll-cue {
  position: absolute; left: 50%; bottom: calc(22px + 100lvh - 100svh); width: 22px; height: 36px; margin-left: -11px;
  border: 1.5px solid var(--ink); border-radius: 11px; opacity: 0.6;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px;
  border-radius: 2px; background: var(--ink);
  animation: cue 1.8s cubic-bezier(.5,0,.2,1) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- SECTION RHYTHM ---------- */

.section { position: relative; padding-block: clamp(72px, 10vw, 140px); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 7vw, 90px); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1.35fr 1fr; align-items: end; gap: 60px; }
}
.section-head p { font-size: 1.1rem; color: var(--ink-soft); max-width: 36rem; margin: 0; }

/* ---------- FILMS (pinned scroll footage) ---------- */

.film-stage {
  position: relative;
  height: 100lvh; /* as .hero-stage: fills the screen with the toolbars hidden */
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-deep);
}
.film-media { position: absolute; inset: 0; z-index: -2; }
.film-media picture, .film-media img, .film-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.film-overlay { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: visible; }

/* Text sits on a frosted panel so it reads over any frame and any theme. */
.film-panel {
  position: absolute; z-index: 1;
  /* Pinned to the left edge: every shot keeps its left third calm for this panel. */
  left: clamp(16px, 2.2vw, 36px);
  /* Centred on the part of the stage that's on screen with a phone's toolbars showing. */
  top: 50svh; transform: translateY(-50%);
  width: clamp(300px, 28vw, 27rem);
  padding: 24px 26px 20px;
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(0 0 0 / 0.45);
}
[data-theme="clubhouse"] .film-panel { box-shadow: 0 0 0 4px #fff, 0 30px 60px -30px rgb(0 0 0 / 0.35); }
.film-texts { display: grid; }
.film-texts > [data-beat] { grid-area: 1 / 1; align-self: start; }
.film-texts > [data-beat]:not(:first-child) { visibility: hidden; opacity: 0; }
.film-texts h2.display { font-size: clamp(2rem, 3.6vw, 3.4rem); margin-bottom: 16px; }
.film-texts h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-bottom: 12px; }
.film-texts p { color: var(--ink-soft); margin-bottom: 0.6em; }
.beat-tag {
  display: inline-block; margin-bottom: 12px;
  font-weight: 700; font-size: 0.8rem; color: var(--court);
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
[data-theme="night"] .beat-tag { color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; }

.film-steps {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  font-size: 0.72rem; font-weight: 650; color: var(--muted);
}
.film-steps li { display: grid; }
.film-steps button {
  display: grid; gap: 6px; padding: 4px 0; margin: -4px 0; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit;
}
.film-steps button:hover { color: var(--ink); }
.film-steps button:hover i { box-shadow: 0 0 0 1px var(--ink); }
.film-steps li.is-on { color: var(--ink); }
.film-steps i { display: block; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; border-radius: 2px; box-shadow: 0 0 0 0.5px var(--line); }

.score { display: inline-flex; gap: 2px; margin-top: 8px; font-family: var(--font-display); font-stretch: var(--display-stretch); font-variant-numeric: tabular-nums; }
.score b {
  background: var(--ink); color: var(--bg);
  padding: 6px 12px; min-width: 3ch; text-align: center; font-size: 1.25rem;
  border-radius: var(--radius);
}
.score b:first-child { background: var(--court); color: #fff; }

/* Phones: panel docks to the bottom, over the calm part of the vertical frame. */
@media (max-aspect-ratio: 1/1) {
  .film-panel {
    left: 12px; right: 12px; top: auto; bottom: 12px; transform: none;
    width: auto; padding: 18px 18px 14px;
  }
  .film-texts h2.display { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .film-texts h3 { font-size: 1.5rem; }
  .film-texts p { font-size: 0.98rem; }
  .film-steps { margin-bottom: 14px; }
}

/* Reduced motion: the section becomes a normal block with a still and all text. */
.film.is-static .film-stage { height: auto; min-height: 0; display: grid; }
.film.is-static .film-media { position: relative; inset: auto; aspect-ratio: 16 / 9; }
.film.is-static .film-overlay { aspect-ratio: 16 / 9; height: auto; }
.film.is-static .film-panel { position: relative; inset: auto; transform: none; width: auto; margin: 16px; }
.film.is-static .film-texts { display: grid; gap: 22px; }
.film.is-static .film-texts > [data-beat] { grid-area: auto; visibility: visible; opacity: 1; }
.film.is-static .film-steps { display: none; }
@media (max-aspect-ratio: 1/1) {
  .film.is-static .film-media, .film.is-static .film-overlay { aspect-ratio: 9 / 16; max-height: 80svh; }
}

/* Overlay marks */
.film-overlay { --ov-font: 24px; --ov-w: 3px; }
.film-overlay.is-portrait { --ov-font: 40px; --ov-w: 5px; }
.ov-line { fill: none; stroke: #fff; stroke-width: var(--ov-w); stroke-linecap: round; }
.ov-halo { stroke: rgb(0 0 0 / 0.45); stroke-width: calc(var(--ov-w) * 3); }
.ov-hl { fill: none; stroke: #fff; stroke-width: calc(var(--ov-w) * 1.4); stroke-linecap: round; stroke-linejoin: round; }
.ov-hl-glow { fill: none; stroke: var(--ball); stroke-width: calc(var(--ov-w) * 5); stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; filter: blur(3px); }
.ov-leader { fill: none; stroke: #fff; stroke-width: var(--ov-w); stroke-dasharray: 2 7; stroke-linecap: round; }
.ov-dot { fill: var(--ball); stroke: #0D1A17; stroke-width: calc(var(--ov-w) * 0.8); }
.ov-ring { fill: none; stroke: var(--ball); stroke-width: calc(var(--ov-w) * 1.2); }
.ov-path { fill: none; stroke: var(--ball); stroke-width: calc(var(--ov-w) * 1.4); stroke-linecap: round; stroke-linejoin: round; }
.ov-path-halo { fill: none; stroke: rgb(0 0 0 / 0.45); stroke-width: calc(var(--ov-w) * 3.4); stroke-linecap: round; stroke-linejoin: round; }
.ov-step circle { fill: var(--ball); stroke: #0D1A17; stroke-width: calc(var(--ov-w) * 0.8); }
.ov-step text { fill: #0D1A17; font: 800 calc(var(--ov-font) * 0.9)/1 var(--font-body); }
.ov-arrow { fill: var(--ball); stroke: #0D1A17; stroke-width: calc(var(--ov-w) * 0.6); stroke-linejoin: round; }
.ov-chip rect { fill: rgb(10 14 18 / 0.82); }
.ov-chip text { fill: #fff; font: 700 var(--ov-font)/1 var(--font-body); letter-spacing: 0.01em; }
.ov-chip-soft rect { fill: rgb(10 14 18 / 0.6); }
.ov-box { fill: none; stroke: #fff; stroke-width: calc(var(--ov-w) * 1.2); }
.ov-box.is-padel { stroke: var(--ball); stroke-width: calc(var(--ov-w) * 1.6); }
.ov-box-inner { fill: none; stroke: #fff; stroke-width: var(--ov-w); stroke-dasharray: 10 8; opacity: 0.8; }
.ov-chip.is-padel rect { fill: var(--ball); }
.ov-chip.is-padel text { fill: #0D1A17; }

/* Size legend (inside the sizes panel) */
.size-legend { display: grid; gap: 4px; margin: 18px 0 0; }
.size-row {
  display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  opacity: 0.35; transition: opacity 0.4s ease;
}
.size-row.is-on { opacity: 1; }
.size-row dt { font-weight: 700; }
.size-row dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.size-row dd b { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 1.4rem; color: var(--ink); }
.key { width: 16px; height: 16px; border-radius: 3px; }
.key-tennis { border: 2.5px solid var(--ink); }
.key-padel { background: var(--ball); box-shadow: inset 0 0 0 1.5px var(--ball-edge); }
.key-pickle { border: 2.5px dashed var(--ink); }

/* Club card (where to play) */
.club-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.club-name h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 0; }
.open-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 650; font-size: 0.9rem; }
.open-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); position: relative; }
.open-status.is-open .dot { background: var(--ok); }
.open-status.is-open .dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--ok); animation: ping 2s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.club-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 16px 0 20px; font-size: 0.92rem; }
.club-facts dt { font-size: 0.78rem; color: var(--muted); margin-bottom: 2px; font-weight: 600; }
.club-facts dd { margin: 0; font-weight: 550; line-height: 1.4; }
.club-facts a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.club .note { margin: 16px 0 0; font-size: 0.85rem; color: var(--muted); }
.club .cta-row .btn { --pad-y: 0.7rem; }
@media (max-aspect-ratio: 1/1) {
  .film-where .club-facts { font-size: 0.85rem; gap: 10px 16px; margin: 10px 0 14px; }
  .film-where .club .note, .film-where .film-texts > div > p:not(.open-status):not(.note) { display: none; }
  .film-where .film-texts h2.display { margin-bottom: 10px; }
}

/* ---------- FIRST TIME ---------- */

.first-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
@media (min-width: 700px) { .first-steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .first-steps { grid-template-columns: repeat(4, 1fr); } }
.first-steps li { background: var(--bg); padding: 28px 24px 24px; }
.first-steps p { color: var(--ink-soft); margin: 10px 0 0; }
.icon { width: 88px; height: 88px; margin-bottom: 20px; overflow: visible; }
.i-stroke { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.i-court { fill: var(--court); }
.i-court-line { stroke: var(--court-line); stroke-width: 2; }
.i-dot { fill: var(--ink); }
.i-dot-b { fill: var(--court-deep); }
[data-theme="night"] .i-dot-b { fill: var(--accent); }
.i-ball { fill: var(--ball); stroke: var(--ball-edge); stroke-width: 1.5; }
.i-head { fill: var(--court); stroke: var(--ink); stroke-width: 3; }
.i-hole { fill: var(--bg); }
.i-count { font: 800 22px/1 var(--font-display); font-stretch: var(--display-stretch); fill: var(--ink); font-variant-numeric: tabular-nums; }

.clinic-strip {
  margin-top: 28px;
  display: grid; gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--bg);
}
@media (min-width: 900px) { .clinic-strip { grid-template-columns: 1.1fr 1.2fr auto; gap: 40px; } }
.clinic-strip h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 6px; }
.clinic-strip p { margin: 0; opacity: 0.8; }
.clinic-strip .btn-solid { background: var(--bg); color: var(--ink); }
.clinic-strip .btn-solid:hover { background: color-mix(in oklab, var(--bg) 85%, var(--ink)); }
[data-theme="clubhouse"] .clinic-strip .btn-solid { border-color: var(--bg); box-shadow: 0 4px 0 rgb(255 255 255 / 0.35); }
.clinic-live { display: grid; gap: 8px; min-height: 64px; }
.clinic-live[hidden] { display: none; }
.clinic-strip .clinic-when { font-weight: 750; font-size: 1.15rem; opacity: 1; }
.clinic-live a { color: inherit; }
.clinic-spots { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.clinic-spots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ball); display: inline-block; }
.clinic-spots i.taken { background: var(--ball); }
.clinic-spots span { margin-left: 6px; opacity: 0.85; }

/* ---------- FOOTER ---------- */

.footer { position: relative; padding: 0 0 40px; overflow: hidden; }
.footer-court { height: 120px; }
.footer-court svg { width: 100%; height: 100%; overflow: visible; }
.f-line { stroke: var(--ink); stroke-width: 2; opacity: 0.25; }
.f-ball { fill: var(--ball); stroke: var(--ball-edge); stroke-width: 1.5; }
.f-seam { fill: none; stroke: var(--ball-edge); stroke-width: 1.4; }
.f-shadow { fill: rgb(0 0 0 / 0.18); }
.footer-word {
  margin: 0 0 10px;
  font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  letter-spacing: var(--display-track); text-transform: var(--display-case);
  font-size: clamp(3.4rem, 15vw, 13rem); line-height: 0.85;
}
[data-theme="clubhouse"] .footer-word { font-size: clamp(2.6rem, 10.5vw, 9.5rem); }
.footer-grid > * { min-width: 0; }
.footer-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr auto; align-items: end; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.footer-fine { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); max-width: 60rem; margin: 18px 0 0; }

/* ---------- TUNE PANEL (?tune) ---------- */

.tune {
  position: fixed; left: 12px; bottom: 12px; z-index: 90;
  width: 240px; padding: 12px 14px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  font: 500 12px/1.4 var(--font-body);
  box-shadow: 0 20px 40px -18px rgb(0 0 0 / 0.4);
}
.tune strong { display: block; margin-bottom: 8px; font-size: 12px; }
.tune label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin-bottom: 8px; }
.tune input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.tune button { font: inherit; padding: 5px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.tune output { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- MOTION PREFERENCES ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-rain, .scroll-cue span, .open-status.is-open .dot::after { animation: none; }
  .court-steps li { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- HERO FOOTAGE ---------- */

.has-video .hero-media > img,
.has-video .hero-media > video { object-position: var(--px, 50%) 50%; }
/* Phones see a narrow slice of the 16:9 frame: start on the tower (the hero film pans to the arches). */
@media (max-aspect-ratio: 1/1) { .hero-media { --px: 74%; } }
.has-video .hero-media > *, .film-media img, .film-media video { filter: var(--footage, none); }
[data-theme="night"] { --footage: brightness(0.58) saturate(0.8) contrast(1.05); }
[data-theme="clubhouse"] { --footage: saturate(0.85) brightness(1.04); }
.hero-media > img.hero-seam { object-position: 50% 50%; opacity: 0; visibility: hidden; z-index: 1; }
.has-video .hero-rain { opacity: calc(var(--rain) * 0.28); }
.hero-beats { position: absolute; inset: auto 0 clamp(70px, 12vh, 130px) 0; pointer-events: none; }
.hero-beats p {
  position: absolute; bottom: 0;
  left: max(16px, (100% - 1240px) / 2);
  width: min(15ch, calc(100% - 32px));
  margin: 0;
  font-size: clamp(2.2rem, 6.4vw, 5.6rem);
  opacity: 0; visibility: hidden;
}
@media (min-width: 720px) { .hero-beats p { left: max(40px, (100% - 1240px) / 2); } }
[data-theme="night"] .hero-beats p:first-child { text-shadow: 0 2px 40px rgb(0 0 0 / 0.6); }
.motion .hero [data-split] { visibility: hidden; }
/* Until the scripts take over (see the head script), the copy and logo wait unseen and the
   footage sits where its zoom-out starts, so nothing shows, vanishes, then animates in. */
.intro .hero-copy, .intro [data-mark-holes], .intro [data-mark-ball] { visibility: hidden; }
.intro .hero-media { transform: scale(1.08); }
@media (max-aspect-ratio: 1/1) {
  .has-video .hero-shade {
    background:
      linear-gradient(180deg, color-mix(in oklab, var(--bg) 82%, transparent) 0%, color-mix(in oklab, var(--bg) 60%, transparent) 48%, transparent 72%),
      linear-gradient(0deg, var(--bg) 0%, transparent 20%);
  }
  [data-theme="night"] .has-video .hero-shade {
    background:
      linear-gradient(180deg, rgb(7 9 13 / 0.85) 0%, rgb(7 9 13 / 0.55) 50%, transparent 75%),
      linear-gradient(0deg, var(--bg) 0%, transparent 20%);
  }
}
@media (max-width: 899px) {
  .court-steps li { opacity: 1; }
}
.has-video .hero-lede { color: var(--ink); text-shadow: 0 0 22px color-mix(in oklab, var(--bg) 85%, transparent), 0 0 4px color-mix(in oklab, var(--bg) 60%, transparent); }

/* SplitText line masks: room for descenders (the g in "Bigger") without changing spacing. */
.sl-mask { padding-bottom: 0.16em; margin-bottom: -0.16em; }
@media (max-aspect-ratio: 1/1) {
  .film-sizes .film-texts p { display: none; }
  .film-sizes .size-legend { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
  .film-sizes .size-row { grid-template-columns: 12px 1fr; gap: 2px 8px; padding: 6px 0; border: 0; }
  .film-sizes .size-row dd { grid-column: 1 / -1; }
  .film-sizes .size-row dd b { font-size: 1.25rem; }
  .film-sizes .key { width: 12px; height: 12px; }
}
@media (min-aspect-ratio: 1/1) {
  /* The court group starts ~39% across the frame; keep the panel clear of it. */
  .film-sizes .film-panel { width: clamp(280px, 23vw, 23rem); }
  .film-sizes .film-texts h2.display { font-size: clamp(1.8rem, 2.8vw, 2.8rem); }
}

/* ---------- FOR CLUBS (portfolio pitch) ---------- */

.clubs { background: var(--bg-deep); }
.clubs-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .clubs-grid { grid-template-columns: 1fr 1.1fr; gap: 72px; } }
.clubs-kicker { font-weight: 700; font-size: 0.9rem; color: var(--court); margin-bottom: 18px; }
[data-theme="night"] .clubs-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.clubs h2.display { font-size: clamp(2.2rem, 5vw, 4.2rem); margin-bottom: 22px; }
.clubs-lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.clubs-list { list-style: none; margin: 28px 0 32px; padding: 0; display: grid; gap: 14px; }
.clubs-list li { display: grid; gap: 2px; padding-left: 26px; position: relative; }
.clubs-list li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ball); box-shadow: inset 0 0 0 1.5px var(--ball-edge);
}
.clubs-list strong { font-size: 1.05rem; }
.clubs-list span { color: var(--ink-soft); }

.make { margin: 0; display: grid; gap: 14px; }
.make-frames { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.make-frames > div:not(.make-plus) { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.make-frames img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.make-frames span {
  position: absolute; left: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700;
  background: rgb(10 14 18 / 0.75); color: #fff;
}
.make-plus { font: 800 1.6rem/1 var(--font-display); color: var(--muted); }
.make-film {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  cursor: ew-resize; touch-action: pan-y; background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(0 0 0 / 0.5);
}
[data-theme="clubhouse"] .make-film { box-shadow: 0 0 0 5px #fff, 0 30px 60px -30px rgb(0 0 0 / 0.35); }
.make-film img, .make-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--footage, none); }
.make-hint {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  padding: 8px 14px; border-radius: 6px; pointer-events: none;
  background: rgb(10 14 18 / 0.72); color: #fff; font-weight: 700; font-size: 0.85rem;
  transition: opacity 0.4s ease;
}
.make-film.is-touched .make-hint { opacity: 0; }
.make-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / 0.25); z-index: 1; }
.make-bar i { display: block; height: 100%; background: var(--ball); transform: scaleX(0); transform-origin: left; }
.make figcaption { font-size: 0.9rem; color: var(--muted); }
/* Film-to-film dissolve layers */
.film-blend {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
  filter: var(--footage, none); will-change: transform, opacity, filter;
}
.film-veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; visibility: hidden;
  background: radial-gradient(120% 90% at 50% 55%, rgb(var(--fog) / 0.95), rgb(var(--fog) / 0.55) 60%, rgb(var(--fog) / 0.25));
}
.film-media { will-change: transform; }

/* ---------- SCHEDULE (live from Playtomic) ---------- */

:root {
  --t-clinic: #2452A6;
  --t-tournament: #C2410C;
  --t-social: #0F766E;
  --t-match: #7C3AED;
}
[data-theme="night"] {
  --t-clinic: #5B8CFF;
  --t-tournament: #FB923C;
  --t-social: #2DD4BF;
  --t-match: #A78BFA;
}
.t-clinic { --t: var(--t-clinic); }
.t-tournament { --t: var(--t-tournament); }
.t-social { --t: var(--t-social); }
.t-match { --t: var(--t-match); }

.sched-head { display: grid; gap: 18px; align-items: end; margin-bottom: 28px; }
@media (min-width: 900px) { .sched-head { grid-template-columns: 1fr auto; gap: 40px; } }
.schedule h2.display { font-size: clamp(2.2rem, 5.5vw, 4.4rem); margin-bottom: 14px; }
.sched-lede { color: var(--ink-soft); font-size: 1.08rem; max-width: 36rem; margin: 0; }
.sched-live {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-weight: 650; font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap;
}
.sched-live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); position: relative; }
.sched-live.is-live .dot { background: var(--ok); }
.sched-live.is-live .dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--ok); animation: ping 2s cubic-bezier(0,0,.2,1) infinite;
}
.sched-live.is-down .dot { background: var(--t-tournament); }

/* Day rail */
.sched-days {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: 8px;
  overflow-x: auto; scrollbar-width: none; margin: 0 -16px 18px; padding: 4px 16px 6px;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px; /* snap to the gutter, not the screen edge */
}
@media (min-width: 720px) { .sched-days { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
.sched-days::-webkit-scrollbar { display: none; }
.day {
  display: grid; gap: 4px; justify-items: start; text-align: left; scroll-snap-align: start;
  padding: 12px 12px 10px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); font: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.day:hover { border-color: var(--ink); }
.day[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-dow { font-size: 0.78rem; font-weight: 700; opacity: 0.75; }
.day-dom { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.day-bar { display: flex; height: 5px; min-width: 4px; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.day-bar i { display: block; background: var(--t); }
.day-n { font-size: 0.75rem; opacity: 0.7; }

/* Type filters */
.sched-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.sched-filters button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  font: 600 0.9rem/1 var(--font-body);
}
.sched-filters button:hover { border-color: var(--ink); }
.sched-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sched-filters i { width: 10px; height: 10px; border-radius: 2px; background: var(--t); }
.sched-filters b { font-variant-numeric: tabular-nums; opacity: 0.6; font-weight: 700; }

/* Event rows */
/* One column that never grows past the screen: a wide row wraps inside its card instead of widening every card. */
.sched-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; position: relative; }
.ev {
  display: grid; gap: 10px 18px; align-items: center;
  grid-template-columns: 1fr auto;
  grid-template-areas: "when act" "what what" "meta meta";
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1.5px solid var(--line);
  border-left: 5px solid var(--t);
}
.ev[hidden] { display: none; }
/* Desktop: rows share the list's column tracks (subgrid), so the level bars,
   spots and buttons line up down the whole list whatever each row contains. */
@media (min-width: 900px) {
  .sched-list { grid-template-columns: max-content minmax(0, 1.3fr) minmax(0, 1fr) auto; column-gap: 22px; }
  .ev { grid-column: 1 / -1; grid-template-columns: subgrid; grid-template-areas: none; padding: 14px 18px; }
}
.ev-clinic { --t: var(--t-clinic); }
.ev-tournament { --t: var(--t-tournament); }
.ev-social { --t: var(--t-social); }
.ev-match { --t: var(--t-match); }
.ev-when { grid-area: when; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
@media (min-width: 900px) { .ev-when { display: grid; gap: 6px; } }
.ev-when b { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; white-space: nowrap; }
.ev-tag {
  justify-self: start; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.02em;
  padding: 3px 7px; border-radius: 4px; color: #fff; background: var(--t);
}
.ev-what { grid-area: what; min-width: 0; }
.ev-what h3 { font-size: 1.08rem; line-height: 1.25; margin: 0 0 3px; }
.ev-what p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.ev-tentative { color: var(--t-tournament) !important; font-weight: 700; }
.ev-meta { grid-area: meta; display: grid; gap: 8px; min-width: 0; }
.lvl { display: grid; gap: 4px; }
.lvl-track { position: relative; display: block; height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in oklab, var(--ink) 12%, transparent); }
.lvl-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--t); }
.lvl-text { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.ev-spots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.spot-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 150px; }
.spot-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ball-edge); }
.spot-dots i.on { background: var(--ball); }
.spot-text { font-size: 0.8rem; font-weight: 650; color: var(--ink-soft); }
.spot-text.is-low { color: var(--t-tournament); }
.spot-text.is-full { color: var(--muted); }
.ev-act { grid-area: act; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 12px; justify-self: end; }
.ev-price { font-weight: 750; font-variant-numeric: tabular-nums; }
.ev-go {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.88rem; text-decoration: none;
  white-space: nowrap;
}
.ev-go:hover { background: color-mix(in oklab, var(--accent) 85%, var(--ink)); }
.ev-go.is-wait { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.sched-skel {
  height: 78px; border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface) 0%, color-mix(in oklab, var(--surface) 70%, var(--bg)) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite;
}
@keyframes skel { to { background-position: -200% 0; } }
.sched-empty { margin: 14px 0 0; color: var(--muted); }
.sched-foot { margin: 22px 0 0; font-size: 0.88rem; color: var(--muted); }
.sched-foot a { color: var(--ink); font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .sched-skel { animation: none; } }
.sched-filters button.is-zero:not([aria-pressed="true"]) { opacity: 0.45; }

/* Desktop schedule rows: full placement (row / column) on the shared subgrid.
   Kept last and scoped to .ev so the mobile named-area rules above can't win. */
@media (min-width: 900px) {
  .ev > .ev-when { grid-area: 1 / 1; }
  .ev > .ev-what { grid-area: 1 / 2; }
  .ev > .ev-meta { grid-area: 1 / 3; }
  .ev > .ev-act { grid-area: 1 / 4; }
}

/* ---------- CHAPTER RAIL (desktop) ---------- */

.rail { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .rail {
    display: block; position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 60;
    padding: 12px 10px 12px 14px; border-radius: var(--radius-lg);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
  }
  .rail:hover, .rail:has(:focus-visible) {
    background: color-mix(in oklab, var(--surface) 86%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 0 0 1px var(--line), 0 20px 50px -24px rgb(0 0 0 / 0.45);
  }
  .rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .rail button {
    display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%;
    padding: 5px 0; border: 0; background: none; cursor: pointer; color: var(--ink);
    font: 600 0.82rem/1.1 var(--font-body);
  }
  .rail-label {
    white-space: nowrap; opacity: 0; transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.25s ease;
  }
  .rail button.is-major .rail-label { font-weight: 750; }
  .rail:hover .rail-label, .rail:has(:focus-visible) .rail-label { opacity: 0.75; transform: none; }
  .rail:hover button:hover .rail-label, .rail button.is-active .rail-label, .rail button:focus-visible .rail-label { opacity: 1; }
  /* Ticks read over any footage: light line with a dark halo. */
  .rail-tick {
    position: relative; width: 10px; height: 2px; border-radius: 1px; flex: none;
    background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
    transition: width 0.25s cubic-bezier(.3,.7,.2,1), background-color 0.2s ease;
  }
  .rail button.is-major .rail-tick { width: 18px; }
  .rail button:hover .rail-tick { width: 26px; }
  .rail button.is-active .rail-tick { width: 30px; }
  .rail button.is-active .rail-tick::after {
    content: ""; position: absolute; right: -4px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
    border-radius: 50%; background: var(--ball); box-shadow: 0 0 0 1.5px var(--ball-edge), 0 1px 4px rgb(0 0 0 / 0.4);
  }
  .rail:hover .rail-tick, .rail:has(:focus-visible) .rail-tick { background: var(--ink); box-shadow: none; }
}

/* Phones: compact film panels so the footage stays the main event. */
@media (max-aspect-ratio: 1/1) {
  .film-panel { padding: 14px 16px 12px; left: 10px; right: 10px; bottom: calc(10px + 100lvh - 100svh); }
  .film-steps { gap: 4px; margin-bottom: 10px; font-size: 0.62rem; }
  .film-steps button { gap: 4px; padding: 6px 0; margin: -6px 0; }
  .film-texts h2.display { font-size: clamp(1.5rem, 6.4vw, 2rem); margin-bottom: 8px; }
  .film-texts h3 { font-size: 1.25rem; margin-bottom: 6px; }
  .beat-tag { margin-bottom: 6px; font-size: 0.72rem; }
  .film-texts p { font-size: 0.9rem; line-height: 1.45; margin-bottom: 0.4em; }
  .film-texts [data-beat] > p:not(.score):not(.open-status) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  .score b { font-size: 1rem; padding: 4px 10px; }
  .film-where .club-facts { grid-template-columns: 1fr 1fr; font-size: 0.8rem; gap: 8px 14px; margin: 8px 0 12px; }
  .film-where .club-facts dt { font-size: 0.7rem; }
  .film-where .club .cta-row .btn { --pad-y: 0.6rem; padding-inline: 0.9rem; font-size: 0.85rem; }
}
.film-veil.is-dusk {
  background: linear-gradient(180deg, #0A1322 0%, rgb(12 24 44 / 0.85) 45%, rgb(20 36 64 / 0.35) 75%, transparent 100%);
}
/* Crossfade cover for jumps between scenes */
.film-cut {
  position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 45; pointer-events: none; opacity: 0; visibility: hidden;
  filter: var(--footage, none);
}

/* ---------- /padel: closing call to action ---------- */
.try { background: var(--bg-deep); }
.try-inner { max-width: 46rem; }
.try h2.display { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: 18px; }
.try p { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 26px; }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero: the club card that lands with the arches ---------- */
.hero-club { z-index: 2; }
.js .hero-club { opacity: 0; visibility: hidden; } /* revealed by the hero timeline */
.hero-club .club-kicker { margin: 0 0 8px; font-weight: 700; font-size: 0.82rem; color: var(--court); }
[data-theme="night"] .hero-club .club-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; }
.hero-club h2.display { font-size: clamp(1.7rem, 2.6vw, 2.5rem); margin-bottom: 14px; }
.hero-club .club-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }
@media (max-aspect-ratio: 1/1) {
  .hero-club h2.display { font-size: clamp(1.35rem, 5.6vw, 1.8rem); margin-bottom: 8px; }
  .hero-club .club-desc, .hero-club .note { display: none; }
  .hero-club .club-facts { font-size: 0.8rem; gap: 8px 14px; margin: 8px 0 12px; }
  .hero-club .club-facts dt { font-size: 0.7rem; }
  .hero-club .cta-row .btn { --pad-y: 0.6rem; padding-inline: 0.9rem; font-size: 0.85rem; }
}
/* Short wide screens (laptops, tablets on their side, a foldable's inner screen):
   the full card is taller than the stage, so drop the extras and centre it below the nav. */
@media (orientation: landscape) and (max-height: 940px) {
  .hero-club { top: calc(50svh + 36px); }
  .hero-club h2.display { font-size: clamp(1.4rem, min(2.6vw, 4.4svh), 2.5rem); margin-bottom: 10px; }
  .hero-club .club-desc, .hero-club .note { display: none; }
  .hero-club .club-facts { font-size: 0.85rem; gap: 10px 16px; margin: 10px 0 14px; }
  .hero-club .cta-row .btn { --pad-y: 0.6rem; padding-inline: 0.9rem; font-size: 0.85rem; }
}
/* Reduced motion: no pinned film, so the card sits under the hero copy. */
@media (prefers-reduced-motion: reduce) {
  .hero-stage { height: auto; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; padding: 110px 0 28px; }
  .hero-copy { position: relative; top: auto; }
  .js .hero-club, .hero-club { position: relative; left: auto; right: auto; top: auto; bottom: auto; transform: none; width: auto; margin: 0 16px; opacity: 1; visibility: visible; }
  @media (min-width: 720px) { .hero-club { margin: 0 40px; max-width: 32rem; } }
}

/* ---------- What is padel? (teaser for /padel) ---------- */
.learn-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .learn-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; } }
.learn h2.display { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: 18px; }
.learn-copy p { font-size: 1.12rem; color: var(--ink-soft); max-width: 32rem; margin-bottom: 26px; }
.learn-media {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(0 0 0 / 0.5);
}
[data-theme="clubhouse"] .learn-media { box-shadow: 0 0 0 5px #fff, 0 30px 60px -30px rgb(0 0 0 / 0.35); }
@media (max-width: 700px) { .learn-media { aspect-ratio: 4 / 5; } }
.learn-media img { width: 100%; height: 100%; object-fit: cover; filter: var(--footage, none); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.learn-media:hover img { transform: scale(1.05); }
.learn-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.5); transition: transform 0.3s cubic-bezier(.3,.7,.2,1);
}
.learn-play::after {
  content: ""; position: absolute; left: 31px; top: 25px;
  border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent var(--ink);
}
.learn-media:hover .learn-play { transform: scale(1.08); }
