/* Account screens (Log in, Sign up, profile setup, password reset) and the
   legal pages. The forms keep the app's AuthLayout: Inter, soft grey fields,
   midnight selections. Around them sits the landing page's world: the deep
   blue field, drifting player cards, a rotating lime word, the lime action
   button. Colours are the app's own (theme/colors.ts, lib/sportArt.ts), the
   same values as styles.css. */

:root {
  --sheen: #96D700;
  --sheen-hover: #A6E61A;
  --brand: #003865;
  --icon-top: #0065B5;
  --icon-bottom: #003F71;
  --ink: #1F1F21;
  --muted: #6C7079;
  --faint: #A2A6AE;
  --hair: #EEEFF2;
  --wash: #F6F7F9;
  --danger: #D64430;
  --soft: #E7EEF5;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sheen); outline-offset: 2px; }

/* ── The stage: art and form ─────────────────────────────────────────── */
body[data-page] { background: var(--icon-bottom); }
.stage { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 40vw); }

.art {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--icon-top) 0%, transparent 60%),
    linear-gradient(160deg, #00539A 0%, var(--icon-bottom) 70%, #002845 100%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(28px, 4vw, 56px);
  /* Stays on screen while a long form (Sign up) scrolls beside it. */
  position: sticky; top: 0; height: 100vh; height: 100dvh;
}
/* Fades the card wall into the field so the words always read. */
.art::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(0,40,69,.96) 0%, rgba(0,40,69,.72) 34%, rgba(0,40,69,0) 64%),
    linear-gradient(90deg, rgba(0,63,113,.55) 0%, rgba(0,63,113,0) 55%);
}
.art-logo { position: absolute; top: clamp(24px, 3vw, 40px); left: clamp(28px, 4vw, 56px); z-index: 2; }
.art-logo img { width: 132px; height: auto; display: block; }
.art-copy { position: relative; z-index: 1; max-width: 720px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sheen);
}
.eyebrow::before { content: ""; width: 10px; height: 12px; background: var(--sheen); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.art-title { margin: 0; font-weight: 900; letter-spacing: -0.055em; line-height: .92; }
.art-title > span:first-child { display: block; font-size: clamp(44px, 5.6vw, 88px); }
.art-word { display: flex; align-items: center; height: 1.04em; overflow: hidden; font-size: clamp(52px, 7vw, 112px); color: var(--sheen); }
.word { display: inline-block; transition: transform .45s var(--ease), opacity .45s; }
.word.out { transform: translateY(-80%); opacity: 0; }
.word.in { transform: translateY(80%); opacity: 0; transition: none; }
.art-lede { margin: 20px 0 0; max-width: 30em; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.5; color: rgba(255,255,255,.8); }
.art-note { position: relative; z-index: 1; margin: 28px 0 0; font-size: 12px; color: rgba(255,255,255,.5); }

/* The wall: three tilted columns drifting in opposite directions. */
.aw {
  position: absolute; z-index: -2; top: -30%; right: -12%; width: 92%; height: 170%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px);
  transform: rotate(-14deg); pointer-events: none;
}
.aw-col { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 28px); animation: drift 90s linear infinite; will-change: transform; }
.aw-col:nth-child(2) { animation-direction: reverse; animation-duration: 104s; margin-top: -140px; }
.aw-col:nth-child(3) { animation-duration: 118s; margin-top: -60px; }
.aw-col .pc { box-shadow: 0 24px 48px -20px rgba(0,0,0,.55); }
.aw-col:nth-child(1) .pc { opacity: .5; filter: blur(1.5px) saturate(.85); }
.aw-col:nth-child(3) .pc { opacity: .72; }
@keyframes drift { to { transform: translateY(-50%); } }

