/* FairwayFinda Caddie — the course-select front door.
 * MIRRORED from the operator-designed selector (production deployment 892270b3,
 * source commit 4f5f8c2 — repo not on this machine). The selector layer was
 * extracted verbatim from that build's style.css: landing tokens, gold wordmark,
 * hero crossfade, spec sheet, PLAY, the course rail. Standalone: the in-course app
 * lives behind it at caddie.html — no #app / data-screen switching on this page. */


/* Inter, self-hosted: the caddie is a PWA a golfer opens on the 12th with no signal.
   A webfont from a CDN is a webfont that is not there. Variable, latin, 47 KB. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('font/inter-latin-var.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --c90: #34d399;
  --c110: #fbbf24;
  --c130: #60a5fa;
  --glass: rgba(10, 12, 14, 0.78);
  --stroke: rgba(255, 255, 255, 0.10);
  --muted: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.35);

  /* ---- the landing's tokens, verbatim ---- */
  --ink: #020617;
  --paper: #f8fafc;
  --gold: linear-gradient(180deg, #fbe7a6 0%, #ecc66f 25%, #f6dc8a 45%, #b88c3a 70%, #f0d27a 100%);
  --brand: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* per-card accent, cycling the landing's four section accents */
.accent-sky     { --accent: #38bdf8; --accent-rgb: 56,189,248; }
.accent-amber   { --accent: #fbbf24; --accent-rgb: 251,191,36; }
.accent-emerald { --accent: #34d399; --accent-rgb: 52,211,153; }
.accent-indigo  { --accent: #818cf8; --accent-rgb: 129,140,248; }

/* the landing's eyebrow: small, uppercase, wide-tracked */
.eyebrow {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3em;
}
/* the landing's card lift */
.lift { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.hidden { display: none !important; }
button { font-family: inherit; }
.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-link { position: fixed; left: 12px; top: 8px; z-index: 40; transform: translateY(-150%); background: #fff; color: #000; padding: 13px 16px; min-height: 44px; display: flex; align-items: center; border-radius: 10px; }
.skip-link:focus { transform: translateY(0); }

#selector {
  position: fixed; inset: 0; z-index: 30;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--ink);
  font-family: var(--brand);
  --accent: #38bdf8; --accent-rgb: 56,189,248;
}

/* ---------- the hero: the course, full bleed ---------- */
.heroStack { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* two layers so a pick CROSSFADES rather than cuts */
.heroLayer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 900ms cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}
/* slow drift — the screen breathes instead of sitting still */
.heroLayer.on {
  opacity: 1;
  animation: kenburns 34s cubic-bezier(.4,0,.5,1) infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.20) translate3d(-2.2%, -1.6%, 0); }
}

/* the vignette FRAMES the course and buys the type its legibility. Cinematic, and
   load-bearing: display type over a satellite aerial is unreadable without it. */
.heroVig {
  position: absolute; inset: 0;
  background:
    radial-gradient(125% 85% at 50% 32%, rgba(2,6,23,0) 18%, rgba(2,6,23,.42) 58%, rgba(2,6,23,.86) 100%),
    linear-gradient(180deg,
      rgba(2,6,23,.78) 0%,
      rgba(2,6,23,.30) 20%,
      rgba(2,6,23,.42) 44%,
      rgba(2,6,23,.88) 72%,
      #020617 94%);
}
/* gold high-left, the course's accent low-right. FairwayFinda gold against the green
   and blue of a real aerial is the gift — take it. */
.heroWash {
  position: absolute; inset: 0;
  background:
    radial-gradient(65% 45% at 6% 2%, rgba(232,200,121,0.20), transparent 66%),
    radial-gradient(80% 55% at 96% 96%, rgba(var(--accent-rgb), 0.22), transparent 70%);
  transition: background 700ms ease;
}
.heroGrid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 85% 45% at 50% 8%, #000 20%, transparent 72%);
          mask-image: radial-gradient(ellipse 85% 45% at 50% 8%, #000 20%, transparent 72%);
}

/* ---------- the layout ---------- */
.selwrap {
  position: relative; z-index: 1;
  min-height: 100%;
  display: flex; flex-direction: column;
  max-width: 640px; margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + 22px)
    max(20px, env(safe-area-inset-right, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 20px)
    max(20px, env(safe-area-inset-left, 0px));
}

.selTop {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.sellogo { display: flex; align-items: center; gap: 10px; }
.selmark { height: 30px; width: auto; display: block; flex-shrink: 0; }
/* the landing's hero wordmark recipe: black, uppercase, tight, gold, soft halo */
.selword {
  font-weight: 900; font-size: 20px; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.035em;
  background: var(--gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 22px rgba(232,200,121,0.32));
}
.selbrow { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.seldot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18), 0 0 12px rgba(var(--accent-rgb), 0.9);
}

.selerr {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(248,113,113,.14); border: 1px solid rgba(248,113,113,.40);
  color: #fca5a5; font: 600 13px/1.45 var(--brand);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ---------- THE HERO: the course he is about to play ---------- */
/* margin-top:auto floats it to the bottom of the screen, over the aerial, with the
   rail beneath it — the console layout: picture, title, spec, PLAY. */
.selhero {
  margin-top: auto;
  padding-top: 40px;
  display: flex; flex-direction: column; align-items: flex-start;
}

.heroLoc {
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  margin-bottom: 10px;
}

/* DISPLAY TYPE. Course names are not list labels. */
.heroName {
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(38px, 12.5vw, 62px);
  letter-spacing: -0.034em; line-height: 0.90;
  color: var(--paper);
  text-shadow: 0 4px 30px rgba(0,0,0,.72), 0 1px 3px rgba(0,0,0,.5);
  margin-bottom: 18px;
  text-wrap: balance;
}

/* THE SPEC SHEET — like a car-select screen */
.heroSpec {
  display: flex; align-items: flex-start; flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 16px;
}
.spec { display: flex; flex-direction: column; gap: 3px; }
.spec b {
  font-weight: 800; font-size: 22px; line-height: 1;
  letter-spacing: -0.02em; color: var(--paper);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.spec i {
  font-style: normal;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(248,250,252,0.55);
}
/* the measured trees are OUR number. It wears the gold and it stands apart. */
.spec.gold {
  padding-left: 20px; margin-left: 2px;
  border-left: 1px solid rgba(232,200,121,0.30);
}
.spec.gold b {
  background: var(--gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(232,200,121,0.35));
  font-size: 24px;
}
.spec.gold i { color: rgba(240,210,122,0.80); }

.heroClaim {
  font-size: 13px; line-height: 1.55; font-weight: 400;
  color: rgba(248,250,252,0.72);
  max-width: 40ch; margin-bottom: 20px;
  text-shadow: 0 1px 10px rgba(0,0,0,.6);
}

/* PLAY. The gold does the work — this is the one thing on the screen he came for. */
.playBtn {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 62px;
  padding: 0 18px 0 22px;
  border: 0; border-radius: 15px; cursor: pointer;
  background: var(--gold);
  color: #1a1206;
  box-shadow: 0 12px 40px rgba(232,200,121,0.24), 0 2px 0 rgba(255,255,255,0.35) inset;
  transition: transform 180ms cubic-bezier(.2,.7,.3,1), box-shadow 180ms ease, filter 180ms ease;
}
.playBtn:hover { transform: translateY(-2px); box-shadow: 0 18px 52px rgba(232,200,121,0.34), 0 2px 0 rgba(255,255,255,0.4) inset; filter: brightness(1.04); }
.playBtn:active { transform: translateY(0) scale(.99); }
.playTxt {
  font-weight: 900; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.playSub {
  flex: 1;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(26,18,6,0.62);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.playArr { font-size: 26px; font-weight: 900; line-height: 1; }

/* the reveal: on every pick the type and the numbers LAND */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.selhero.in .heroLoc   { animation: rise 520ms  40ms cubic-bezier(.22,.7,.18,1) both; }
.selhero.in .heroName  { animation: rise 640ms  90ms cubic-bezier(.22,.7,.18,1) both; }
.selhero.in .spec      { animation: rise 520ms cubic-bezier(.22,.7,.18,1) both;
                         animation-delay: calc(200ms + var(--i, 0) * 65ms); }
.selhero.in .heroClaim { animation: rise 520ms 420ms cubic-bezier(.22,.7,.18,1) both; }
.selhero.in .playBtn   { animation: rise 520ms 480ms cubic-bezier(.22,.7,.18,1) both; }

/* ---------- THE RAIL: every course we have measured ---------- */
.selrail { margin-top: 26px; }
.raillabel {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 11px;
  color: rgba(248,250,252,0.45);
}
.selcount {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: rgba(248,250,252,0.45); font-variant-numeric: tabular-nums;
}

/* swipeable on a phone — reads far better than a grid of small cards */
.railtrack {
  display: flex; gap: 11px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0 6px;
  margin: -4px -20px -6px;            /* bleed to the screen edge: there is more to see */
  padding-left: 20px; padding-right: 20px;
}
.railtrack::-webkit-scrollbar { display: none; }

.rtile {
  position: relative; flex: 0 0 auto;
  width: 146px; height: 96px;
  padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.55);
  scroll-snap-align: center;
  color: var(--paper);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1), border-color 220ms ease, box-shadow 220ms ease;
  animation: rise 560ms cubic-bezier(.22,.7,.18,1) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}
.rimg {
  position: absolute; inset: 0;
  background-color: #0d1512;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  filter: saturate(.75) brightness(.72);
  transition: transform 420ms ease, filter 300ms ease;
}
.rscrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0) 28%, rgba(2,6,23,.88) 100%);
}
.rbody {
  position: absolute; left: 10px; right: 10px; bottom: 8px;
  display: flex; flex-direction: column; gap: 1px;
}
.rname {
  font-weight: 800; font-size: 12px; line-height: 1.15;
  text-transform: uppercase; letter-spacing: -0.006em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.rmeta {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: rgba(248,250,252,0.58);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* the selected course is LIT — its accent, its image at full strength */
.rtile.on {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.95);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.45),
              0 14px 34px rgba(0,0,0,0.55),
              0 0 30px rgba(var(--accent-rgb), 0.30);
}
.rtile.on .rimg { transform: scale(1.12); filter: saturate(1.05) brightness(1); }
.rtile.on .rmeta { color: var(--accent); }
.rtile:not(.on):hover { border-color: rgba(255,255,255,0.34); transform: translateY(-2px); }
.rtile:not(.on):hover .rimg { filter: saturate(.9) brightness(.85); }

.selempty { padding: 30px 4px; text-align: center; }
.selempty .brand { font: 800 12px/1 var(--brand); letter-spacing: .18em; margin-bottom: 10px; }
.selempty .brand.warn { color: #fca5a5; }
.selempty .msg { font: 400 14px/1.5 var(--brand); color: rgba(248,250,252,0.6); }

.selfoot {
  margin-top: 22px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  font: 400 11px/1.4 var(--brand); color: rgba(248,250,252,0.36); text-align: center;
}

/* ---------- desktop: the same screen, given room ---------- */
@media (min-width: 900px) {
  .selwrap { max-width: 1200px; padding-top: 34px; padding-bottom: 30px; }
  .selhero { max-width: 660px; padding-top: 60px; }
  .heroName { font-size: clamp(56px, 5.4vw, 88px); }
  .spec b { font-size: 26px; }
  .spec.gold b { font-size: 28px; }
  .heroClaim { font-size: 14px; }
  .playBtn { width: auto; min-width: 320px; }
  .railtrack { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .rtile { width: 190px; height: 118px; }
  .rname { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .heroLayer, .heroLayer.on { animation: none; transform: scale(1.04); }
  .selhero.in .heroLoc, .selhero.in .heroName, .selhero.in .spec,
  .selhero.in .heroClaim, .selhero.in .playBtn, .rtile { animation: none; }
  .rtile, .rimg, .playBtn { transition: none; }
}
