/* ============================================================
   SWIM39 — стили
   Палитра: глубокий синий фон, белый текст, ледяной акцент
   ============================================================ */

:root {
  --bg: #061A2B;
  --bg-2: #04121F;
  --bg-3: #0B2539;
  --fg: #EEF4F8;
  --fg-2: rgba(238, 244, 248, .62);
  --fg-3: rgba(238, 244, 248, .36);
  --line: rgba(238, 244, 248, .12);
  --acc: #7FD9FF;
  --acc-2: #2FB8F0;
  --font-display: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(80px, 10vw, 150px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
::selection { background: var(--acc); color: var(--bg-2); }

/* ---------- атомы ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-2);
}
.label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 12px var(--acc);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg); background: transparent; white-space: nowrap;
  transition: background .35s, color .35s, border-color .35s, transform .35s;
}
.btn:hover { background: var(--fg); color: var(--bg-2); border-color: var(--fg); }
.btn--acc { background: var(--acc); color: var(--bg-2); border-color: var(--acc); }
.btn--acc:hover { background: var(--fg); border-color: var(--fg); }

.display {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.045em; line-height: .88;
}

/* ---------- прелоадер ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg-2);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--gutter); gap: 24px;
}
.loader__brand { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); padding-bottom: 8px; }
.loader__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(64px, 14vw, 200px); line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
html:not(.js) .loader { display: none; }

/* ---------- курсор: кастомный отключён, используется системный ---------- */
.cursor { display: none; }

/* ---------- навигация ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
.nav.is-scrolled { background: rgba(6, 26, 43, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line); }
.nav__logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-transform: uppercase; }
.nav__logo em { color: var(--acc); font-style: normal; }
.nav__links { display: flex; gap: 32px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nav__links a { position: relative; opacity: .7; transition: opacity .3s; padding: 4px 0; }
.nav__links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--acc); transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.7, 0, .2, 1); }
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 14px; }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg); transition: transform .4s, top .4s; }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 25px; }
.burger.is-open span:first-child { top: 21.5px; transform: rotate(45deg); }
.burger.is-open span:last-child { top: 21.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: center; padding: 96px var(--gutter) var(--gutter);
  clip-path: inset(0 0 100% 0); visibility: hidden;
}
.menu a { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 12vw, 80px); text-transform: uppercase; letter-spacing: -.04em; line-height: 1.05; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu a:last-child { color: var(--acc); }

/* ---------- главный экран ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 36px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__bg img { width: 100%; height: 115%; object-fit: cover; object-position: center 40%; will-change: transform, filter; }
html.js .hero__bg img { transform: scale(1.12); filter: blur(18px); }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 26, 43, .55) 0%, rgba(6, 26, 43, .18) 35%, rgba(6, 26, 43, .55) 70%, rgba(6, 26, 43, .96) 100%);
}
.hero__title {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.045em; line-height: .93; font-size: clamp(58px, 12.6vw, 232px);
  margin: 0 0 clamp(28px, 4vw, 56px); will-change: transform;
}
.hero__line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.hero__line--2 { padding-left: 21%; }
.hero__line--3 { text-align: right; }
.hero__line .ch { display: inline-block; will-change: transform, filter, opacity; }
html.js .hero__line .ch { opacity: 0; }
.hero__foot {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  border-top: 1px solid var(--line); padding-top: 20px;
}
html.js .hero__foot { opacity: 0; }
.hero__caption { max-width: 460px; font-size: 15px; color: var(--fg-2); }
.hero__caption strong { color: var(--fg); font-weight: 500; }
.hero__scroll { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.hero__scroll i { display: block; width: 1px; height: 48px; background: var(--fg-3); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ''; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--acc); animation: scrollLine 1.8s cubic-bezier(.7, 0, .2, 1) infinite; }
@keyframes scrollLine { 0% { top: -100%; } 60%, 100% { top: 100%; } }

/* ---------- бегущая строка ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 16px 0; white-space: nowrap; background: var(--bg); position: relative; z-index: 2; }
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__item {
  display: inline-flex; align-items: center; gap: .8em; padding-right: .8em;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.6vw, 36px);
  letter-spacing: -.02em; text-transform: uppercase; color: var(--fg-2);
}
.marquee__item::after { content: ''; width: .26em; height: .26em; border-radius: 50%; background: var(--acc); flex: none; }

/* ---------- о подходе ---------- */
.intro { padding: var(--section) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px 56px; align-items: stretch; }
.intro__text {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3.6vw, 56px);
  line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; max-width: 22ch;
}
.intro__text .w { display: inline-block; opacity: .16; }
html:not(.js) .intro__text .w { opacity: 1; }

/* ---------- статистика ---------- */
.stats { border-top: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat {
  position: relative; padding: 30px var(--gutter) 34px; min-height: clamp(240px, 26vw, 340px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background .5s;
}
.stat:nth-child(3n) { border-right: 0; }
.stat:hover { background: rgba(127, 217, 255, .04); }
.stat__top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.stat__idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--fg-3); }
.stat__lbl { font-size: 13px; color: var(--fg-2); text-align: right; max-width: 200px; }
.stat__num {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(72px, 8vw, 140px);
  line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-top: 32px;
}
.stat__num em { font-style: normal; color: var(--acc); font-size: .55em; vertical-align: .45em; margin-left: .04em; letter-spacing: -.02em; }

/* ---------- программы ---------- */
.programs { padding-top: var(--section); }
.programs__head { padding: 0 var(--gutter) 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.programs__title, .play__title, .results__title, .coach__name, .intro__title, .archive__title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.045em; line-height: 1.08; font-size: clamp(40px, 6.4vw, 104px); margin-top: 18px;
}
.programs__note, .play__note, .cta__lead { color: var(--fg-2); font-size: clamp(15px, 1.2vw, 18px); max-width: 440px; justify-self: end; }
.programs__list { border-top: 1px solid var(--line); }
.program {
  display: grid; grid-template-columns: 64px 1.5fr 1fr 1.7fr 56px; gap: 28px; align-items: center;
  padding: 34px var(--gutter); border-bottom: 1px solid var(--line); position: relative; cursor: pointer;
  transition: background .5s;
}
.program:hover { background: rgba(127, 217, 255, .04); }
.program__idx { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--fg-3); }
.program__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.2vw, 50px); letter-spacing: -.035em; line-height: .95; text-transform: uppercase; }
.program__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.program__desc { color: var(--fg-2); font-size: 15px; }
.program__arrow {
  width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; justify-self: end;
  transition: background .4s, color .4s, transform .5s cubic-bezier(.7, 0, .2, 1), border-color .4s;
}
.program:hover .program__arrow { background: var(--fg); color: var(--bg-2); border-color: var(--fg); transform: rotate(-45deg); }

