/* Jax Sportify · Tournament registration
   Restrained, neutral canvas; brand teal reserved for the primary action and selection. */

:root {
  --text: #222222;
  --muted: #6a6a6a;
  --line: #ebebeb;
  --line-2: #dddddd;
  --field: #b0b0b0;
  --soft: #f7f7f7;
  --bg: #ffffff;
  --teal: #00AAAD;
  --teal-d: #008b8e;
  --teal-dd: #00777a;
  --teal-50: #f0fafa;
  --err: #c13515;
  --err-bg: #fff8f6;
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ── Top bar ─────────────────────────────────────────── */
.top { border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; height: 76px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.top img { height: 38px; width: auto; display: block; }
.top a.help { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; padding: 10px 14px; border-radius: 999px; transition: background .15s; }
.top a.help:hover { background: var(--soft); }

/* ── Page ────────────────────────────────────────────── */
.page { max-width: 1120px; margin: 0 auto; padding: 48px 24px 120px; }
.intro { margin-bottom: 40px; }
.eyebrow { margin: 0 0 10px; font: 600 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dd); }
h1 { margin: 0; font: 700 clamp(28px, 4.2vw, 40px)/1.12 var(--head); letter-spacing: -.02em; }
.intro .sub { margin: 10px 0 0; color: var(--muted); font-size: 17px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main side" "cta side"; column-gap: 88px; align-items: start; }
.main { grid-area: main; min-width: 0; }
.side { grid-area: side; position: sticky; top: 32px; }
.cta-area { grid-area: cta; padding-top: 32px; }
@media (max-width: 1000px) {
  .page { padding-top: 32px; }
  .intro { margin-bottom: 24px; }
  .grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "cta"; }
  .side { position: static; margin-top: 32px; }
}

/* ── Blocks ──────────────────────────────────────────── */
.block { padding: 32px 0; border-bottom: 1px solid var(--line); }
.block:first-child { padding-top: 0; }
.block:last-child { border-bottom: 0; }
h2 { margin: 0 0 18px; font: 600 22px/1.25 var(--head); letter-spacing: -.01em; }
.help { margin: -10px 0 18px; color: var(--muted); font-size: 15px; }
.day { margin: 22px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.day:first-of-type { margin-top: 0; }

/* ── Grouped inputs (one rounded block, hairline dividers, floating labels) ── */
.ig { border: 1px solid var(--field); border-radius: 12px; background: #fff; }
.ig-row { display: flex; }
.ig-row + .ig-row { border-top: 1px solid var(--field); }
.ig-row.two > .cell + .cell { border-left: 1px solid var(--field); }
.cell { position: relative; flex: 1; min-width: 0; transition: background .15s; }
.ig-row:first-child .cell:first-child { border-top-left-radius: 11px; }
.ig-row:first-child .cell:last-child { border-top-right-radius: 11px; }
.ig-row:last-child .cell:first-child { border-bottom-left-radius: 11px; }
.ig-row:last-child .cell:last-child { border-bottom-right-radius: 11px; }
.cell input { display: block; width: 100%; height: 58px; padding: 25px 14px 7px; border: 0; background: transparent; border-radius: inherit;
  font: 400 16px/1 var(--body); color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
.cell label { position: absolute; left: 14px; top: 19px; font-size: 16px; color: var(--muted); pointer-events: none; transform-origin: 0 0; transition: transform .16s var(--ease), color .16s; }
.cell input:focus + label, .cell input:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.75); }
.cell:focus-within { box-shadow: 0 0 0 2px var(--text); border-radius: 8px; z-index: 1; }
.cell.error { background: var(--err-bg); box-shadow: inset 0 0 0 1.5px var(--err); border-radius: 8px; }
.cell.error label { color: var(--err); }
.cell.error:focus-within { box-shadow: 0 0 0 2px var(--err); }
@media (max-width: 560px) {
  .ig-row.two { flex-direction: column; }
  .ig-row.two > .cell + .cell { border-left: 0; border-top: 1px solid var(--field); }
  .ig-row.two .cell:first-child { border-top-right-radius: 11px; }
  .ig-row.two .cell:last-child { border-top-left-radius: 0; border-top-right-radius: 0; }
}

.errs { margin: 0; padding: 0; list-style: none; }
.errs li, .err { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--err); font-size: 14px; font-weight: 500; }
.errs svg, .err svg { flex: none; width: 16px; height: 16px; }
.err { display: none; } .err.show { display: flex; }

/* ── Checkbox line ─────────────────────────────────── */
.check { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 32px; cursor: pointer; font-size: 15px; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check input:checked ~ .ck { background: var(--teal-d); border-color: var(--teal-d); }
.check input:checked ~ .ck svg { opacity: 1; transform: none; }
.check input:focus-visible ~ .ck { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.cell input:disabled { color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; }
.cell:has(input:disabled) { background: var(--soft); }
.note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* ── Selectable lists (radio + checkbox rows) ────────── */
.list { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; }
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 16px; cursor: pointer; transition: background .15s; }
.row + .row, .list > .reveal { border-top: 1px solid var(--line); }
.row:hover { background: var(--soft); }
.row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.row .t { flex: 1; font-weight: 500; }
.row .meta { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.row:has(input:checked) { background: var(--teal-50); }
.row:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--text); }
.rd { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--field); background: #fff; transition: border .18s var(--ease); }
.row input:checked ~ .rd { border: 7px solid var(--teal-d); }
.ck { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--field); display: grid; place-items: center; background: #fff; transition: background .15s, border-color .15s; }
.ck svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.6); transition: .18s var(--ease); }
.row input:checked ~ .ck { background: var(--teal-d); border-color: var(--teal-d); }
.row input:checked ~ .ck svg { opacity: 1; transform: none; }