/* ── The form panel ───────────────────────────────────────────────────── */
.stage .auth {
  position: relative; z-index: 1; background: #fff;
  border-radius: 32px 0 0 32px; margin: 0 0 0 -32px; justify-self: stretch;
  box-shadow: -24px 0 60px -30px rgba(0,20,40,.6);
  padding: clamp(32px, 6vh, 72px) clamp(28px, 4vw, 64px) 64px;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
.stage .auth > * { width: 100%; max-width: 400px; margin-left: auto; margin-right: auto; }
.auth {
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.stage .auth { max-width: none; width: auto; }
/* The logo lives in the art; the app's dark logo stays for the plain pages. */
.stage .auth .brand { display: none; }
.stage .auth a:has(> .brand) { display: none; }

.back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: 0 0 18px;
  border-radius: 50%; background: var(--wash); color: var(--ink);
  font-size: 22px; font-weight: 600; line-height: 1;
  transition: background-color .2s;
}
.stage .auth > .back { width: 40px; margin-left: max(0px, calc(50% - 200px)); }
.back:hover { background: var(--hair); text-decoration: none; }
.brand { width: 168px; height: auto; margin: 8px 0 28px; }
h1 { margin: 0; font-size: clamp(28px, 2.4vw, 34px); letter-spacing: -0.035em; line-height: 1.12; font-weight: 800; }
.sub { margin: 8px 0 24px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.err {
  display: flex; gap: 8px; align-items: flex-start;
  background: #FDECEA; color: var(--danger);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 18px;
  font-size: 13px; line-height: 1.4; font-weight: 500;
}
label { display: block; font-size: 12.5px; font-weight: 700; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.row { position: relative; }
input, select {
  width: 100%; background: var(--wash); border: 0; border-radius: 14px;
  padding: 14px 16px; font-size: 15px; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow .2s, background-color .2s;
}
input:hover, select:hover { background: #F0F2F5; }
input:focus, select:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--brand); }
input::placeholder { color: var(--faint); }
.reveal {
  position: absolute; right: 8px; top: 0; bottom: 0;
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 0 8px;
}
.bday { display: grid; grid-template-columns: 1.4fr .7fr .9fr; gap: 8px; }
.checks { margin: -6px 0 16px; padding: 0; list-style: none; }
.checks li { font-size: 12.5px; color: var(--faint); margin: 4px 0; }
.checks li.on { color: #3D6B00; }
.mismatch { color: var(--danger); font-size: 12.5px; margin: -8px 0 12px; }
.robot { height: 70px; margin: 4px 0 8px; }
.robot iframe { width: 100%; height: 70px; border: 0; }
.wait { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }

/* The action, in the landing page's lime: the one thing to press. */
.go {
  width: 100%; min-height: 54px; margin-top: 8px; border: 0; border-radius: 16px;
  background: var(--sheen); color: var(--ink); font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
  padding: 15px 16px; cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(111,160,0,.9);
  transition: background-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.go:hover { background: var(--sheen-hover); box-shadow: 0 16px 28px -14px rgba(111,160,0,.95); }
.go:active { transform: translateY(1px); }
.go:disabled { opacity: .45; cursor: default; box-shadow: none; }
.foot { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); font-weight: 400; }
.legal { text-align: center; margin-top: 16px; font-size: 12.5px; line-height: 1.45; color: var(--muted); font-weight: 400; }
.forgot { display: block; margin: -4px 0 16px; font-size: 13.5px; }

.step {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); background: rgba(150,215,0,.22); border-radius: 999px; padding: 7px 12px;
}
.step::before { content: ""; width: 8px; height: 10px; background: var(--brand); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.search { margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cell {
  border: 0; background: var(--wash); border-radius: 14px; padding: 12px 8px;
  min-height: 72px; cursor: pointer; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.25;
  transition: background-color .15s, transform .15s var(--ease);
}
.cell:hover { background: var(--hair); }
.cell:active { transform: scale(.97); }
.cell.on { background: var(--brand); color: #fff; box-shadow: inset 0 -3px 0 var(--sheen); }
.bar { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.bar .go { margin-top: 0; }
.linkish { border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; padding: 12px; }
.linkish:hover { color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--hair); background: #fff; border-radius: 999px;
  padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: border-color .15s, background-color .15s;
}
.pill:hover { border-color: #D5D8DE; }
.pill.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--soft); color: var(--brand); font-weight: 700; font-size: 12.5px;
  border-radius: 999px; padding: 8px 14px; margin-bottom: 16px;
}
.card {
  display: block; width: 100%; text-align: left; border: 1px solid var(--hair);
  background: #fff; border-radius: 16px; padding: 16px; cursor: pointer; margin-bottom: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: #D5D8DE; box-shadow: 0 8px 20px -14px rgba(0,30,60,.35); }
.card b { display: block; font-size: 17px; margin-bottom: 6px; }
.card span { color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 400; }
.club {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--hair);
}
.club b { display: block; }
.club small { color: var(--muted); }
.join {
  border: 0; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.join.on { background: var(--wash); color: var(--ink); }
.empty { color: var(--muted); font-size: 14px; line-height: 1.45; }
.dialog {
  border: 0; border-radius: 20px; padding: 22px; max-width: 360px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.dialog::backdrop { background: rgba(0,25,45,.6); }
.dialog p { margin: 0 0 16px; line-height: 1.45; }
.legal-page { max-width: 680px; margin: 0 auto; padding: 32px 24px 80px; }
.legal-page h1 { margin-bottom: 12px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-page p { color: #3a3d44; line-height: 1.55; margin: 0 0 12px; }

/* ── Phones and narrow windows: the art on top, the form as a sheet ─── */
@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .art { position: relative; height: auto; min-height: clamp(300px, 46vh, 420px); padding: 84px 20px 52px; }
  .art::after {
    background: linear-gradient(0deg, rgba(0,40,69,.95) 0%, rgba(0,40,69,.7) 40%, rgba(0,40,69,.1) 80%);
  }
  .art-logo { left: 20px; top: 22px; }
  .art-logo img { width: 112px; }
  .art-title > span:first-child { font-size: clamp(34px, 10vw, 52px); }
  .art-word { font-size: clamp(42px, 13vw, 64px); }
  .art-lede { margin-top: 12px; font-size: 14.5px; max-width: 34em; }
  .art-note { margin: 10px 0 0; font-size: 11px; }
  .aw { top: -60%; right: -45%; width: 150%; height: 220%; }
  .stage .auth {
    border-radius: 28px 28px 0 0; margin: -28px 0 0;
    box-shadow: 0 -18px 40px -24px rgba(0,20,40,.55);
    padding: 34px 20px 56px; justify-content: flex-start;
  }
  /* The landing page sheet's lime grab bar. */
  .stage .auth::before {
    content: ""; position: absolute; top: 12px; left: 50%; width: 44px; height: 5px;
    margin-left: -22px; border-radius: 99px; background: var(--sheen);
  }
  .stage .auth > .back { margin-left: max(0px, calc(50% - 200px)); }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .aw-col { animation: none; }
  .word, .go, .cell, input, select { transition: none; }
}

/* ── Player card, as in styles.css (components/PlayerCard.tsx) ──────── */
.pc {
  --a: #0B3A6B; --b: #062A4A; --c: #04203A;
  container-type: inline-size; position: relative; overflow: hidden; flex: none;
  aspect-ratio: 1.62; border-radius: 5.7% / 9.3%; padding: 4.6%;
  background: linear-gradient(135deg, var(--a), var(--b) 52%, var(--c)); color: #fff;
  display: flex; flex-direction: column;
}
.pc[data-fam="court"] { --a: #7A2E0E; --b: #4A1D0A; --c: #2B1206; }
.pc[data-fam="field"] { --a: #0E5A36; --b: #0A3D25; --c: #062717; }
.pc[data-fam="cue"] { --a: #1E4D2B; --b: #123520; --c: #0A2014; }
.pc[data-fam="water"] { --a: #0A5A7A; --b: #073E57; --c: #042A3B; }
.pc[data-fam="endurance"] { --a: #7A5A0E; --b: #4F3A08; --c: #2E2205; }
.pc[data-fam="combat"] { --a: #6B0F1A; --b: #470A12; --c: #2A060B; }
.pc[data-fam="studio"] { --a: #5B2A7A; --b: #3C1C52; --c: #241031; }
.pc[data-fam="outdoor"] { --a: #3F5A1E; --b: #2A3D14; --c: #18240B; }
.pc[data-fam="mind"] { --a: #2B2F6B; --b: #1D2049; --c: #11132B; }
.pc .arc { position: absolute; border-radius: 50%; border: .6cqw solid rgba(255,255,255,.07); pointer-events: none; }
.pc .arc1 { width: 68.6cqw; height: 68.6cqw; right: -20cqw; top: -11.4cqw; }
.pc .arc2 { width: 42.9cqw; height: 42.9cqw; right: -8.6cqw; top: 0; border-color: rgba(255,255,255,.06); }
.pc .wm { position: absolute; width: 45cqw; height: 45cqw; right: -1.7cqw; bottom: -5.1cqw; fill: rgba(255,255,255,.11); }
.pc-top { position: relative; display: flex; align-items: center; gap: 3.4cqw; }
.pc .av {
  width: 13.1cqw; height: 13.1cqw; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: .43cqw solid rgba(255,255,255,.45); background: rgba(255,255,255,.1);
  font-size: 5cqw; font-weight: 700; color: #fff;
}
.pc .who { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pc .who b { font-size: 4.6cqw; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .who small { font-size: 3.4cqw; color: rgba(255,255,255,.78); }
.pc .tier { display: inline-flex; align-items: center; gap: .9cqw; padding: 1.15cqw 2.6cqw; border-radius: 99px; background: #fff; color: var(--brand); font-size: 2.9cqw; font-weight: 600; white-space: nowrap; }
.pc .tier svg { width: 3.4cqw; height: 3.4cqw; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pc-sport { position: relative; display: flex; align-items: center; gap: 2cqw; margin: 3.4cqw 0 0; }
.pc .sp { font-size: 3.15cqw; font-weight: 700; letter-spacing: .11em; color: var(--sheen); }
.pc-sport i { width: .9cqw; height: .9cqw; border-radius: 50%; background: rgba(255,255,255,.55); }
.pc .sk { font-size: 3.4cqw; font-weight: 500; }
.pc hr { position: relative; border: 0; height: 1px; background: rgba(255,255,255,.16); margin: 3.4cqw 0; }
.pc-stats { position: relative; display: flex; }
.pc-stat { flex: 1; display: flex; flex-direction: column; line-height: 1.2; margin: 0; }
.pc-stat b { font-size: 6.3cqw; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.pc-stat:first-child b { color: var(--sheen); }
.pc-stat small { font-size: 3.15cqw; color: rgba(255,255,255,.78); }
.pc .flip-btn { position: absolute; right: 2.4cqw; bottom: 2.4cqw; width: 12cqw; height: 12cqw; display: grid; place-items: center; color: rgba(255,255,255,.78); }
.pc .flip-btn svg { width: 5.7cqw; height: 5.7cqw; fill: currentColor; }