.preview {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: min(24vw, 340px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px;
  opacity: 0; transform: translate(-50%, -50%) scale(.8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.preview img.is-active { opacity: 1; }

/* ---------- физика ---------- */
.play { padding: var(--section) var(--gutter) 0; }
.play__head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; margin-bottom: 40px; }

/* ---------- тренер ---------- */
.coach { padding: var(--section) var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.coach__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; }
.coach__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; will-change: transform; transform-origin: 50% 30%; }
.coach__text { color: var(--fg-2); font-size: clamp(16px, 1.25vw, 19px); max-width: 560px; margin-top: 28px; display: grid; gap: 16px; }
.timeline { margin-top: 56px; border-top: 1px solid var(--line); }
.tl { display: grid; grid-template-columns: 112px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.tl__year { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--acc); line-height: 1.1; }
.tl__text { color: var(--fg-2); font-size: 15px; }

/* ---------- результаты ---------- */
.results { position: relative; padding-top: var(--section); }
.results__head { padding: 0 var(--gutter) 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.results__nav { display: flex; gap: 10px; padding-bottom: 6px; }
.results__btn {
  width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; font-size: 18px;
  display: grid; place-items: center; transition: background .35s, color .35s, border-color .35s, opacity .35s;
}
.results__btn:hover { background: var(--fg); color: var(--bg-2); border-color: var(--fg); }
.results__btn:disabled { opacity: .3; pointer-events: none; }
/* галерея: бесконечная лента на transform */
.results__viewport {
  overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; cursor: grab;
  scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.results__viewport::-webkit-scrollbar { display: none; }
.results__viewport.is-dragging, .results__viewport.is-moving { scroll-snap-type: none; }
.results__viewport.is-dragging { cursor: grabbing; }
.results__viewport.is-dragging .card__img img { pointer-events: none; }
.results__track { display: flex; gap: 20px; padding: 0 var(--gutter); width: max-content; }
.card { position: relative; width: clamp(260px, 29vw, 420px); flex: none; margin: 0; scroll-snap-align: start; user-select: none; -webkit-user-select: none; }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__img img { transform: scale(1); }
.card__cap { display: flex; justify-content: space-between; margin-top: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }

/* ---------- отзывы ---------- */
.reviews { padding: var(--section) var(--gutter); }
.reviews__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.review {
  margin: 0; padding: 32px; border: 1px solid var(--line); border-radius: 14px; min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent);
  transition: border-color .4s, background .4s;
}
.review:hover { border-color: rgba(127, 217, 255, .4); }
.review__q { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.5vw, 24px); letter-spacing: -.02em; line-height: 1.25; }
.review__a { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }

/* ---------- запись ---------- */
.cta { padding: var(--section) var(--gutter); border-top: 1px solid var(--line); }
.cta__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 11vw, 200px); line-height: .9; text-transform: uppercase; letter-spacing: -.05em; margin: 18px 0 clamp(40px, 5vw, 72px); }
.cta__title em { font-style: normal; color: var(--acc); }
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.cta__lead { justify-self: start; margin-bottom: 40px; }
.contacts { display: flex; flex-direction: column; }
.contact {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 38px); letter-spacing: -.025em;
  transition: padding-left .4s cubic-bezier(.7, 0, .2, 1), color .3s;
}
.contact:last-child { border-bottom: 1px solid var(--line); }
.contact:hover { padding-left: 14px; color: var(--acc); }
.contact small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); font-weight: 400; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.field input, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--fg); font: inherit; font-size: 18px; padding: 12px 0; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .3s;
}
.field input::placeholder { color: var(--fg-3); }
.field input:focus, .field select:focus { border-color: var(--acc); }
.field input.is-invalid { border-color: #ff7a7a; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237FD9FF' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 28px; }
.field select option { background: var(--bg-2); color: var(--fg); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--fg-2); cursor: pointer; }
.check input { accent-color: var(--acc); margin: 3px 0 0; width: 16px; height: 16px; flex: none; }
.form__submit { justify-self: start; padding: 18px 32px; font-size: 13px; }
.form__err { color: #ff8a8a; font-size: 13px; min-height: 1em; }
.form__ok { padding: 36px; border: 1px solid var(--acc); border-radius: 14px; align-self: center; }
.form__ok p { margin-top: 16px; font-family: var(--font-display); font-size: clamp(20px, 1.8vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }

/* ---------- футер ---------- */
.footer { padding: 40px var(--gutter) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__wordmark {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(56px, 15.2vw, 280px); line-height: .8; letter-spacing: -.055em;
  color: transparent; -webkit-text-stroke: 1px rgba(238, 244, 248, .16);
  margin: 0 -.03em 32px; white-space: nowrap;
}
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.footer__up { color: var(--fg); }

/* ---------- reveal ---------- */
html.js [data-reveal] { opacity: 0; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1100px) {
  .program { grid-template-columns: 48px 1.3fr 1fr 1.6fr 48px; gap: 20px; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav .btn { display: none; }
  .burger { display: block; }
  .menu { visibility: visible; }

  .hero { padding-top: 100px; }
  .hero__line--2 { padding-left: 10%; }
  .hero__line--3 { text-align: left; padding-left: 4%; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__scroll { display: none; }

  .intro { grid-template-columns: 1fr; gap: 28px; }
  .intro__text { max-width: none; }
  .intro__photo { width: 100%; justify-self: stretch; height: auto; min-height: 0; aspect-ratio: 4 / 3; max-height: 60vh; } /* у элементов с aspect-ratio grid не растягивает ширину сам */

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3n) { border-right: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat { min-height: 220px; }

  .programs__head, .play__head, .cta__grid, .coach { grid-template-columns: 1fr; }
  .programs__note, .play__note { justify-self: start; }
  .program { grid-template-columns: 40px 1fr 48px; grid-template-areas: "idx name arrow" "idx meta arrow" "idx desc arrow"; gap: 10px 16px; padding: 28px var(--gutter); }
  .program__idx { grid-area: idx; align-self: start; padding-top: 6px; }
  .program__name { grid-area: name; }
  .program__meta { grid-area: meta; }
  .program__desc { grid-area: desc; }
  .program__arrow { grid-area: arrow; align-self: start; width: 40px; height: 40px; }
  .preview { display: none; }


  .coach__photo { max-height: 70vh; }
  .reviews__grid { grid-template-columns: 1fr; }

  .results__head { flex-direction: column; align-items: flex-start; }
  .card { width: 76vw; }
}

@media (max-width: 600px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(3n) { border-right: 0; min-height: 0; padding: 24px var(--gutter) 28px; }
  .stat__num { font-size: 72px; margin-top: 20px; }
  .stat__lbl { text-align: right; }
  .form__row { grid-template-columns: 1fr; }
  .contact { font-size: 22px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .review { min-height: 0; padding: 24px; }
  .tl { grid-template-columns: 64px 1fr; gap: 16px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   БЛОКИ КОНВЕРСИИ: CTA в хиро, мини-CTA, FAQ, шаги, условия
   ============================================================ */
.btn--lg { padding: 18px 28px; font-size: 13px; }
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.hero__foot { align-items: flex-end; }
.hero__caption { max-width: 420px; }

.programs__cta {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  padding: 36px var(--gutter); border-bottom: 1px solid var(--line);
}
.programs__cta p { color: var(--fg-2); font-size: clamp(15px, 1.2vw, 18px); max-width: 560px; }

.faq { padding: var(--section) var(--gutter) 0; display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.045em; line-height: 1.04; font-size: clamp(40px, 6.4vw, 104px); margin-top: 18px;
}
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.7vw, 26px);
  letter-spacing: -.02em; line-height: 1.2; transition: color .3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; font-weight: 400; font-size: 20px; color: var(--fg-2);
  transition: transform .5s cubic-bezier(.7, 0, .2, 1), background .3s, color .3s, border-color .3s;
}
.faq__item summary:hover { color: var(--acc); }
.faq__item[open] summary::after { transform: rotate(45deg); background: var(--fg); color: var(--bg-2); border-color: var(--fg); }
.faq__body { overflow: hidden; }
.faq__body p { color: var(--fg-2); font-size: clamp(15px, 1.15vw, 17px); max-width: 640px; padding: 0 64px 26px 0; }

.steps {
  list-style: none; margin: 0 0 clamp(40px, 5vw, 72px); padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.step { padding: 32px 32px 32px 0; border-right: 1px solid var(--line); margin-right: 32px; }
.step:last-child { border-right: 0; margin-right: 0; }
.step__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--acc); }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -.02em; line-height: 1.2; margin: 14px 0 10px; }
.step__text { color: var(--fg-2); font-size: 15px; }

.terms { list-style: none; margin: 0 0 40px; padding: 0; border-top: 1px solid var(--line); }
.term { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.term__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); padding-top: 3px; }
.term__v { color: var(--fg); font-size: clamp(15px, 1.15vw, 17px); }

.form__note { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); margin-top: -8px; }
.check a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.form__ok-small { font-family: var(--font-body) !important; font-size: 15px !important; font-weight: 400 !important; color: var(--fg-2); margin-top: 16px !important; letter-spacing: 0 !important; }
.footer__row a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hero__cta { width: 100%; }
  .hero__cta .btn { width: 100%; }
  .programs__cta { flex-direction: column; align-items: flex-start; }
  .faq { grid-template-columns: 1fr; gap: 24px; }
  .faq__body p { padding-right: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; margin-right: 0; padding: 24px 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .term { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- правки UX: хиро и блок записи ---------- */
.top { position: relative; overflow: hidden; background: var(--bg); }
.top .hero__bg { position: absolute; inset: 0; z-index: 0; }
.top .hero__bg::after {
  background: linear-gradient(180deg,
    rgba(6, 26, 43, .55) 0%, rgba(6, 26, 43, .15) 30%, rgba(6, 26, 43, .45) 58%,
    rgba(6, 26, 43, .88) 78%, var(--bg) 100%);
}
.hero { overflow: visible; padding-bottom: 40px; }
.hero__title { margin-bottom: 0; }
.lead {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 48px;
  padding: 24px var(--gutter) 44px; background: transparent;
}
.lead__caption { max-width: 520px; font-size: 15px; color: var(--fg-2); }
.lead__caption strong { color: var(--fg); font-weight: 500; }
.lead__cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; justify-self: end; }
.lead__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
@media (max-width: 900px) {
  .lead { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 32px; }
  .lead__cta { width: 100%; justify-self: stretch; }
  .lead__cta .btn { width: 100%; }
  .lead__meta { white-space: normal; }
}

.cta__col-label { margin-bottom: 18px; }
.contacts { margin-top: 0; }
.form .cta__col-label { margin-bottom: 0; }
.step__text { font-size: 15px; line-height: 1.5; }


/* ---------- плотнее: расстояния между блоками ---------- */
:root { --section: clamp(56px, 6.5vw, 104px); }
.stat { min-height: clamp(200px, 19vw, 260px); }
.stat__num { margin-top: 24px; }
.programs__head, .results__head { padding-bottom: 28px; }
.play__head { margin-bottom: 28px; }
.reviews__grid { margin-top: 28px; }
.coach__text { margin-top: 20px; }
.timeline { margin-top: 40px; }
.cta__title { margin-bottom: clamp(28px, 3.5vw, 48px); }
.steps { margin-bottom: clamp(28px, 3.5vw, 48px); }
.programs__cta { padding-top: 28px; padding-bottom: 28px; }
.faq { padding-bottom: 0; }
.footer { padding-top: 32px; }
.footer__wordmark { margin-bottom: 24px; }

/* невысокие экраны: хиро целиком во viewport */
@media (max-height: 780px) and (min-width: 901px) {
  .hero { padding-top: 96px; }
  .hero__title { font-size: clamp(48px, 10.5vw, 190px); margin-bottom: 24px; }
}

/* ---------- блок «Тренер»: компактно, фото | имя + досье, укладывается в экран ноутбука ---------- */
.coach { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4.5vw, 64px); align-items: stretch; }
.coach__photo { position: relative; aspect-ratio: auto; min-height: 0; border-radius: 8px; overflow: hidden; }
.coach__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.coach__body { display: flex; flex-direction: column; justify-content: flex-start; }
.coach__name { font-size: clamp(34px, 4.6vw, 68px); line-height: .98; margin-top: 14px; }
.coach__text { margin-top: 20px; max-width: 640px; font-size: 15px; line-height: 1.5; gap: 10px; }
.timeline { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; border-top: 1px solid var(--line); }
.tl { display: block; padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.tl__year { display: block; font-size: 16px; margin-bottom: 4px; }
.tl__text { font-size: 13px; line-height: 1.45; }
/* coach-layout-v5 */
@media (max-width: 900px) {
  .coach { grid-template-columns: 1fr; }
  .coach__photo { aspect-ratio: 4 / 5; max-height: 70vh; }
  .coach__name { font-size: clamp(36px, 10vw, 56px); }
  .timeline { grid-template-columns: 1fr; }
}

/* ---------- программы: миниатюра в строке вместо летающего превью ---------- */
.program { grid-template-columns: 44px 76px 1.4fr 1fr 1.7fr 56px; }
.program__thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; background: var(--bg-3); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.program:hover .program__thumb { transform: scale(1.06); }
.preview { display: none; }
@media (max-width: 1100px) { .program { grid-template-columns: 36px 64px 1.3fr 1fr 1.6fr 48px; } .program__thumb { width: 64px; height: 64px; } }
@media (max-width: 900px) {
  .program { grid-template-columns: 64px 1fr 40px; grid-template-areas: "thumb name arrow" "thumb meta arrow" "thumb desc arrow"; }
  .program__idx { display: none; }
  .program__thumb { grid-area: thumb; width: 64px; height: 64px; align-self: start; }
}

/* ---------- программы: возраст как визуальный якорь вместо фото ---------- */
.program { grid-template-columns: 44px 150px 1.3fr 1.8fr 56px; }
.program__thumb { display: none; }
.program__age b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.04em; line-height: 1; color: var(--acc); font-variant-numeric: tabular-nums; }
.program__age small { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
@media (max-width: 1100px) { .program { grid-template-columns: 36px 120px 1.2fr 1.6fr 48px; } }
@media (max-width: 900px) {
  .program { grid-template-columns: 84px 1fr 40px; grid-template-areas: "age name arrow" "age desc arrow"; gap: 8px 16px; }
  .program__age { grid-area: age; align-self: start; padding-top: 4px; }
  .program__age b { font-size: 30px; }
  .program__age small { font-size: 10px; white-space: normal; }
}

/* ============================================================
   АУДИТ: читаемость, доступность, полировка
   ============================================================ */
:root { --fg-3: rgba(238, 244, 248, .48); }

/* skip-link для клавиатуры и читалок */
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 999px; background: var(--acc); color: var(--bg-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; transition: top .2s; }
.skip:focus { top: 16px; outline: none; }

/* видимый фокус только с клавиатуры */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .check input:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; border-radius: 4px; }
.btn:focus-visible, .results__btn:focus-visible, .lane__mark:focus-visible { border-radius: 999px; }
.program:focus-visible { outline-offset: -4px; border-radius: 0; }
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--acc); box-shadow: 0 1px 0 0 var(--acc); }

