/* FindaFan waitlist. The app's language (FINDAFAN.md §5, §5.1a): shell white and harsh black, Space Grotesk for
   words and IBM Plex Mono for numbers, actions are pills, containers take 16px corners, marks are circles, one hard
   shadow per screen (the main button). Team colours are the page's accent, the way they are on the app's Home. */
:root {
  --shell: #efeee9; --ink: #0a0a0a; --ink-muted: #4a4a46; --paper: #fbfaf6;
  --team: #002C5F; --team2: #A2AAAD; --on-team: #fff;
  --display: 'Space Grotesk', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--shell); color: var(--ink); font-family: var(--display); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: var(--shell); padding: 12px 16px; border-radius: 999px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.meta { font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }

/* the monogram stands in for a logo until there is one */
.mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--shell); text-decoration: none; flex: none; }
.mark span { font-weight: 700; font-size: 18px; letter-spacing: -0.08em; margin-left: -0.08em; }
.mark-lg { width: 72px; height: 72px; } .mark-lg span { font-size: 30px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--shell); font: 700 17px/1 var(--display); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--team); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 400ms var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--team); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--team); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; box-shadow: none; }
.btn-sm:hover { transform: none; box-shadow: none; background: var(--team); border-color: var(--team); color: var(--on-team); }
.btn-big { width: 100%; min-height: 60px; font-size: 19px; }
/* the quiet button: an outline, for the header's city and the footer's link */
.btn-line, .btn-line:hover { background: none; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter);
  background: var(--shell); }
.where { gap: 4px; padding: 0 10px 0 12px; margin-right: auto; }
.where svg { width: 18px; height: 18px; }
.where .where-chev { width: 16px; height: 16px; stroke-width: 3; }

/* hero: the sentence with the picker, and the map that draws the distance home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: 'copy map' 'cta map'; align-items: center; gap: 24px 48px;
  padding: 40px var(--gutter) 72px; min-height: min(88svh, 820px); }
.hero-copy { grid-area: copy; align-self: end; }
.hero-cta { grid-area: cta; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
h1 { font-size: clamp(48px, 7.4vw, 120px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 700; text-wrap: balance; }
.pick-line { margin-top: 32px; font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; line-height: 1.5; letter-spacing: -0.02em; }
.pick-line > span { margin-right: 8px; }
.nowrap { white-space: nowrap; }

/* league first: four buttons above the sentence */
.leagues { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.leagues button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 5px; border-radius: 999px; border: 2px solid var(--ink); background: none; color: var(--ink);
  font: 700 16px/1 var(--display); cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.leagues button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.leagues button[aria-checked='true'] { background: var(--ink); color: var(--shell); }
.leagues + .pick-line { margin-top: 16px; }
.sport { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--ink); flex: none; }
.sport svg { width: 22px; height: 22px; }
.sport-mlb { background: #9fd98a; } .sport-nba { background: #ffa35c; } .sport-nfl { background: #dfa77c; } .sport-pll { background: #ffd84d; }
.leagues button[aria-checked='true'] .sport { box-shadow: 0 0 0 2px var(--shell); }

/* the city sits in the sentence as a quiet underlined choice, so the team stays the hero */
.city-pick { position: relative; display: inline-flex; align-items: baseline; border-bottom: 3px solid var(--ink); cursor: pointer; }
.city-pick select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; padding: 0 26px 0 0; cursor: pointer; }
.city-pick select:focus { outline: none; }
/* when a button elsewhere jumps to one of the two dropdowns, it lands clear of the sticky header */
#city, #team { scroll-margin: 120px 0; }
.city-pick:has(select:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.city-pick svg { position: absolute; right: 0; top: 50%; translate: 0 -40%; width: 22px; height: 22px; stroke-width: 3; pointer-events: none; }
.soon { margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--ink); }