/* ── Option buttons (division, membership) ─────────── */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choices.two { grid-template-columns: repeat(2, 1fr); max-width: 400px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; height: 54px; padding: 0 8px; border: 1px solid var(--field); border-radius: 12px; background: #fff;
  font-weight: 600; font-size: 15px; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s, color .15s; }
.choice:hover span { border-color: var(--text); }
.choice input:checked + span { border-color: var(--teal-d); box-shadow: inset 0 0 0 1px var(--teal-d); background: var(--teal-50); color: var(--teal-dd); }
.choice input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.label-sm { margin: 24px 0 10px; font-size: 15px; font-weight: 600; }

/* ── Reveal ──────────────────────────────────────────── */
.reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s var(--ease), opacity .25s; }
.reveal.open { grid-template-rows: 1fr; opacity: 1; }
.reveal > div { overflow: hidden; }
.reveal .pad { padding: 14px 16px 16px; }
.reveal .ig { margin-top: 2px; }
.list > .reveal:not(.open) { border-top-color: transparent; }
.reveal.below > div > .ig { margin-top: 14px; }

/* ── Price card ──────────────────────────────────────── */
.card { border: 1px solid var(--line-2); border-radius: 16px; padding: 24px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.event { display: flex; align-items: center; gap: 16px; }
.thumb { flex: none; width: 104px; height: 88px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, #00b8bb 0%, #008b8e 60%, #006a6d 100%); }
.thumb img { width: 76%; height: auto; }
.ev-t { font: 600 15px/1.35 var(--body); }
.ev-s { margin-top: 4px; color: var(--muted); font-size: 14px; }
.card hr { border: 0; border-top: 1px solid var(--line-2); margin: 22px 0; }
.card h3 { margin: 0 0 14px; font: 600 20px/1.2 var(--head); letter-spacing: -.01em; }
.line { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 16px; }
.line .sub { display: block; font-size: 14px; color: var(--muted); }
.line .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { margin: 0; color: var(--muted); font-size: 15px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 16px; }
.total .amt { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ── Primary action ──────────────────────────────────── */
.cta { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, var(--teal-d) 0%, var(--teal-dd) 100%); color: #fff; font: 600 17px/1 var(--body); letter-spacing: .005em;
  transition: transform .1s, filter .15s, opacity .15s; -webkit-tap-highlight-color: transparent; }
.cta:hover:not(:disabled) { filter: brightness(1.06); }
.cta:active:not(:disabled) { transform: scale(.99); }
.cta:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.cta:disabled { opacity: .7; cursor: default; }
.cta .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.cta.busy .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.fine svg { width: 14px; height: 14px; }

/* ── Mobile action bar (appears when the main button is off-screen) ── */
.bar { display: none; }
@media (max-width: 1000px) {
  .bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line-2);
    transform: translateY(110%); transition: transform .28s var(--ease); }
  .bar.show { transform: none; }
  .bar .tot small { display: block; font-size: 13px; color: var(--muted); }
  .bar .tot strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .bar .cta { width: auto; min-width: 170px; height: 50px; padding: 0 26px; }
}

/* ── Payment step ────────────────────────────────────── */
.review { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 40px; }
.review .t { font-weight: 600; }
.review .s { color: var(--muted); font-size: 15px; margin-top: 2px; }
.linkbtn { flex: none; background: none; border: 0; padding: 4px 0; font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--teal-dd); }
.pay-note { margin: -10px 0 22px; color: var(--muted); font-size: 15px; }
#express { min-height: 0; }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
#payment-element { min-height: 190px; }
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Toast ───────────────────────────────────────────── */
.toast { position: fixed; z-index: 40; left: 50%; top: 20px; transform: translate(-50%, -16px); opacity: 0; pointer-events: none; max-width: min(92vw, 440px);
  padding: 12px 16px; border-radius: 12px; background: var(--text); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 8px 28px rgba(0,0,0,.18); transition: .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Footer ──────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.foot a { color: var(--text); text-decoration: none; font-weight: 500; }
.foot a:hover { text-decoration: underline; }
@media (max-width: 1000px) { .foot-in { padding-bottom: 110px; } }

/* ── Confirmation page ───────────────────────────────── */
.done { max-width: 560px; margin: 0 auto; padding: 64px 24px 96px; text-align: center; animation: fadeIn .45s var(--ease) both; }
.done .mark { width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-d); color: #fff; }
.done .mark.warn { background: #f1f1f1; color: var(--text); }
.done .mark svg { width: 34px; height: 34px; }
.done .mark .draw { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h1 { margin-bottom: 12px; }
.done p { margin: 0 auto; color: var(--muted); font-size: 17px; max-width: 440px; }
.facts { margin: 32px 0 0; border: 1px solid var(--line-2); border-radius: 12px; text-align: left; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; font-size: 15px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.btn2 { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 28px; margin-top: 32px; border-radius: 12px; background: var(--text); color: #fff; font-weight: 600; text-decoration: none; transition: filter .15s; }
.btn2:hover { filter: brightness(1.25); }
.btn2.ghost { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* ── Agreement ───────────────────────────────────────── */
.agree-block { padding-top: 28px; }
.check.agree { margin-top: 0; align-items: flex-start; line-height: 1.5; }
.check.agree .ck { margin-top: 1px; }