/* активный раздел в меню */
.nav__links a.is-active { opacity: 1; }
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* длина строки и размер текста там, где было тесно */
.coach__text { max-width: 560px; }
.program__desc { font-size: 15.5px; line-height: 1.5; }
.stat__lbl { font-size: 13.5px; }
.lead__caption { font-size: 15.5px; }

/* поле физики: намёк на интерактив для тача */

/* ---------- вода на первом экране (WebGL-слой поверх фото) ---------- */
.hero__gl { position: absolute; left: 0; top: 0; width: 100%; height: 115%; display: block; opacity: 0; transition: opacity .8s; will-change: transform, filter; }
html.js .hero__gl { transform: scale(1.12); filter: blur(18px); }
.top .hero__bg img { transition: opacity .8s; }
@media (hover: none) { .hero__gl { display: none; } }

/* ---------- обёртка медиа хиро: трансформации и фильтры только на ней ---------- */
.hero__media { position: absolute; left: 0; top: 0; width: 100%; height: 115%; will-change: transform, filter; }
html.js .hero__media { transform: scale(1.12); filter: blur(18px); }
.top .hero__bg img, .top .hero__gl { height: 100%; transform: none !important; filter: none !important; will-change: auto; }

/* ---------- вода (water.js): градиент затемнения фото считается в шейдере ---------- */
.top.is-water .hero__bg::after { display: none; }