/* the dropdown, dressed as a team pill: the real select sits on top so tapping opens the phone's own picker */
.picker { position: relative; display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; max-width: 100%;
  min-height: 60px; padding: 6px 48px 6px 8px; border-radius: 999px; border: 2px solid var(--ink); background: var(--team); color: var(--on-team);
  box-shadow: 4px 4px 0 var(--ink); transition: background-color 400ms var(--ease), color 400ms var(--ease); }
/* keyboard focus only: a tap (or the phone's own picker closing) shouldn't leave a ring behind */
.picker:has(select:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.picker select { min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: 700 clamp(22px, 2.4vw, 32px)/1.1 var(--display);
  letter-spacing: -0.02em; padding: 0; max-width: 100%; text-overflow: ellipsis; cursor: pointer; }
.picker select:focus { outline: none; }
.picker select option, .picker select optgroup { color: var(--ink); background: var(--paper); font-size: 16px; }
.picker-chev { position: absolute; right: 16px; width: 22px; height: 22px; pointer-events: none; stroke-width: 3; }
.picker-logo, .pin-dot { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--paper);
  color: var(--c1); font: 700 13px/1 var(--display); overflow: hidden; }
.picker-logo img, .pin-dot img { width: 72%; height: 72%; object-fit: contain; }

.map { grid-area: map; margin: 0; }
.map-box { position: relative; aspect-ratio: 960 / 600; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-nation { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.map-borders { fill: none; stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1; }
.map-arc { fill: none; stroke: var(--team); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1100ms var(--ease), stroke 400ms var(--ease); }
/* --r is the dot's radius: every offset below hangs the pin by its dot's centre, whatever size the dot is */
.pin { --r: 22px; position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-50%, calc(-1 * var(--r))); transition: left 600ms var(--ease), top 600ms var(--ease); }
.pin-you { --r: 10px; }
.pin .pin-label { text-align: center; white-space: nowrap; }
/* low on the map (the Gulf, Florida), the label goes above the dot so it stays on the map */
.pin.up { flex-direction: column-reverse; transform: translate(-50%, calc(-100% + var(--r))); }
.pin.up.edge-l { transform: translate(calc(-1 * var(--r)), calc(-100% + var(--r))); } .pin.up.edge-r { transform: translate(calc(-100% + var(--r)), calc(-100% + var(--r))); }
/* labels sit under their dots, so two cities at the same height never collide; near an edge they tuck inward */
.pin.edge-l { align-items: flex-start; transform: translate(calc(-1 * var(--r)), calc(-1 * var(--r))); } .pin.edge-l .pin-label { text-align: left; }
.pin.edge-r { align-items: flex-end; transform: translate(calc(-100% + var(--r)), calc(-1 * var(--r))); } .pin.edge-r .pin-label { text-align: right; }
.pin-dot { border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--team); }
.pin-you .pin-dot { width: 20px; height: 20px; background: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 18%, transparent); }
/* solid tags like the app's own map labels: the map's lines never show through (Daniel, 23 Nov: "hard to read with the gray background") */
.pin-label { display: grid; line-height: 1.15; padding: 5px 9px 6px; border-radius: 10px; background: var(--ink); color: var(--shell); }
.pin-label b { font-size: 15px; }
.pin-label span { font-family: var(--mono); font-size: 12px; color: #d7d6d0; }
.pin-home .pin-label { border: 2px solid var(--ink); }
.pin-home .pin-label span { color: inherit; } /* full strength: a dimmed second line would drop below 4.5:1 on some teams */
.map-box.swap .pin-home .pin-dot { animation: drop 500ms var(--ease); }
@keyframes drop { from { translate: 0 -14px; opacity: 0; } }
.map figcaption { margin-top: 36px; display: grid; gap: 4px; }
.miles { font-size: clamp(26px, 3vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.miles [data-miles] { font-family: var(--mono); font-weight: 500; letter-spacing: -0.04em; }
.near { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink-muted); font-weight: 500; }

/* game day, far from home */
.moments { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.moment { padding: 28px; border-radius: 16px; background: var(--ink); color: var(--shell); display: grid; gap: 12px; align-content: start; min-height: 220px;
  border-bottom: 8px solid var(--team); transition: border-color 400ms var(--ease); }
.moment h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.02; }
.moment p { font-size: 18px; line-height: 1.4; color: #c9c8c2; }
.moment [data-miles] { font-family: var(--mono); font-weight: 500; }
/* with no team picked the figure is words ("hundreds of"), so it reads in the heading's own type */
.moment [data-miles].words, .miles [data-miles].words { font-family: inherit; font-weight: inherit; letter-spacing: inherit; }

/* how it works */
.away, .how, .after, .why { padding: 96px var(--gutter) 0; }
.sec-h { font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.035em; line-height: 1; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.step { background: var(--paper); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.step-n { font: 500 15px/1 var(--mono); color: var(--ink-muted); }
.step h3 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.05; margin-top: 8px; }
.step > p:not(.step-n) { font-size: 17px; line-height: 1.4; color: var(--ink-muted); }
@keyframes slap { 30% { rotate: -18deg; } 60% { rotate: 6deg; } }

/* each step leads with the app: a panel in the team's colour, the screen cropped to the step's moment, and that
   moment's piece of UI pulled out larger on top of it */
.shots-note { margin-top: 12px; }
.step { gap: 8px; }
.panel { position: relative; height: 300px; margin: -12px -12px 16px; border-radius: 12px; background: var(--team); overflow: hidden;
  transition: background-color 400ms var(--ease); }
/* capped, so on a wide card the phone doesn't grow until the part the step is about falls off the panel */
.panel-phone, .stage { position: absolute; left: 50%; top: 28px; width: min(64%, 224px); translate: -50% 0; }
.panel-phone { height: auto; border: 3px solid var(--ink); border-radius: 26px; background: var(--paper); }
.stage .panel-phone { position: static; display: block; width: 100%; translate: none; }
.pull { position: absolute; left: 50%; translate: -50% 0; height: auto; filter: drop-shadow(0 10px 18px rgb(0 0 0 / .28)); }
.pull-loc { width: 90%; bottom: 34px; border-radius: 16px; }
/* centred on the Central pill's own centre in the screen (47.4% across, 79% down), about three times its size */
.pull-pill { left: 47.4%; top: 79%; width: 68%; translate: -50% -50%; }
.panel-card { display: grid; place-items: center; }
.pull-fan { position: static; translate: none; width: 72%; }
.panel-sched { height: 240px; margin: 8px 0 0; }
.pull-sched { position: static; translate: none; width: 78%; }

/* after the high-five */
/* the first one has the picture, so it gets the full row with the words beside it; the other two share the next row */
.afters { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 48px; grid-template-columns: 1fr 1fr; }
.afters li, .after-copy { display: grid; gap: 10px; align-content: start; }
.afters .after-lead { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: center; }
.after-lead .panel-sched { margin: 0; }
.pull-sched { max-width: 400px; }
.afters h3 { font-size: 26px; letter-spacing: -0.03em; line-height: 1.05; }
.afters p { font-size: 17px; line-height: 1.45; color: var(--ink-muted); }

/* why it exists */
.why { max-width: 900px; padding-bottom: 0; }
.why > p:not(.meta) { margin-top: 24px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; font-weight: 500; letter-spacing: -0.02em; }
.why .meta { margin-top: 16px; }

/* the waitlist, in the picked team's colours */
.join { padding: 96px var(--gutter) 96px; }
.join-card { max-width: 860px; margin: 0 auto; background: var(--team); color: var(--on-team); border-radius: 16px; border-bottom: 10px solid var(--team2);
  padding: clamp(24px, 5vw, 56px); transition: background-color 400ms var(--ease), color 400ms var(--ease), border-color 400ms var(--ease); }
.join-h { font-size: clamp(36px, 6vw, 76px); line-height: 0.95; letter-spacing: -0.04em; }
.fields { margin-top: 32px; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 15px; }
.field-wide { grid-column: 1 / -1; }
.field select, .field input { appearance: none; -webkit-appearance: none; width: 100%; min-height: 56px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); font: 500 17px var(--display); }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px; }
/* a field at fault: a ring in the card's text colour (it clears the team colour on every team) and its message below */
.field [aria-invalid='true'] { box-shadow: 0 0 0 3px var(--on-team); }
.field-err { font-size: 15px; font-weight: 700; } .field-err:empty { display: none; }
.join :focus-visible { outline-color: var(--on-team); }
.field [aria-invalid='true']:focus-visible { outline-offset: 5px; }
.fields:has(#town-field[hidden]) #city-field { grid-column: 1 / -1; }
.err { margin-top: 10px; font-weight: 700; } .err:empty { display: none; }
.closed { margin-top: 24px; font-size: 20px; font-weight: 500; }
.join .btn-big { margin-top: 28px; background: var(--ink); color: var(--shell); box-shadow: 4px 4px 0 var(--team2); }
.join .btn-big:hover { box-shadow: 6px 6px 0 var(--team2); }
.join .btn-big:active { box-shadow: 1px 1px 0 var(--team2); }
.fine { margin-top: 14px; font-size: 14px; }
.done { text-align: left; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; outline: none; }
.done p { font-size: 20px; }
.done .btn { background: var(--shell); color: var(--ink); border-color: var(--shell); box-shadow: 4px 4px 0 var(--team2); }
.done-hand svg { width: 96px; height: 96px; padding: 20px; border-radius: 50%; background: var(--shell); color: var(--ink); animation: slap 700ms var(--ease) 150ms; }

/* footer */
.foot { padding: 64px var(--gutter) 80px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: 'copy' 'map' 'cta'; min-height: 0; gap: 32px; padding-top: 24px; }
}
@media (max-width: 640px) {
  /* on a phone the sentence sits above a full-width button, and the whole button opens the picker */
  /* the order follows the choice: where you live, which league, which team */
  .hero-copy { display: flex; flex-direction: column; }
  .pick-line { display: contents; line-height: 1.3; }
  .pick-line > span { order: 1; align-self: flex-start; margin: 4px 0 0; }
  .pick-line > span:first-child { margin-top: 28px; }
  .leagues, .leagues + .pick-line { order: 2; margin-top: 16px; }
  .pick-line .picker { order: 3; margin-top: 12px; }
  .picker { display: flex; width: 100%; min-height: 60px; padding: 0; }
  .picker select { position: absolute; inset: 0; width: 100% !important; max-width: none; height: 100%; padding: 0 52px 0 64px; border-radius: 999px; font-size: 22px; }
  .picker-logo { position: relative; z-index: 1; margin-left: 8px; width: 42px; height: 42px; pointer-events: none; }
  .picker-logo[hidden] + select { padding-left: 22px; }
  .picker-chev { right: 20px; }
  .pin-dot { width: 34px; height: 34px; }
  .pin:not(.pin-you) { --r: 17px; }
  .moment { min-height: 0; }
  .afters, .afters .after-lead { grid-template-columns: 1fr; gap: 32px; }
  .afters .after-lead { gap: 16px; }
  .pin-label b { font-size: 13px; } .pin-label span { font-size: 11px; }
  .away, .how, .after, .why { padding-top: 72px; }
  .leagues { gap: 6px; display: grid; grid-template-columns: repeat(4, 1fr); }
  .leagues button { padding: 0 8px 0 4px; gap: 5px; font-size: 15px; justify-content: flex-start; }
  .sport { width: 28px; height: 28px; } .sport svg { width: 19px; height: 19px; }
  .fields { grid-template-columns: 1fr; }
  /* the way to the form stays in reach; the city is in the sentence right below */
  .top .where { display: none; }
  .top .btn-sm:not(.where) { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ruler { position: absolute; left: -9999px; top: 0; white-space: pre; visibility: hidden; }

/* touch screens: the phone's own picker is the feedback, so no ring around the button after a tap (iOS counts a tapped
   select as keyboard focus). Keyboards on desktop still get the ring. */
@media (hover: none) {
  .picker:has(select:focus-visible), .city-pick:has(select:focus-visible) { outline: none; }
}
