/* Rosemoor Tennis Centre. Hand built, no framework. */
:root {
  --forest: #0d2a1f;
  --forest-deep: #081c15;
  --court: #1b5540;
  --court-edge: #154532;
  --bone: #eee9dd;
  --bone-soft: #c9cfc3;
  --ink: #0f1f18;
  --ink-soft: #3a4a42;
  --accent: #d8f046;
  --accent-dark: #4c5a00;
  --line: rgba(238, 233, 221, 0.86);

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --section: clamp(88px, 12vw, 176px);
  --radius: 22px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 72px;
  --e2: 0 18px 40px -18px rgba(4, 18, 12, 0.55), 0 2px 6px rgba(4, 18, 12, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--forest);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.on-light :focus-visible { outline-color: var(--accent-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 82%;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 50;
  background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 12px; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent;
  transition: background-color .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out), transform .12s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-line { border-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover { background: var(--bone); }
  .btn-line:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--gutter);
  color: var(--bone);
  transition: background-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.site-header.is-solid { background: var(--forest-deep); box-shadow: 0 1px 0 rgba(238,233,221,.08); }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark-ball { width: 30px; height: 30px; }
.wordmark-ball circle { fill: var(--accent); }
.wordmark-ball path { fill: none; stroke: var(--forest); stroke-width: 2.2; stroke-linecap: round; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark-main { font-family: var(--font-display); font-weight: 900; font-stretch: 85%; font-size: 22px; letter-spacing: -0.01em; }
.wordmark-sub { font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; opacity: .82; margin-top: 4px; }
.site-nav { display: none; gap: 30px; }
.site-nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .88; transition: opacity .14s, color .14s; }
.site-nav a:hover { opacity: 1; color: var(--accent); }
.btn-header { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* Act 1. Hero */
.hero { position: relative; height: 170svh; background: var(--forest); }
.hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.plane { position: absolute; inset: 0; will-change: transform; }

.plane-far img {
  position: absolute; left: -30%; top: 0; width: 130%; max-width: none; height: 64%;
  object-fit: cover; object-position: 50% 60%;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 45%, transparent 98%);
  opacity: .9;
}
.plane-far { transform-origin: 50% 0; }

.plane-court { perspective: 1000px; perspective-origin: 50% 20%; }
.plane-court::before {
  content: ""; position: absolute; left: 0; right: 0; top: var(--horizon, 43%); bottom: 0;
  background: linear-gradient(to bottom, rgba(26, 74, 55, 0) 0%, #1a4a37 9%, #123829 24%, var(--forest) 100%);

}
.court {
  position: absolute; left: 50%; bottom: -36%;
  width: min(62vw, 760px); aspect-ratio: 1100 / 2378;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(var(--court-tilt, 74deg));
  background:
    radial-gradient(120% 60% at 50% 40%, rgba(255,255,255,.06), transparent 70%),
    var(--court);
  outline: 2px solid rgba(238, 233, 221, .0);
}
.court svg { width: 100%; height: 100%; overflow: visible; }
.court .line { fill: none; stroke: var(--line); stroke-width: 10; vector-effect: none; }
.court .net { stroke: var(--bone); stroke-width: 16; opacity: .95; }

.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 0% 100%, rgba(8, 28, 21, .78), transparent 62%);
}
.hero-copy {
  position: absolute; left: var(--gutter); bottom: clamp(56px, 11vh, 120px);
  width: min(760px, calc(100% - 2 * var(--gutter)));
  z-index: 2;
}
.hero h1 {
  font-size: clamp(46px, 8.2vw, 124px);
  font-weight: 900; font-stretch: 78%;
  line-height: .92; letter-spacing: -0.035em;
  text-shadow: 0 2px 24px rgba(4, 18, 12, .35);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: clamp(17px, 1.5vw, 21px); max-width: 30ch; margin: 22px 0 28px; color: var(--bone); }

.plane-near { z-index: 3; pointer-events: none; }
.ball, .ball-shadow { position: absolute; right: 9vw; bottom: 15vh; will-change: transform; }
.ball { width: clamp(88px, 11vw, 190px); height: auto; filter: drop-shadow(0 24px 30px rgba(4,18,12,.35)); }
.ball-shadow {
  width: clamp(88px, 11vw, 190px); height: clamp(20px, 2.4vw, 40px);
  bottom: calc(15vh - clamp(30px, 4vw, 60px));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(3, 14, 9, .55), transparent);
}

