/* ============================================================
   MATCH DAY — shared sporty layer for every page (2026-10-27)
   Loaded after each page's own <style>. Everything here is switched on by
   classes that match-day.js adds, so a page without the script looks exactly
   as before. Colours repeat the brand tokens from index.html.
   ============================================================ */
:root{--md-optic:#E8FF47;--md-deep:#0A2E38;--md-deeper:#06212A;--md-lantern:#FF7A3D;--md-chalk:#A8BFBC}

/* 1. match progress — a thin optic bar across the top as you read */
.md-progress{position:fixed;left:0;top:0;z-index:1000;width:100%;height:3px;pointer-events:none;
  background:linear-gradient(90deg,var(--md-optic),var(--md-lantern));transform-origin:0 50%;transform:scaleX(0)}

/* 2. photo heroes (tour, airport, club, short-trip pages): slow zoom, angled cut, court lines */
.md-photo-hero{clip-path:polygon(0 0,100% 0,100% calc(100% - min(3.2vw,44px)),0 100%)}
.md-photo-hero .hero-media img{animation:md-zoom 26s ease-in-out infinite alternate;transform-origin:55% 40%}
.md-photo-hero .md-court{color:#fff;opacity:.16;z-index:2}
.md-rise > *{animation:md-rise .8s cubic-bezier(.2,.7,.2,1) both}
.md-rise > :nth-child(2){animation-delay:.1s}
.md-rise > :nth-child(3){animation-delay:.2s}
.md-rise > :nth-child(4){animation-delay:.3s}
.md-rise > :nth-child(n+5){animation-delay:.4s}

/* text-only heroes (About, Journal, blog posts): court lines drawn behind the title */
.md-text-hero{position:relative;overflow:hidden;isolation:isolate}
.md-text-hero .md-court{color:currentColor;opacity:.1;z-index:-1}

/* the ball badge: spins and floats in the hero corner */
.md-ballbadge{position:absolute;z-index:4;top:clamp(14px,3vw,30px);right:clamp(14px,4vw,48px);
  width:clamp(52px,7vw,92px);pointer-events:none;animation:md-float 3.2s ease-in-out infinite}
.md-ballbadge svg{display:block;width:100%;height:auto;animation:md-spin 18s linear infinite;
  filter:drop-shadow(0 14px 18px rgba(0,0,0,.4))}

/* court outline, shared by heroes and CTA boxes; lines draw themselves in */
.md-court{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.md-court rect,.md-court line{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1.8s cubic-bezier(.6,0,.2,1)}
.md-court line{transition-delay:.45s}
.md-court.md-in rect,.md-court.md-in line{stroke-dashoffset:0}
.md-courtbg{position:relative;overflow:hidden;isolation:isolate}
.md-courtbg > .md-court{z-index:-1;opacity:.13}

/* 3. scroll reveal: blocks rise in, headings wipe in like a TV graphic */
.md-rv{opacity:0;transform:translateY(26px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
.md-rv.md-in{opacity:1;transform:none}
.md-wipe{clip-path:inset(-12% 100% -12% 0);transition:clip-path .9s cubic-bezier(.7,0,.2,1)}
.md-wipe.md-in{clip-path:inset(-12% -4% -12% 0)}

/* 4. buttons: a light sweep on hover, a squash on press */
.md-shiny{position:relative;overflow:hidden}
.md-shine{position:absolute;top:0;bottom:0;left:-60%;width:40%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);transform:skewX(-20deg)}
.md-shiny:hover .md-shine{animation:md-sweep .7s ease}
.md-shiny:active{transform:scale(.96)!important}

/* 5. cards: tilt toward the pointer, photo zooms a touch */
.md-tilt{transition:transform .25s ease,box-shadow .25s ease;will-change:transform}
.md-tilt.md-tilting{transform:perspective(900px) rotateX(var(--md-rx,0deg)) rotateY(var(--md-ry,0deg)) translateY(-4px)!important;
  box-shadow:0 22px 44px -22px rgba(6,33,42,.55)}
.md-zoom img{transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.md-zoom:hover img{transform:scale(1.05)}

/* 6. the rally: a ball going back and forth over the net, just above the footer */
.md-rally{position:relative;height:120px;background:var(--md-deeper);overflow:hidden}
.md-rally::before{content:"";position:absolute;left:6%;right:6%;bottom:24px;height:2px;background:#ffffff30}
.md-rally::after{content:"";position:absolute;left:6%;right:6%;bottom:24px;height:18px;
  background:linear-gradient(90deg,#ffffff30 2px,transparent 2px) 0 0/calc(50% - 1px) 100% no-repeat,
             linear-gradient(-90deg,#ffffff30 2px,transparent 2px) 100% 0/calc(50% - 1px) 100% no-repeat}
.md-net{position:absolute;left:50%;bottom:24px;width:4px;height:46px;margin-left:-2px;
  background:repeating-linear-gradient(0deg,#ffffff66 0 3px,transparent 3px 6px);border-top:3px solid #fff}
.md-lane{position:absolute;left:12%;right:12%;bottom:26px;height:84px}
.md-lane > i{position:absolute;left:0;bottom:0;width:20px;height:20px;animation:md-x 2.8s linear infinite alternate}
.md-lane > i > b{display:block;width:20px;height:20px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#F6FF9B,#E8FF47 60%,#B8CE28);box-shadow:0 0 14px rgba(232,255,71,.5);
  animation:md-y 1.4s cubic-bezier(.2,.6,.4,1) infinite alternate}
.md-rally small{position:absolute;left:6%;top:16px;font-family:'Chivo Mono',ui-monospace,monospace;font-size:.62rem;
  letter-spacing:.16em;text-transform:uppercase;color:#ffffff59}

/* 7. mobile booking bar on pages that don't already have one */
.md-bar{display:none}
@media(max-width:760px){
  .md-bar{display:flex;position:fixed;left:12px;right:12px;bottom:12px;z-index:80;align-items:center;justify-content:space-between;gap:12px;
    background:var(--md-deeper);color:#fff;border:1px solid #ffffff1f;border-radius:16px;padding:9px 9px 9px 18px;
    box-shadow:0 14px 34px -12px rgba(0,0,0,.6);transform:translateY(140%);transition:transform .35s ease}
  .md-bar.md-show{transform:none}
  .md-bar small{display:block;font-family:'Chivo Mono',ui-monospace,monospace;font-size:.58rem;letter-spacing:.12em;text-transform:uppercase;color:var(--md-chalk)}
  .md-bar b{font-family:'Big Shoulders Display','Arial Narrow',sans-serif;font-weight:900;font-size:1.5rem;line-height:1;color:var(--md-optic)}
  .md-bar a{background:var(--md-optic);color:var(--md-deep);text-decoration:none;font-weight:700;font-size:.92rem;padding:12px 18px;border-radius:999px;white-space:nowrap}
  .md-has-bar .wa-float{display:none}
  .md-has-bar footer{padding-bottom:110px}
}

@keyframes md-zoom{from{transform:scale(1)}to{transform:scale(1.1)}}
@keyframes md-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@keyframes md-spin{to{transform:rotate(360deg)}}
@keyframes md-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@keyframes md-sweep{from{left:-60%}to{left:130%}}
@keyframes md-x{from{left:0}to{left:calc(100% - 20px)}}
@keyframes md-y{from{transform:translateY(0)}to{transform:translateY(-76px)}}

/* The owner's machine (and plenty of guests') has "reduce motion" on. Like the ball and
   ticker on the homepage, these gentle motions keep running there; the page's own
   reduce-motion rule would otherwise freeze them at their first frame. */
@media(prefers-reduced-motion:reduce){
  .md-photo-hero .hero-media img{animation-duration:26s!important;animation-iteration-count:infinite!important}
  .md-rise > *{animation-duration:.8s!important}
  .md-ballbadge{animation-duration:3.2s!important;animation-iteration-count:infinite!important}
  .md-ballbadge svg{animation-duration:18s!important;animation-iteration-count:infinite!important}
  .md-lane > i{animation-duration:2.8s!important;animation-iteration-count:infinite!important}
  .md-lane > i > b{animation-duration:1.4s!important;animation-iteration-count:infinite!important}
  .md-rv{transition-duration:.7s!important}
  .md-wipe{transition-duration:.9s!important}
  .md-court rect,.md-court line{transition-duration:1.8s!important}
  .md-shiny:hover .md-shine{animation-duration:.7s!important}
}