/* ---------- объём заголовка: плита над водой ---------- */
.hero { filter: drop-shadow(0 18px 26px rgba(4, 18, 32, .55)); } /* мягкая тень букв на воде; на .hero, а не на строках, у которых overflow: hidden */
.hero__line .ch {
  background: linear-gradient(180deg, #ffffff 0%, #eef4f8 55%, #cfdfea 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- читаемость меню над светлой водой: скрим сверху ---------- */
.nav::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 180px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 18, 32, .78) 0%, rgba(4, 18, 32, .42) 50%, rgba(4, 18, 32, 0) 100%);
  transition: opacity .4s;
}
.nav.is-scrolled::before { opacity: 0; } /* после прокрутки у меню своя подложка */
.nav__links a { opacity: .92; }


/* ---------- путь в 50 метров: дорожка прогресса ---------- */
.lane .play__head { align-items: end; margin-bottom: 8px; }
.lane__now { justify-self: end; width: min(100%, 460px); text-align: right; } /* прижат к правому краю, как и подводки других блоков */
.lane__num { display: flex; justify-content: flex-end; align-items: baseline; gap: .06em; font-family: var(--font-display); font-weight: 800; font-size: clamp(88px, 9.5vw, 168px); line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.lane__num em { font-style: normal; color: var(--acc); font-size: .42em; letter-spacing: -.02em; }
.lane__desc { margin-top: 22px; max-width: 460px; margin-left: auto; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.35; min-height: 1.35em; }
.lane__gain { margin-top: 14px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--fg-2); } /* что получает на этой дистанции */
.lane__gain span::before { content: '+'; color: var(--acc); font-weight: 600; margin-right: 6px; }
.lane__when { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.lane__track { position: relative; height: 120px; margin-top: 8px; }
.lane__base { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.lane__progress { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--acc); transform: scaleX(0); transform-origin: left center; }
.lane__swimmer { position: absolute; left: 0; top: 50%; z-index: 1; width: 48px; height: 33px; margin: -24.75px 0 0 -24px; color: var(--acc); filter: drop-shadow(0 0 7px rgba(127, 217, 255, .45)); will-change: transform; }
.lane__swimmer svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lane__swimmer .arm { transform-origin: 37px 16px; animation: lane-stroke .9s ease-in-out infinite alternate; animation-play-state: paused; }
.lane__swimmer.is-swimming .arm { animation-play-state: running; }
.lane__swimmer.is-swimming svg { animation: lane-bob .9s ease-in-out infinite alternate; }
.lane__swimmer .wave { animation: lane-wave 1.4s ease-in-out infinite alternate; animation-play-state: paused; }
.lane__swimmer.is-swimming .wave { animation-play-state: running; }
@keyframes lane-wave { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
@keyframes lane-stroke { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
@keyframes lane-bob { from { transform: translateY(-1px); } to { transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .lane__swimmer .arm, .lane__swimmer .wave, .lane__swimmer svg { animation: none !important; } }
.lane__mark {
  position: absolute; left: calc(var(--p) * 100%); top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; padding: 42px 12px; cursor: pointer; color: inherit;
}
.lane__mark::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--fg-3); transition: background .3s, border-color .3s, transform .3s; }
.lane__mark.is-passed::before { background: var(--acc); border-color: var(--acc); }
.lane__mark.is-here::before { opacity: 0; } /* пловец стоит на вехе: точка не нужна */
.lane__dist { position: absolute; top: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.lane__skill { position: absolute; bottom: 0; font-size: 14px; color: var(--fg-3); white-space: nowrap; transition: color .3s; }
.lane__mark:last-of-type .lane__skill, .lane__mark:last-of-type .lane__dist { transform: translateX(-38%); } /* последняя веха у края: подписи не вылезают */
.lane__mark.is-passed .lane__skill { color: var(--fg-2); }
.lane__mark.is-current .lane__skill { color: var(--fg); }
@media (max-width: 900px) {
  .lane__now { justify-self: start; text-align: left; }
  .lane__num, .lane__gain { justify-content: flex-start; }
  .lane__desc { margin-left: 0; }
  .lane__track { height: 96px; }
  .lane__skill { display: none; }
  .lane__mark:last-of-type .lane__dist { transform: translateX(-30%); }
  .lane__num { font-size: clamp(72px, 20vw, 120px); }
}

/* ---------- заголовок хиро: только запрет выделения; размер, обрезка и пробелы — исходные ---------- */
.hero__title { user-select: none; -webkit-user-select: none; }

/* ---------- галерея: настоящие фото; у портретных кадров позиция задана inline на img ---------- */
.review { min-height: 0; }

/* ---------- отзывы: подводка, карточки с карт, ссылки-пруфы ---------- */
.reviews__head { display: flex; justify-content: space-between; gap: 24px 48px; align-items: flex-end; }
.reviews__note { color: var(--fg-2); font-size: clamp(15px, 1.2vw, 18px); max-width: 560px; margin-top: 18px; }
.review__a a { color: var(--acc); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s; white-space: nowrap; }
.review__a a:hover { border-bottom-color: var(--acc); }
.reviews__links { margin-top: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.reviews__links a { color: var(--fg-2); }
.reviews__links a:hover { color: var(--acc); }
@media (max-width: 900px) { .review__a { flex-wrap: wrap; } }

/* ---------- отзывы: горизонтальная лента вместо сетки (много отзывов — листаем, а не растягиваем страницу) ---------- */
.reviews__viewport { margin: 36px calc(-1 * var(--gutter)) 0; overflow: hidden; cursor: grab; touch-action: pan-y; }
.reviews__viewport.is-dragging { cursor: grabbing; }
.reviews__viewport.is-dragging .review { pointer-events: none; }
.reviews__track { display: flex; gap: 20px; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.reviews__track .review { width: clamp(300px, 34vw, 520px); min-height: 280px; flex: none; user-select: none; -webkit-user-select: none; }
@media (max-width: 900px) { .reviews__track .review { width: min(86vw, 420px); min-height: 0; } }

/* ---------- галерея: только постановочные кадры, единая палитра ---------- */
.card__img { position: relative; }
.card__img::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 43, 0) 55%, rgba(6, 26, 43, .42) 100%); }
.card__img img { filter: saturate(.9); }
.card__cap span:first-child { color: var(--fg); }

/* ---------- запись: подводный кадр фоном, как на первом экране ---------- */
.cta { position: relative; overflow: hidden; }
.cta__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cta__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .55; filter: saturate(.7); }
.cta__bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(6, 26, 43, .86) 22%, rgba(6, 26, 43, .9) 70%, var(--bg) 100%); }
.cta > :not(.cta__bg) { position: relative; z-index: 1; }