/* Act 2. Mission */
.mission { background: var(--bone); color: var(--ink); padding: var(--section) 0; }
.mission-grid { display: grid; gap: 56px; }
.mission-intro {
  font-family: var(--font-text); font-weight: 500; font-stretch: 100%;
  font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; letter-spacing: -0.01em;
  max-width: 34ch; color: var(--ink);
}
.mission-quote { margin: 0; }
.mission-quote blockquote { margin: 0; }
.kinetic {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
  font-size: clamp(38px, 5vw, 78px); line-height: 1; letter-spacing: -0.03em;
  margin: 0 0 28px;
}
.kinetic span { display: block; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.js .kinetic span { opacity: .14; transform: translateY(14px); }
.js .kinetic span.is-in { opacity: 1; transform: none; }
.mission-quote figcaption { font-size: 15px; font-weight: 600; color: var(--ink-soft); }

/* Act 3. Season (peak) */
.season { position: relative; background: var(--forest); height: 380svh; }
.season-stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  padding: calc(var(--header-h) + 12px) var(--gutter) 24px;
  max-width: 1440px; margin: 0 auto;
}
.season-board { position: relative; z-index: 2; }
.season h2 { font-size: clamp(30px, 4.2vw, 64px); max-width: 14ch; margin-bottom: 20px; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; perspective: 900px; }
.stop { grid-area: 1 / 1; transform-origin: 50% 0; }
.js .stop { opacity: 0; transform: rotateX(-70deg); transition: opacity .35s var(--ease-out), transform .45s var(--ease-out); pointer-events: none; }
.js .stop.is-active { opacity: 1; transform: none; pointer-events: auto; }
.stop-when { font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-soft); margin: 0 0 6px; }
.stop-where {
  font-size: clamp(44px, 7.4vw, 112px); font-weight: 900; font-stretch: 75%;
  color: var(--accent); line-height: .9; margin-bottom: 14px;
}
.stop-what { max-width: 38ch; font-size: 17px; color: var(--bone); margin: 0; }

.season-map { position: relative; min-height: 0; }
.season-map svg { width: 100%; height: 100%; overflow: visible; }
.sa { fill: rgba(238, 233, 221, .045); stroke: rgba(238, 233, 221, .42); stroke-width: 1.4; stroke-linejoin: round; }
.leg-track { fill: none; stroke: rgba(238, 233, 221, .28); stroke-width: 1.6; stroke-dasharray: 3 7; }
.leg-trail { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.pin-dot { fill: var(--forest); stroke: var(--bone); stroke-width: 2; }
.pin.is-reached .pin-dot { fill: var(--accent); stroke: var(--accent); }
.pin-label { fill: var(--bone); font-family: var(--font-text); font-size: 15px; font-weight: 600; }
.pin-label.exit { fill: var(--accent); font-weight: 700; }
.flight-ball { fill: var(--accent); stroke: var(--forest); stroke-width: 2; }
.flight-shadow { fill: rgba(3, 14, 9, .6); }

/* Act 4. Programme */
.programme { background: var(--bone); color: var(--ink); padding: var(--section) 0; }
.section-title { font-size: clamp(36px, 5.4vw, 84px); max-width: 14ch; margin-bottom: clamp(40px, 6vw, 80px); }
.lanes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.lane {
  display: grid; gap: 20px; padding: 28px 0 32px;
  border-bottom: 1px solid rgba(15, 31, 24, .2);
}
.lane-photo { margin: 0; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: #d9d4c7; }
.lane-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out), filter .3s var(--ease-out); }
.lane h3 { font-size: clamp(34px, 5vw, 76px); font-weight: 900; font-stretch: 78%; margin-bottom: 10px; }
.lane p { margin: 0; color: var(--ink-soft); max-width: 40ch; }

/* Act 5. Raffle */
.raffle { position: relative; background: var(--forest-deep); padding: 0 0 var(--section); }
.raffle-photo { position: relative; height: 72vh; min-height: 380px; overflow: hidden; clip-path: inset(var(--wipe, 0%) var(--wipe, 0%) 0 var(--wipe, 0%) round var(--radius)); }
.raffle-photo img { width: 100%; height: 115%; object-fit: cover; transform: translateY(var(--drift, 0)); }
.raffle-card-wrap { position: relative; margin-top: -22vh; }
.raffle-card {
  background: var(--bone); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--e2);
  padding: clamp(28px, 4vw, 56px);
  max-width: 760px;
}
.raffle-card .eyebrow { color: var(--accent-dark); }
.raffle-card h2 { font-size: clamp(30px, 3.8vw, 54px); font-stretch: 80%; margin-bottom: 22px; }
.raffle-card p { color: var(--ink-soft); max-width: 52ch; }
.raffle-card .attrib { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0; }

