:root {
  --red: #E31E25;
  --red-dark: #C0161C;
  --graphite: #1E1F22;
  --gray: #5B5B5B;
  --muted: #7A7C80;
  --line: #E4E5E7;
  --bg: #FFFFFF;
  --tint: #F5F5F3;
  --ball: #CDEB45;
  --radius: 14px;
  --wrap: 1180px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--graphite);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--graphite); color: #fff; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.eyebrow--light { color: var(--ball); }
.lead { font-size: 19px; color: var(--gray); max-width: 640px; }
.section--dark .lead { color: #B8BABE; }
.note { font-size: 15px; color: var(--muted); margin-top: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--graphite); }
.btn--line { border-color: var(--graphite); color: var(--graphite); background: none; }
.btn--line:hover { background: var(--graphite); color: #fff; }
.btn--lg { padding: 16px 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__in { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.header__logo img { height: 46px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--gray); }
.nav a:hover { color: var(--red); }
.burger { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,13,15,.88) 0%, rgba(12,13,15,.55) 45%, rgba(12,13,15,.1) 75%),
    linear-gradient(0deg, rgba(12,13,15,.7) 0%, rgba(12,13,15,0) 45%);
}
.hero__in { position: relative; width: 100%; padding-top: 120px; padding-bottom: 64px; }
.hero__title { font-size: clamp(42px, 7vw, 84px); font-weight: 800; max-width: 760px; margin-bottom: 20px; }
.hero__title span { color: #fff; }
.hero__lead { font-size: clamp(17px, 2vw, 21px); max-width: 540px; color: #E3E4E6; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 48px; }
.hero__facts { list-style: none; margin: 0; padding: 0; display: flex; gap: 44px; flex-wrap: wrap; }
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts b { font-size: 34px; font-weight: 800; color: var(--ball); line-height: 1.1; }
.hero__facts span { font-size: 14px; color: #C9CBCF; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.about__img { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__img--video { aspect-ratio: 16 / 9; background: var(--graphite); }
.about__img video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- кнопка Telegram ---------- */
.tg-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 12px; border-radius: 999px;
  background: #229ED9; color: #fff; font-weight: 600; font-size: 15px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .2s, background .2s;
}
.tg-float:hover { background: #1B8BC0; transform: translateY(-2px); }
.tg-float svg, .tg-icon { width: 32px; height: 32px; flex: none; }
.tg-icon { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; }
@media (max-width: 600px) {
  .tg-float { padding: 12px; right: 16px; bottom: 16px; }
  .tg-float span { display: none; }
}
.features {
  list-style: none; margin: 72px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.features li { background: var(--bg); padding: 30px 28px; }
.features svg { width: 32px; height: 32px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.features h3 { font-size: 18px; margin-bottom: 6px; }
.features p { font-size: 15px; color: var(--gray); margin: 0; }

/* ---------- courts ---------- */
.courts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; }
.court-card { margin: 0; background: #2A2B2F; border-radius: var(--radius); overflow: hidden; }
.court-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.court-card figcaption { padding: 24px 26px 26px; }
.court-card p { color: #B8BABE; font-size: 16px; margin: 0; }

/* ---------- prices ---------- */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.price {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column;
}
.price--hot { background: var(--graphite); color: #fff; border-color: var(--graphite); }
.price h3 { font-size: 18px; margin-bottom: 4px; }
.price__when { font-size: 15px; color: var(--muted); margin-bottom: 26px; }
.price--hot .price__when { color: #B8BABE; }
.price__sum { font-size: 40px; font-weight: 800; line-height: 1; margin-top: auto; }
.price__sum small { font-size: 16px; font-weight: 500; color: var(--muted); }
.price--hot .price__sum small { color: #B8BABE; }

/* ---------- training cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.card { background: var(--bg); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; border: 1px solid var(--line); }
.card--accent { border: 2px solid var(--red); }
.card__tag { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--gray); margin-bottom: 18px; }
.card--accent .card__tag { background: var(--red); color: #fff; }
.card p { font-size: 15px; color: var(--gray); }
.card__price { margin: auto 0 0 !important; padding-top: 10px; font-weight: 700; color: var(--graphite) !important; font-size: 17px !important; }

/* ---------- booking ---------- */
.booking { display: grid; grid-template-columns: 1fr 340px; gap: 40px; margin-top: 40px; align-items: start; }
.booking__main { min-width: 0; }
.step { border: 0; padding: 0; margin: 0 0 36px; min-width: 0; }
.step legend { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; margin-bottom: 16px; padding: 0; }
.step__n { width: 30px; height: 30px; border-radius: 50%; background: var(--graphite); color: #fff; font-size: 14px; display: grid; place-items: center; flex: none; }

.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: block; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg);
  cursor: pointer; transition: border-color .12s, background .12s, color .12s; user-select: none;
}
.opt:hover span { border-color: var(--gray); }
.opt input:checked + span { border-color: var(--red); background: var(--red); color: #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--ball); outline-offset: 2px; }
.opt input:disabled + span { opacity: .35; cursor: not-allowed; text-decoration: line-through; background: var(--tint); }
.opt input:disabled + span:hover { border-color: var(--line); }

.dates { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dates .opt { flex: none; scroll-snap-align: start; }
.dates .opt span { width: 70px; padding: 10px 0; text-align: center; line-height: 1.2; }
.dates small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dates b { display: block; font-size: 22px; font-weight: 700; margin: 2px 0; }
.dates em { display: block; font-size: 12px; font-style: normal; color: var(--muted); }
.dates .is-weekend small { color: var(--red); }
.dates input:checked + span small, .dates input:checked + span em { color: rgba(255,255,255,.85); }

.court-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.court-pick .opt span { padding: 14px 16px; }
.court-pick b { display: block; font-size: 16px; }
.court-pick small { font-size: 13px; color: var(--muted); }
.court-pick input:checked + span small { color: rgba(255,255,255,.85); }

.seg { display: inline-flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.seg .opt span { padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slots .opt span { padding: 10px 0; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.slots .is-prime span { box-shadow: inset 0 -3px 0 var(--ball); }
.slots__empty { grid-column: 1 / -1; color: var(--muted); margin: 0; }
.slots__legend { font-size: 13px; color: var(--muted); margin: 12px 0 0; display: flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.dot--prime { background: var(--ball); }

.extras { display: grid; gap: 10px; }
.extra { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.extra:has(input:checked) { border-color: var(--red); }
.extra input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.extra__name { flex: 1; }
.extra__name small { display: block; color: var(--muted); font-size: 13px; }
.extra__price { font-weight: 600; white-space: nowrap; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field--wide { grid-column: 1 / -1; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-weight: 400; font-size: 16px; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--graphite);
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--graphite); }
.field.is-invalid input { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: var(--gray); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin: 1px 0 0; flex: none; }
.check.is-invalid { color: var(--red); }

.summary {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--graphite); color: #fff; border-radius: var(--radius); padding: 28px;
}
.summary h3 { margin-bottom: 18px; }
.summary dl { margin: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #3A3B40; font-size: 15px; }
.summary dt { color: #9EA0A5; }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 8px; }
.summary__total b { font-size: 32px; font-weight: 800; color: var(--ball); }
.summary__hint { font-size: 13px; color: #9EA0A5; margin-bottom: 20px; }
.form-error { background: rgba(227,30,37,.15); border: 1px solid var(--red); color: #FFD5D6; font-size: 14px; padding: 10px 12px; border-radius: 10px; }
.form-error a { color: #fff; }

.done { text-align: center; padding: 56px 24px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 40px; }
.done:focus { outline: none; }
.done__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--ball); color: var(--graphite); font-size: 36px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 20px; }
.done p { color: var(--gray); max-width: 520px; margin: 0 auto 24px; }

/* ---------- faq ---------- */
details { border-bottom: 1px solid #DCDDDF; }
details:first-of-type { border-top: 1px solid #DCDDDF; margin-top: 28px; }
summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; font-weight: 600; font-size: 18px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 400; color: var(--red); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--gray); margin: -6px 0 22px; max-width: 680px; }

/* ---------- contacts ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: stretch; }
.contacts__list { margin: 20px 0 32px; }
.contacts__list div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contacts__list dt { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.contacts__list dd { margin: 0; font-size: 18px; font-weight: 600; }
.contacts__list a { text-decoration: none; }
.contacts__list a:hover { color: var(--red); }
.map { border-radius: var(--radius); overflow: hidden; min-height: 400px; background: var(--tint); }
.map iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }
.map__stub { height: 100%; min-height: 400px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.map__stub svg { width: 48px; height: 48px; fill: none; stroke: var(--red); stroke-width: 1.6; }

/* ---------- footer ---------- */
.footer { background: var(--graphite); color: #9EA0A5; padding: 36px 0; font-size: 14px; }
.footer__in { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer img { height: 40px; width: auto; }
.footer p { margin: 0 auto 0 0; }
.footer a { color: #C9CBCF; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .booking { grid-template-columns: 1fr 300px; gap: 28px; }
}
@media (max-width: 920px) {
  :root { --header-h: 64px; }
  .header__logo img { height: 40px; }
  .header__cta { margin-left: auto; padding: 9px 16px; font-size: 15px; }
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; margin-right: -10px;
  }
  .burger span { display: block; height: 2px; background: var(--graphite); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; margin: 0;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); color: var(--graphite); }
  .header__in { gap: 16px; }

  .section { padding: 72px 0; }
  .about, .contacts { grid-template-columns: 1fr; gap: 36px; }
  .features { grid-template-columns: 1fr 1fr; }
  .courts, .prices { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 60px 0; }
  .header__cta { display: none; }
  .burger { margin-left: auto; }
  .hero { min-height: 640px; }
  .hero__shade { background: linear-gradient(0deg, rgba(12,13,15,.92) 0%, rgba(12,13,15,.6) 55%, rgba(12,13,15,.25) 100%); }
  .hero__in { padding-bottom: 44px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__facts { gap: 28px; }
  .hero__facts b { font-size: 28px; }
  .features { grid-template-columns: 1fr; margin-top: 48px; }
  .cards { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .footer__in { flex-direction: column; align-items: flex-start; gap: 14px; }
}