/* ---------- о подходе: заголовок слева, вводная фраза и три принципа справа ---------- */
.intro__text { font-size: clamp(24px, 2.6vw, 40px); max-width: 24ch; }
.principles {
  list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line);
}
.principle { padding: 26px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line); }
.principle:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.principle__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--acc); }
.principle__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.5vw, 23px); letter-spacing: -.02em; line-height: 1.2; margin: 14px 0 10px; }
.principle__text { color: var(--fg-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; border-top: 0; }
  .principle { padding: 22px 0; margin: 0; border-right: 0; border-top: 1px solid var(--line); }
}

/* ---------- о подходе v2: фото слева, цитата и принципы справа ---------- */
.intro__photo { position: relative; overflow: hidden; border-radius: 14px; background: var(--bg-3); min-height: 420px; }
.intro__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 22% 40%; filter: saturate(.9); } /* девочка слева в кадре */
.intro__photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 26, 43, 0) 60%, rgba(6, 26, 43, .4) 100%); }
.intro__body { display: flex; flex-direction: column; }
.intro__text { margin-top: clamp(24px, 3vw, 40px); }
.intro__body .principles { margin-top: auto; padding-top: clamp(28px, 3.5vw, 48px); }
@media (max-width: 900px) { .intro__body .principles { margin-top: 28px; padding-top: 0; } }
.intro__title { font-size: clamp(36px, 5.2vw, 78px); }
.intro__text { font-size: clamp(22px, 2.1vw, 31px); line-height: 1.18; max-width: none; }
.intro__body .principles { padding-top: clamp(22px, 2.5vw, 34px); }
.intro__body .principle { padding-top: 20px; }
.intro__body .principle__text { font-size: 14px; }
/* невысокие экраны (ноутбуки): блок «Как я учу» помещается в экран */
@media (max-height: 780px) and (min-width: 901px) {
  .intro { padding-top: 56px; padding-bottom: 56px; gap: 32px 48px; }
  .intro__title { font-size: clamp(34px, 4.2vw, 58px); }
  .intro__text { margin-top: 20px; }
  .intro__text { font-size: clamp(19px, 1.75vw, 25px); }
  .intro__body .principles { padding-top: 20px; }
  .intro__body .principle { padding-top: 16px; }
  .intro__body .principle__title { font-size: clamp(16px, 1.3vw, 19px); margin: 10px 0 6px; }
  .intro__body .principle__text { font-size: 13px; line-height: 1.45; }
  .intro__photo { min-height: 0; }
}

