:root {
  --red: #c10015;
  --red-dark: #8f0010;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --muted: #8a8a8a;
  --line: #e4e1dc;
  --paper: #f7f5f1;
  --card: #ffffff;
  --radius: 14px;
  --font: "Archivo", system-ui, sans-serif;
  --display: "Archivo Narrow", "Archivo", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: grid;
  grid-template-columns: minmax(340px, 44%) 1fr;
  min-height: 100vh;
}

/* ---------- Brand panel ---------- */
.brand {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  background: var(--red);
}
.brand__photo {
  position: absolute;
  inset: 0;
  background: url("assets/player.jpg") center 30% / cover no-repeat;
  filter: grayscale(1) contrast(1.1);
  mix-blend-mode: multiply;
  opacity: .9;
}
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(193,0,21,.15) 0%, rgba(120,0,12,.85) 100%);
}
.brand__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
}
.brand__logo {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.eyebrow--red { color: var(--red); }
.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 5.4vw, 96px);
  line-height: .86;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.brand__lede {
  max-width: 34ch;
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
}
.brand__facts {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255,255,255,.3);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.brand__facts span {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0;
  color: #fff;
}

/* ---------- Form panel ---------- */
.panel {
  width: 100%;
  max-width: 720px;
  padding: 56px 56px 32px;
}
.panel__head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.steps {
  display: flex;
  gap: 8px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps li {
  flex: 1;
  padding-top: 10px;
  border-top: 3px solid var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.steps li { border-color: var(--line); color: var(--muted); }
.steps li.is-active { border-color: var(--red); color: var(--red); }
.steps li.is-done { border-color: var(--ink); color: var(--ink); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.back:hover { color: var(--red); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Registration review on the payment page */
.review {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  margin: 0 0 18px;
  padding: 16px 18px;
  font-size: 14px;
  background: var(--paper);
  border-radius: 10px;
}
.review dt { color: var(--muted); }
.review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.block {
  margin-top: 28px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.block h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 19px;
  font-weight: 700;
}
.num {
  font-family: var(--display);
  font-size: 14px;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  padding: 3px 7px;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label, .sub legend {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input[type="text"]:focus, input[type="tel"]:focus, input[type="email"]:focus {
  background: #fff;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(17,17,17,.06);
}
input::placeholder { color: #b5b1aa; }

.sub {
  margin: 8px 0 0;
  padding: 18px 18px 2px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.sub legend {
  padding: 0 6px;
  margin-left: -6px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}

/* Errors */
.err {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--red);
}
.invalid input { border-color: var(--red); background: #fff6f6; }
.invalid .err, .err--group.show { display: block; }
.err--group { margin-top: 10px; }

/* Banners at the top of a block */
.block--banner { padding-top: 0; overflow: hidden; }
.banner {
  height: 150px;
  margin: 0 -28px 24px;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 4px solid var(--red);
}
.banner--rackets { background-image: linear-gradient(180deg, rgba(17,17,17,0) 40%, rgba(17,17,17,.35)), url("assets/rackets.jpg"); background-position: center 42%; }
.banner--court { background-image: linear-gradient(180deg, rgba(17,17,17,0) 40%, rgba(17,17,17,.35)), url("assets/court.jpg"); background-position: center 45%; }

/* Category pickers */
.pick { margin-bottom: 18px; animation: drop .25s ease; }
.pick[hidden] { display: none; }
.pick__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg--3 { grid-template-columns: 1fr 1fr 1fr; }
.opt {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { font-size: 16px; font-weight: 700; }
.opt small { font-size: 12px; color: var(--muted); }
.opt:has(input:checked) { border-color: var(--red); background: var(--red); color: #fff; }
.opt:has(input:checked) small { color: rgba(255,255,255,.8); }
.opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.chosen { margin: 4px 0 0; padding: 12px 14px; font-size: 14px; color: var(--ink-2); background: var(--paper); border-radius: 10px; }
.chosen strong { color: var(--ink); }

.partner { margin-top: 18px; animation: drop .25s ease; }
.pick__hint { margin-left: 6px; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--muted); }

/* Entry pass tiers */
.eb { margin: 0 0 10px; padding: 10px 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); background: #fff5f5; border-left: 3px solid var(--red); border-radius: 6px; }
.eb[hidden] { display: none; }
.eb span { margin-right: 6px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.eb strong { color: var(--ink); }
.passes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pass { display: flex; flex-direction: column; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s, color .15s; }
.pass__n { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pass__was { min-height: 18px; margin-top: 6px; font-size: 12px; color: var(--muted); text-decoration: line-through; }
.pass__price { font-family: var(--display); font-size: 22px; white-space: nowrap; }
.pass.is-current { border-color: var(--red); background: var(--red); color: #fff; }
.pass.is-current .pass__n, .pass.is-current .pass__was { color: rgba(255,255,255,.8); }

/* Event picker */
.group { margin-bottom: 14px; }
.group__name { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev span { font-size: 15px; line-height: 1.25; }
.opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.opt:has(input:disabled):hover { border-color: var(--line); }
.check[hidden] { display: none; }
.masters { margin-top: 18px; }
.review dd { white-space: pre-line; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Payment */
.summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  color: #fff;
  border-radius: 12px;
  background: var(--ink);
}
.summary p { margin: 0; }
.summary__label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.summary__cat { margin-top: 4px !important; font-weight: 600; }
.summary__amt { font-family: var(--display); font-size: 30px; white-space: nowrap; }

.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.pay__opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.pay__opt input { position: absolute; left: 16px; top: 17px; accent-color: var(--red); width: 16px; height: 16px; margin: 0; }
.pay__opt span { font-weight: 600; font-size: 15px; }
.pay__opt small { color: var(--muted); font-size: 12px; }
.pay__opt:has(input:checked) { border-color: var(--red); background: #fff5f5; }

/* Card details */
.cardbox { margin: 0 0 18px; padding-top: 18px; }
.cardbox[hidden], .banknote[hidden] { display: none; }
.ccnum { position: relative; }
.ccnum input { padding-right: 110px; letter-spacing: .04em; }
.ccnum__brand {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
}
.banknote {
  margin: 0 0 18px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--paper);
  border-left: 3px solid var(--red);
  border-radius: 6px;
}

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  margin-top: 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { width: auto; text-decoration: none; padding: 0 26px; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.secure { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* Done */
.done { margin-top: 28px; padding: 48px 28px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.done__badge { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--red); }
.done__badge svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done h3 { margin: 0 0 8px; font-size: 30px; font-weight: 900; }
.done p { margin: 0 auto 24px; max-width: 42ch; line-height: 1.5; color: var(--ink-2); }

.foot { display: flex; justify-content: space-between; margin-top: 32px; font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
/* Mobile browsers: 100vh includes the hidden URL bar, dvh doesn't */
@supports (height: 100dvh) {
  .layout { min-height: 100dvh; }
  .brand { height: 100dvh; }
}

/* Small laptops / large tablets in landscape */
@media (min-width: 901px) and (max-width: 1200px) {
  .brand__inner { padding: 36px 36px; }
  .panel { padding: 48px 40px 32px; }
}

/* Wide screens: the form fills its column instead of leaving an empty strip on the right */
@media (min-width: 1201px) {
  .panel { max-width: 1320px; margin: 0 auto; padding: 56px clamp(48px, 4.5vw, 88px) 32px; }
  .block { padding: 32px; }
  .block--banner { padding-top: 0; }
  .banner { height: 170px; margin: 0 -32px 26px; }
  .block--player { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .block--player > h3, .block--player > .row, .block--player > .sub { grid-column: 1 / -1; }
  .review { grid-template-columns: max-content 1fr max-content 1fr; gap: 12px 24px; padding: 20px 22px; }
  .pass { padding: 16px 18px; }
  .pass__price { font-size: 26px; }
  .partner .row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1600px) {
  .events { grid-template-columns: repeat(3, 1fr); }
  #partners { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

/* Short desktop windows: shrink the sticky brand panel so nothing gets clipped */
@media (min-width: 901px) and (max-height: 760px) {
  .brand__inner { padding-top: 28px; padding-bottom: 28px; }
  .brand__logo { width: 64px; height: 64px; }
  .brand h1 { font-size: clamp(44px, min(5.4vw, 11vh), 96px); }
  .brand__lede { margin-top: 14px; font-size: 15px; }
  .brand__facts { padding-top: 16px; }
  .brand__facts span { font-size: 28px; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .brand { position: relative; height: auto; min-height: 460px; }
  .brand__inner { padding: 28px 20px; gap: 48px; }
  .brand__logo { width: 64px; height: 64px; }
  .brand h1 { font-size: 64px; }
  .panel { max-width: none; padding: 32px 16px 24px; }
}
/* Tablets in portrait: keep the form at a readable width, centred */
@media (min-width: 561px) and (max-width: 900px) {
  .brand__inner { padding: 36px 32px; }
  .panel { max-width: 720px; margin: 0 auto; padding: 40px 32px 28px; }
}
/* Phones in landscape: don't let the brand panel fill the whole screen */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .brand { min-height: 0; }
  .brand h1 { font-size: 48px; }
}
@media (max-width: 560px) {
  .row, .pay { grid-template-columns: 1fr; gap: 0 12px; }
  .pay { gap: 10px; }
  .seg--3 { grid-template-columns: 1fr 1fr; }
  .seg--3 .opt:last-child { grid-column: 1 / -1; }
  .banner { height: 120px; margin: 0 -16px 20px; }
  .review { grid-template-columns: 1fr; gap: 2px; }
  .review dd { margin-bottom: 8px; }
  .events { grid-template-columns: 1fr; }
  .pass { padding: 10px; }
  .pass__price { font-size: 19px; }
  .block { padding: 20px 16px; }
  .brand__facts { gap: 24px; }
  /* .block's padding above would otherwise push banners down from the top edge */
  .block--banner { padding-top: 0; }
  .summary { flex-wrap: wrap; align-items: flex-start; }
}
/* Small phones (iPhone SE, older Androids) */
@media (max-width: 380px) {
  .brand h1 { font-size: 46px; }
  .brand__facts { gap: 18px; }
  .block { padding: 18px 14px; }
  .block--banner { padding-top: 0; }
  .banner { margin: 0 -14px 18px; }
  .opt { padding: 10px 10px; }
  .opt span { font-size: 15px; }
  .summary__amt { font-size: 26px; }
  .pass__n { font-size: 11px; letter-spacing: .04em; }
  .pass__price { font-size: 16px; }
  .steps li { font-size: 11px; letter-spacing: .04em; }
  .foot { gap: 12px; }
}

/* Keep grid children and fieldsets from forcing horizontal overflow */
.layout > *, .row > *, .seg > *, .pay > *, .passes > *, .events > * { min-width: 0; }
fieldset { min-inline-size: 0; }