/* Act 6. Join and visit */
.join { background: var(--forest); padding: var(--section) 0 clamp(64px, 8vw, 112px); }
.join-grid { display: grid; gap: 40px; }
.join h2 { font-size: clamp(42px, 6.6vw, 104px); font-weight: 900; font-stretch: 78%; max-width: 12ch; margin-bottom: 24px; }
.join-name { max-width: 44ch; color: var(--bone); font-size: 19px; }
.big-number {
  display: inline-block; margin: 18px 0 30px;
  font-family: var(--font-display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(56px, 10vw, 156px); line-height: .9; letter-spacing: -0.03em;
  color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums;
}
.big-number:hover { color: var(--bone); }
.visit {
  display: grid; gap: 32px; margin-top: clamp(64px, 8vw, 120px);
  padding-top: 40px; border-top: 1px solid rgba(238, 233, 221, .18);
}
.visit-info h3 { font-family: var(--font-text); font-weight: 700; font-stretch: 100%; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.visit-info p { margin: 0 0 26px; color: var(--bone); }
.visit-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: var(--radius); filter: saturate(.85); }

/* Footer */
.site-footer { background: var(--forest-deep); padding: 40px 0 36px; color: var(--bone); }
.footer-grid { display: grid; gap: 18px; align-items: center; }
.footer-mark { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 26px; margin: 0; }
.footer-mark span { font-family: var(--font-text); font-weight: 500; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; margin-left: 8px; opacity: .8; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer nav a { font-weight: 600; color: var(--accent); }
.footer-note { font-size: 14px; color: var(--bone-soft); margin: 0; }

/* Grain on dark grounds */
.hero-stage::after, .season-stage::after, .join::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06; z-index: 4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.join { position: relative; overflow: hidden; }
.join-court { position: absolute; right: -4vw; top: 6%; width: min(40vw, 620px); height: auto; display: none; pointer-events: none; transform: rotate(-8deg); }
.join-court * { fill: none; stroke: var(--bone); stroke-width: 8; opacity: .14; }
.join .wrap { position: relative; z-index: 1; }
@media (min-width: 1000px) { .join-court { display: block; } }

/* Phone first adjustments up */
@media (min-width: 760px) {
  .site-nav { display: flex; }
  .mission-grid { grid-template-columns: 5fr 7fr; align-items: start; gap: 64px; }
  .mission-intro { position: sticky; top: calc(var(--header-h) + 32px); }
  .lane { grid-template-columns: 1.2fr 1fr 260px; align-items: center; gap: 32px; }
  .lane-photo { grid-column: 3; grid-row: 1; aspect-ratio: 4 / 3; }
  .lane-text { display: contents; }
  .lane h3 { grid-column: 1; grid-row: 1; margin: 0; }
  .lane p { grid-column: 2; grid-row: 1; }
  .visit { grid-template-columns: 5fr 7fr; }
  .footer-grid { grid-template-columns: auto 1fr auto; }
  .site-footer nav { justify-content: center; }
}
@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  .lane-photo img { filter: grayscale(.9) contrast(.95); }
  .lane:hover .lane-photo img { filter: none; transform: scale(1.06); }
  .lane h3 { transition: transform .3s var(--ease-out); }
  .lane:hover h3 { transform: translateX(10px); }
}
@media (min-width: 1000px) {
  .season-stage { grid-template-rows: none; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; padding-bottom: 40px; }
  .season-map { height: min(78vh, 720px); }
  .raffle-card-wrap { display: flex; justify-content: flex-start; }
}
@media (max-width: 759px) {
  :root { --header-h: 64px; }
  body { font-size: 17px; }
  .btn-header { min-height: 40px; padding: 0 14px; }
  .wordmark-sub { font-size: 9.5px; }
  .hero { height: 140svh; }
  .court { width: 74vw; bottom: 4%; }
  .hero-scrim { background: linear-gradient(to top, rgba(8, 28, 21, .94) 0%, rgba(8, 28, 21, .82) 30%, rgba(8, 28, 21, 0) 52%); }
  .hero .btn-line { background: rgba(8, 28, 21, .55); }
  .plane-far img { height: 52%; object-position: 62% 60%; }
  .hero-copy { bottom: 40px; }
  .hero-sub { margin: 16px 0 22px; }
  .ball, .ball-shadow { right: 6vw; bottom: auto; top: 30vh; }
  .ball-shadow { top: calc(30vh + 30vw); }
  .ball { width: 22vw; }
  .ball-shadow { width: 22vw; height: 6vw; }
  .season { height: 320svh; }
  .season-stage { grid-template-rows: 46% auto; gap: 8px; }
  .season-board { order: 2; }
  .season-map { order: 1; }
  .season h2 { font-size: 26px; margin-bottom: 12px; max-width: none; }
  .season .eyebrow { display: none; }
  .stop-where { font-size: 46px; margin-bottom: 10px; }
  .stop-what { font-size: 16px; }
  .raffle-photo { height: 56vh; min-height: 320px; }
  .raffle-card-wrap { margin-top: -14vh; }
}

/* Reduced motion: still compositions, no pinning, everything visible */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-stage { position: relative; height: 100svh; }
  .season { height: auto; }
  .season-stage { position: relative; height: auto; overflow: visible; padding-bottom: var(--section); }
  .season-map { height: auto; aspect-ratio: 600 / 560; max-height: 70vh; }
  .js .stop, .js .stop.is-active { opacity: 1; transform: none; grid-area: auto; transition: none; pointer-events: auto; }
  .stops { gap: 28px; }
  .stop-where { font-size: clamp(36px, 5vw, 64px); }
  .js .kinetic span { opacity: 1; transform: none; transition: none; }
  .btn, .lane-photo img, .lane h3 { transition: none; }
  .raffle-photo { clip-path: none; }
  .raffle-photo img { transform: none; }
}