/* невысокие экраны: блок «Тренер» помещается в экран (правила после базовых, чтобы иметь приоритет) */
@media (max-height: 780px) and (min-width: 901px) {
  .coach { padding-top: 56px; padding-bottom: 56px; }
  .coach__name { font-size: clamp(30px, 3.8vw, 52px); }
  .coach__text { font-size: 14px; }
  .coach__text p + p { margin-top: 10px; }
  .tl { padding: 14px 0; }
  .tl__text { font-size: 12.5px; line-height: 1.4; }
}

/* ---------- тренер: фамилия крупно, имя и отчество второй строкой ---------- */
.coach__surname { display: block; }
.coach__given { display: block; font-size: .5em; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: .12em; color: var(--acc); }
.intro__title { white-space: nowrap; }
@media (max-width: 900px) { .intro__title { white-space: normal; } .intro__photo { max-height: 52vh; } }
/* принципы: ровный отступ от линии, без лишнего воздуха сверху */
.intro__body .principles { margin-top: 26px; padding-top: 0; }
.intro__body .principle { padding-top: 20px; }
@media (max-height: 780px) and (min-width: 901px) { .intro__body .principles { margin-top: 20px; padding-top: 0; } .intro__body .principle { padding-top: 16px; } }
/* программы: заголовок в две строки, подпись в правом углу, как в остальных блоках */
.programs__head { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px 48px; }
.programs__title { white-space: nowrap; }
.programs__note { justify-self: end; text-align: right; max-width: 420px; }
@media (max-width: 900px) { .programs__note { justify-self: start; text-align: left; } }
@media (max-width: 1100px) { .programs__title { white-space: normal; } }
/* ---------- тренер: слова тренера оформлены как цитата ---------- */
.coach__quote { margin: 8px 0 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--acc); }
.coach__quote p { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.3; letter-spacing: -.015em; color: var(--fg); }
.coach__quote p::before { content: '«'; } .coach__quote p::after { content: '»'; }
.coach__quote cite { display: block; margin-top: 10px; font-style: normal; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
@media (max-height: 780px) and (min-width: 901px) { .coach__quote p { font-size: clamp(16px, 1.2vw, 19px); } .coach__quote cite { margin-top: 8px; } }
/* невысокие экраны: блок «Тренер» с цитатой помещается в экран */
@media (max-height: 780px) and (min-width: 901px) {
  .coach { padding-top: 44px; padding-bottom: 44px; }
  .coach__text { margin-top: 14px; gap: 10px; font-size: 13.5px; }
  .coach__quote { padding: 2px 0 2px 18px; }
  .coach__quote p { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.28; }
  .coach__quote cite { margin-top: 6px; }
  .tl { padding: 11px 0; }
  .tl__text { font-size: 12px; line-height: 1.38; }
}
.coach__quote cite a { color: var(--fg-3); text-decoration: none; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.coach__quote cite a:hover { color: var(--acc); border-bottom-color: var(--acc); }

/* ---------- вопросы + фото из архива: вопросы слева, мозаика справа ---------- */
.faq { grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; } /* фото слева и крупнее, вопросы справа */
.faq .faq__title { font-size: clamp(34px, 4.4vw, 68px); letter-spacing: -.04em; line-height: .98; margin-top: 12px; }
.faq .faq__head { padding-bottom: 22px; }
.faq .faq__item summary { padding: 17px 0; font-size: clamp(17px, 1.45vw, 22px); }
.faq .faq__item summary::after { width: 36px; height: 36px; font-size: 18px; }
.faq .faq__body p { padding: 0 48px 20px 0; }
.faq__main { min-width: 0; }
.faq__photos { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 120px; min-width: 0; } /* фото остаются на экране, пока читают вопросы */
.faq__nav { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; align-self: flex-end; } /* те же две кнопки, что в галерее; счётчик слева от них */
.faq__page { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--fg-3); font-variant-numeric: tabular-nums; margin-right: 10px; }
.faq__page b { font-weight: 500; color: var(--fg); }
.faq__hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); line-height: 1.7; }
.faq__link { color: var(--acc); text-decoration: none; border-bottom: 1px solid rgba(127, 217, 255, .35); white-space: nowrap; }
.faq__link:hover { border-bottom-color: var(--acc); }
/* мозаика: сетка 6×2, у каждой группы свой набор плиток разного размера; группы лежат друг на друге, видна одна */
.wall { position: relative; display: grid; overflow: hidden; border-radius: 6px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wall__page { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(130px, 14.6vw, 232px); gap: 12px; }
.wall__page:not(.is-on) { visibility: hidden; pointer-events: none; }
.wall__tile { position: relative; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); padding: 0; margin: 0; cursor: pointer; color: inherit; }
.wall__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.wall__tile--a { grid-column: 1 / 4; grid-row: 1 / 3; }   /* большой вертикальный */
.wall__tile--b { grid-column: 4 / 7; grid-row: 1; }       /* широкий */
.wall__tile--c { grid-column: 4 / 6; grid-row: 2; }       /* средний */
.wall__tile--d { grid-column: 6 / 7; grid-row: 2; }       /* узкий вертикальный */
.wall__tile--w { grid-column: 4 / 7; grid-row: 2; }       /* широкий нижний (группа из трёх) */
.wall__tile:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (max-width: 900px) {
  .faq { grid-template-columns: 1fr; gap: 32px; }
  .faq__photos { gap: 12px; position: static; order: 2; }
  .wall__page { grid-auto-rows: clamp(120px, 26vw, 226px); gap: 8px; }
}

/* ---------- лайтбокс ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(4, 18, 32, .94); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 24px; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lightbox__fig img { max-width: min(100%, 1400px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__cap { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.lightbox__cap span:last-child { color: var(--fg-3); }
.lightbox__nav, .lightbox__close { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); color: var(--fg); background: rgba(6, 26, 43, .6); font-size: 20px; display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.lightbox__nav:hover, .lightbox__close:hover { background: var(--fg); color: var(--bg-2); border-color: var(--fg); }
.lightbox__nav--prev { justify-self: start; } .lightbox__nav--next { justify-self: end; }
.lightbox__close { position: absolute; top: 20px; right: 20px; }
@media (max-width: 900px) {
  .lightbox { grid-template-columns: 1fr; padding: 16px; }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__nav--prev { left: 20px; } .lightbox__nav--next { right: 20px; }
  .lightbox__fig img { max-height: calc(100vh - 170px); }
}
/* галерея: бесконечная лента (makeLoop), без нативного скролла и snap */
.results__viewport { overflow: hidden; scroll-snap-type: none; }
.results__track { will-change: transform; }
.card { scroll-snap-align: none; }
.results__btn:disabled { opacity: 1; pointer-events: auto; }

/* ---------- мобильная адаптация: цифры ---------- */
@media (max-width: 600px) {
  /* две колонки, карточки без пустоты: индекс, число, подпись */
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat, .stat:nth-child(3n) { min-height: 0; padding: 18px 16px 20px; border-right: 1px solid var(--line); display: grid; grid-template-rows: auto auto auto; align-content: start; row-gap: 4px; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat__top { display: contents; }
  .stat__idx { order: 1; }
  .stat__num { order: 2; font-size: clamp(40px, 12.5vw, 56px); line-height: 1; margin-top: 6px; }
  .stat__lbl { order: 3; text-align: left; max-width: none; font-size: 12.5px; line-height: 1.35; }
}

/* ---------- мобильная адаптация: кнопка после программ, дорожка, блок записи ---------- */
@media (max-width: 600px) {
  /* кнопка после программ: во всю ширину, текст по центру, как в хиро */
  .programs__cta { gap: 20px; }
  .programs__cta .btn { width: 100%; }

  /* «Путь в 50 метров»: плотнее, дорожка без пустоты под линией */
  .lane .play__head { gap: 22px; margin-bottom: 0; }
  .lane__num { font-size: clamp(60px, 18vw, 92px); }
  .lane__desc { margin-top: 12px; font-size: 17px; }
  .lane__gain { margin-top: 8px; font-size: 14px; gap: 4px 14px; }
  .lane__when { margin-top: 10px; }
  .lane__track { height: 66px; margin-top: 2px; }
  .lane__mark { padding: 30px 10px; }
  .lane__dist { font-size: 10px; letter-spacing: .1em; }
  .lane__swimmer { width: 38px; height: 26px; margin: -19.5px 0 0 -19px; }
  .play { padding-bottom: 4px; }
}
@media (max-width: 900px) {
  /* запись: контакты плитками 2×2, форма в отдельной панели поверх фото */
  .contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .contact, .contact:last-child { padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 18, 31, .6); }
  .contact:hover { padding-left: 16px; }
  .form { padding: 22px 18px 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 18, 31, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .form__submit { width: 100%; justify-self: stretch; }
  .form__ok { background: rgba(4, 18, 31, .78); }
}

/* ---------- мобильная адаптация: шапка программ ---------- */
@media (max-width: 600px) {
  .programs__head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .programs__title { white-space: normal; }
  .programs__note { justify-self: start; text-align: left; max-width: none; }
}

/* ---------- мобильная адаптация: строки программ и дорожка ---------- */
@media (max-width: 900px) {
  /* возраст и подпись одной строкой над названием: колонки не ломаются на «любой возраст» */
  .program { grid-template-columns: 1fr 40px; grid-template-areas: "age arrow" "name arrow" "desc arrow"; gap: 6px 16px; }
  .program__age { display: flex; align-items: baseline; gap: 10px; padding-top: 0; }
  .program__age b { font-size: 26px; }
  .program__age small { margin-top: 0; white-space: nowrap; font-size: 10px; }
  .program__name { margin-top: 2px; }
}
@media (max-width: 600px) {
  /* дорожке больше воздуха: срок, подписи метров и линия не слипаются */
  .lane__gain { margin-top: 10px; }
  .lane__when { margin-top: 18px; }
  .lane__track { height: 88px; margin-top: 6px; }
  .lane__mark { padding: 40px 10px; }
  .play { padding-bottom: 12px; }
}

/* ---------- мобильная адаптация: расстояния между блоками ---------- */
@media (max-width: 600px) {
  :root { --section: 48px; }
  .coach { padding-bottom: 24px; } /* после хронологии сразу галерея, без двойного отступа */
  .results { padding-top: 40px; }
}

/* ---------- мобильная адаптация: «Написать» в такой же панели, как форма ---------- */
@media (max-width: 900px) {
  .cta__col { padding: 22px 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 18, 31, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .cta__col .cta__col-label { margin-bottom: 16px; }
  .contact, .contact:last-child { background: rgba(238, 244, 248, .03); }
}
@media (max-width: 600px) {
  .contact, .contact:last-child { padding: 14px 14px 12px; }
  .contact small { white-space: nowrap; font-size: 10.5px; letter-spacing: .06em; } /* номер в плитке одной строкой */
}

/* ---------- запись: «Написать» и форма в выделенных панелях на всех экранах ---------- */
.cta__col, .form { border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 18, 31, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.form__ok { background: rgba(4, 18, 31, .78); }
.contact:last-child { border-bottom: 0; }
@media (min-width: 901px) {
  .cta__col, .form { padding: 28px 28px 26px; }
  .cta__col .cta__col-label { margin-bottom: 14px; }
  .contact:first-child { border-top: 0; padding-top: 6px; }
  .contact:last-child { padding-bottom: 6px; }
  .contact:hover { padding-left: 10px; }
}
@media (min-width: 901px) {
  /* на десктопе панели едва заметные и ближе друг к другу */
  .cta__grid { gap: 20px; }
  .cta__col, .form { background: rgba(4, 18, 31, .38); border-color: rgba(238, 244, 248, .09); }
}
@media (min-width: 901px) {
  /* панели одной высоты: строки контактов растягиваются на всю панель */
  .cta__grid { align-items: stretch; }
  .cta__col { display: flex; flex-direction: column; }
  .contacts { flex: 1; display: flex; flex-direction: column; }
  .contact { flex: 1; display: flex; align-items: center; }
}

/* ---------- телефон: «Связаться» в шапке рядом с бургером; панели связи как на ПК ---------- */
.nav__cta-m { display: none; }
@media (max-width: 900px) {
  .nav .btn.nav__cta-m { display: inline-flex; padding: 10px 14px; font-size: 11px; letter-spacing: .08em; }
  .nav__right { gap: 6px; }
  .cta__col, .form { background: rgba(4, 18, 31, .5); border-color: rgba(238, 244, 248, .1); }
  .cta__grid { gap: 20px; }
}
/* дорожка: подписи метров дальше от строки срока */
.lane .play__head { margin-bottom: 26px; }

/* ---------- скрытые элементы действительно скрыты: у .form и других есть свой display, атрибут hidden его не перебивал ---------- */
[hidden] { display: none !important; }

/* ---------- запись: панели не шире колонки (WebKit считает минимум по самому длинному пункту select) и «спасибо» во всю панель ---------- */
.cta__grid > *, .form, .form__row, .field, .field select, .field input, .contacts, .contact { min-width: 0; }
.field select { max-width: 100%; }
.form__ok { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }

/* ---------- тренер: фото на телефоне (WebKit при stretch + aspect-ratio давал ширину 0) ---------- */
@media (max-width: 900px) {
  .coach { align-items: start; }
  .coach__photo { width: 100%; height: auto; max-height: none; aspect-ratio: 4 / 5; align-self: start; justify-self: stretch; }
}

/* ---------- iOS: ничего не выезжает за правый край, страницу нельзя сдвинуть вбок ---------- */
html, body { overflow-x: clip; }
.top, .marquee, .cta { overflow-x: clip; }

/* ---------- тач-устройства: первый экран без тяжёлых фильтров ---------- */
@media (hover: none) {
  .hero { filter: none; }
  .hero__line .ch { will-change: auto; }
  html.js .hero__bg img, html.js .hero__media, html.js .hero__gl { filter: none; }
  .nav.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(6, 26, 43, .94); }
  .form, .cta__col, .form__ok { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* кнопка формы на узком телефоне: текст переносится, а не растягивает панель (nowrap давал 348px в колонке 292px) */
.form > * { min-width: 0; }
@media (max-width: 600px) {
  .form__submit { white-space: normal; text-align: center; line-height: 1.35; padding: 14px 22px; }
}
/* поле возраста: без стрелок-счётчика (Safari рисовал их поверх линии) */
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button, .field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* тач: без CSS-фильтра на карточках галереи (Safari перерисовывал их при каждом сдвиге ленты, картинки мигали) */
@media (hover: none) { .card__img img, .intro__photo img, .cta__bg img { filter: none; } }
/* открытое мобильное меню: верхняя кнопка «Записаться» прячется, в меню есть свой пункт */
.nav.is-menu .nav__cta-m { opacity: 0; pointer-events: none; transition: opacity .25s; }
.nav__cta-m { transition: opacity .25s; }

/* подвал на телефоне: адрес строкой с воздухом, копирайт слева, «Наверх» справа кнопкой */
@media (max-width: 600px) {
  .footer { padding-bottom: 32px; }
  .footer__wordmark { margin-bottom: 20px; }
  .footer__row { display: grid; grid-template-columns: 1fr auto; gap: 18px 16px; align-items: center; line-height: 1.8; }
  .footer__row > span:first-child { grid-column: 1 / -1; }
  .footer__up { justify-self: end; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; line-height: 1; }
}
/* тач: буквы заголовка без градиентной маски (Safari перерисовывает её каждый кадр при прокрутке) */
@media (hover: none) {
  .hero__line .ch { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--fg); }
  .hero__title, #heroMedia { will-change: transform, opacity; }
}
/* тач: без серой вспышки при нажатии и без задержки клика */
a, button, summary, .program, .lane__mark, .wall__tile, .card { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wall { touch-action: pan-y; }
