/* =====================================================================
   Modern Family Sport — стили сайта
   ФИРМЕННЫЕ ЦВЕТА: замените значения ниже на HEX-коды заказчика (ТЗ 12.1).
   Сейчас стоят временные цвета.
   ===================================================================== */
:root {
  --brand: #0477bd;          /* фирменный синий из логотипа (кнопки, акценты) */
  --brand-dark: #035f97;
  --brand-soft: #e7f2fa;
  --brand-light: #3aa8e6;    /* светлый синий для градиентов */
  --ink: #0f2a44;            /* тёмно-синий (заголовки, подвал) */
  --ink-2: #3b4763;
  --muted: #6b7690;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --line: #e6eaf2;
  --tone-0: #0477bd; --tone-0-soft: #e7f2fa;
  --tone-1: #f07c1e; --tone-1-soft: #fff1e4;
  --tone-2: #18b88a; --tone-2-soft: #e6f8f1;
  --tone-3: #8a5cf6; --tone-3-soft: #f1ecff;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Montserrat", "Inter", system-ui, sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .04), 0 8px 24px rgba(20, 33, 61, .06);
  --shadow-lg: 0 20px 50px rgba(20, 33, 61, .12);
  --header-h: 72px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink-2); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.mt { margin-top: 24px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Иконки ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic-lg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 2px solid transparent; transition: transform .15s, background .2s, color .2s, box-shadow .2s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px var(--brand); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 1em 1.7em; font-size: 1rem; }
.btn-sm { padding: .55em 1em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-sm { gap: 8px; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: .92rem; margin-top: auto; }
.more .ic { transition: transform .2s; }
.more:hover .ic, .card-link:hover .more .ic { transform: translateX(4px); }

/* ---------- Топбар и шапка ---------- */
.topbar { background: var(--ink); color: #c9d1e3; font-size: .82rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar a:hover { color: #fff; }
.topbar .socials { gap: 6px; }
.topbar .soc { width: 26px; height: 26px; background: transparent; color: #c9d1e3; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -12px rgba(20, 33, 61, .2); }
.header-in { display: flex; align-items: center; gap: 16px; height: var(--header-h); max-width: 1400px; }
.topbar-in { max-width: 1400px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); }
.logo img { height: 44px; width: auto; }
.logo .logo-img { width: 46px; height: 46px; border-radius: 50%; }
.header .logo-text, .drawer .logo-text { color: var(--brand); }
.footer .logo-full img { height: auto; width: 230px; max-width: 100%; }
.logo-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: .95rem; line-height: 1.15; max-width: 170px; }
.nav { display: flex; gap: 2px; margin: 0 auto; flex-shrink: 0; }
.header-actions { flex-shrink: 0; }
.nav a { padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.lang a { padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.lang a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.burger { display: none; border: 0; background: var(--bg-soft); width: 44px; height: 44px; border-radius: 12px; place-items: center; color: var(--ink); }
.burger .ic { width: 24px; height: 24px; }

/* ---------- Мобильное меню ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(20, 33, 61, .45); opacity: 0; transition: opacity .25s; }
.drawer.open { opacity: 1; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 100%); background: #fff; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; }
.drawer-top .burger { display: grid; }
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.drawer nav a .ic { color: var(--muted); }
.drawer nav a.active { color: var(--brand); }
.drawer-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.drawer-bottom .lang { align-self: flex-start; }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--bg-soft); }
.sec-head { max-width: 680px; margin-bottom: 32px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }
.split-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; }
.split-head .sec-head { margin-bottom: 0; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 640px; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .85rem; margin-bottom: 18px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft), transparent 60%), radial-gradient(800px 400px at -10% 110%, var(--tone-1-soft), transparent 60%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero h1::after { content: ""; display: block; width: 72px; height: 6px; border-radius: 6px; background: var(--brand); margin-top: 18px; }
.hero .btn-row { margin: 28px 0 24px; }
.hero-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--ink); }
.hero-media { position: relative; }
.hero-blob { position: absolute; inset: 8% -6% -6% 8%; border-radius: 40px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); transform: rotate(4deg); opacity: .9; }
.hero-img { position: relative; aspect-ratio: 4 / 4.4; width: 100%; object-fit: cover; border-radius: 32px; box-shadow: var(--shadow-lg); background: #fff; }
.hero-badge { position: absolute; left: -16px; bottom: 28px; display: flex; align-items: center; gap: 10px; background: #fff; padding: 12px 16px; border-radius: 16px; box-shadow: var(--shadow-lg); font-weight: 700; color: var(--ink); font-size: .92rem; }
.hero-badge .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.hero-badge small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }

/* ---------- Заголовок внутренней страницы ---------- */
.page-head { padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); background: radial-gradient(900px 400px at 90% -20%, var(--brand-soft), transparent 60%), var(--bg-soft); }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }

/* ---------- Сетки и карточки ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.stack { display: grid; gap: 20px; }

.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.section-soft .card { border-color: transparent; }
a.card:hover, .card-link:hover, .card-trainer:not(.is-placeholder):hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card p:last-child { margin-bottom: 0; }
.card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card:has(> .card-media), .card-trainer, .card-post, .card-branch { padding: 0; }
.card:has(> .card-media) .card-body, .card-trainer .card-body, .card-post .card-body, .card-branch .card-body { padding: 20px 22px 22px; }
.card-media { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: 0; }

.tone-0 .ic-lg, .tone-0.prog-top { background: var(--tone-0-soft); color: var(--tone-0); }
.tone-1 .ic-lg, .tone-1.prog-top { background: var(--tone-1-soft); color: var(--tone-1); }
.tone-2 .ic-lg, .tone-2.prog-top { background: var(--tone-2-soft); color: var(--tone-2); }
.tone-3 .ic-lg, .tone-3.prog-top { background: var(--tone-3-soft); color: var(--tone-3); }
.card-aud h3 { margin-bottom: .35em; }
.card-aud p { color: var(--muted); font-size: .95rem; }

.prog-chip { align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 22px 12px; font-weight: 700; color: var(--ink); min-height: 132px; }
.prog-chip .age { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; line-height: 1; }
.prog-chip.tone-0 .age { color: var(--tone-0); } .prog-chip.tone-1 .age { color: var(--tone-1); }
.prog-chip.tone-2 .age { color: var(--tone-2); } .prog-chip.tone-3 .age { color: var(--tone-3); }
.prog-chip .ic-lg { margin-bottom: 6px; }
.prog-chip span:last-child { font-size: .9rem; line-height: 1.25; }

.card-link h3 { margin-bottom: .3em; }
.card-link p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }

.card-prog { gap: 14px; }
.prog-top { display: flex; align-items: baseline; gap: 6px; padding: 18px; border-radius: var(--radius-sm); font-weight: 700; }
.prog-top .age { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.card-special .card-body { padding: 24px 26px 26px; }
.lead-sm { font-weight: 600; color: var(--ink-2); }

.card-trainer .trainer-photo { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.pos { color: var(--brand); font-weight: 700; font-size: .9rem; margin-bottom: .4em; }
.card-trainer .btn { align-self: flex-start; margin-top: 12px; }
.skel { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--line), var(--bg-soft), var(--line)); background-size: 200% 100%; animation: sk 1.6s infinite; margin-top: 8px; }
.skel.short { width: 60%; }
@keyframes sk { to { background-position: -200% 0; } }

.card-post h3 { margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.tag { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-weight: 700; font-size: .78rem; margin-bottom: 6px; }

.card-review { gap: 12px; }
.ic-quote { width: 36px; height: 36px; color: var(--brand); }
.card-review blockquote { margin: 0; font-size: 1rem; color: var(--ink-2); }
.card-review footer { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.card-review footer small { display: block; color: var(--muted); }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); flex: none; }

.card-about h3 { margin-bottom: .4em; }
.card-adv .ic-check { width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--brand); color: #fff; margin-bottom: 12px; }

.card-branch-mini h3 { font-size: 1.05rem; }
.card-branch-mini p { font-size: .9rem; display: flex; align-items: center; gap: 6px; }

.list { margin: 0; padding-left: 1.1em; }
.list li { margin-bottom: .4em; }
.prose p { margin-bottom: 1em; }

/* ---------- Заглушки ---------- */
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 10; width: 100%; color: #9aa5bd; font-weight: 600; font-size: .88rem; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, #f3f5fa 0 14px, #edf0f7 14px 28px); border: 0; }
.ph .ic { width: 40px; height: 40px; }
.hero-img.ph { border-radius: 32px; aspect-ratio: 4 / 4.4; background: repeating-linear-gradient(135deg, #fff 0 16px, #f6f7fb 16px 32px); }
.trainer-photo.ph { aspect-ratio: 4 / 5; }
.rounded-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.soon { display: flex; align-items: center; gap: 14px; padding: 22px 24px; border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; color: var(--muted); font-weight: 600; }
.soon .ic { width: 28px; height: 28px; color: var(--brand); }
.tr-missing { display: inline-block; padding: 1px 8px; border: 1px dashed #e0a100; border-radius: 6px; background: #fff8e1; color: #8a6400; font-size: .85em; font-weight: 600; }

/* ---------- Видео ---------- */
.video-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); box-shadow: var(--shadow-lg); }
.video .ph { height: 100%; aspect-ratio: auto; background: linear-gradient(135deg, #1f2d50, var(--ink)); color: #9fb0d4; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; }
.video-lite, .video-link { position: absolute; inset: 0; border: 0; padding: 0; background: #000; display: grid; place-items: center; color: #fff; font-weight: 700; gap: 8px; }
.video-lite img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.play { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 0 0 10px rgba(4, 119, 189, .25); transition: transform .2s; }
.play .ic { width: 30px; height: 30px; margin-left: 4px; }
.video-lite:hover .play { transform: scale(1.08); }

/* ---------- Фильтры ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Филиалы ---------- */
.branch-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.branch-list { display: grid; gap: 16px; }
.card-branch { cursor: pointer; display: grid; grid-template-columns: 180px 1fr; }
.card-branch .card-media { aspect-ratio: auto; height: 100%; min-height: 100%; }
.card-branch.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.card-branch h3 { font-size: 1.1rem; }
.info { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 8px; font-size: .92rem; }
.info li { display: flex; gap: 10px; align-items: flex-start; }
.info .ic { margin-top: 3px; color: var(--brand); }
.info small { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.map-wrap { position: sticky; top: calc(var(--header-h) + 20px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1.05; background: var(--bg-soft); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Контакты ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; align-items: start; }
.card-sales { background: var(--ink); color: #c9d1e3; border: 0; }
.card-sales h3, .card-sales h4 { color: #fff; }
.card-sales h4 { margin-top: 20px; }
.card-sales .ic-lg { background: rgba(255, 255, 255, .1); color: #fff; }
.card-sales .muted { color: #9fb0d4; }
.big-phone { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.card-sales .big-phone, .big-phone.light { color: #fff; }
.contact-branches { display: grid; gap: 14px; }
.contact-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
.contact-row h3 { margin-bottom: .3em; font-size: 1.05rem; }
.contact-row p { margin: 0 0 .2em; display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: inherit; }
.soc .ic { width: 20px; height: 20px; }
.soc-text { width: auto; padding: 0 12px; font-weight: 700; font-size: .85rem; }

/* ---------- Форма заявки ---------- */
.section-cta { background: var(--bg-soft); }
.lead-card { display: grid; grid-template-columns: 1fr 1.1fr; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.lead-info { padding: clamp(28px, 4vw, 48px); color: #dfe5f2; background: radial-gradient(600px 300px at 0% 0%, rgba(58, 168, 230, .4), transparent 60%), var(--ink); }
.lead-info h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.lead-points { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; }
.lead-points li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; }
.lead-points .ic { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--brand); color: #fff; }
.lead-form { padding: clamp(24px, 4vw, 44px); display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field label b { color: var(--brand); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7690' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field.invalid input, .field.invalid select { border-color: #e5484d; }
.err { color: #d23a3f; font-size: .82rem; min-height: 0; }
.err:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .86rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; padding: 0; flex: none; margin-top: 2px; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--brand); }
.check a { color: var(--brand); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg:empty { display: none; }
.form-msg { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem; }
.form-msg.success { background: var(--tone-2-soft); color: #0d7a5a; }
.form-msg.success small { font-weight: 500; color: #3b7a66; }
.form-msg.error { background: #fdecec; color: #b42328; }

/* ---------- Модальное окно тренера ---------- */
.modal { border: 0; padding: 0; border-radius: 24px; width: min(920px, calc(100% - 24px)); max-height: calc(100% - 24px); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(20, 33, 61, .55); }
.modal-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; padding: 28px; }
.modal-grid .trainer-photo { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-bottom: 16px; }
.modal-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-soft); display: grid; place-items: center; z-index: 2; }
.t-row { margin: 14px 0; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: #aeb9d1; padding: 64px 0 24px; font-size: .92rem; }
.footer h4 { color: #fff; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer li { display: flex; gap: 6px; align-items: flex-start; }
.footer li .ic { margin-top: 4px; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 32px; }
.footer-phone { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: #fff; }
.footer .btn { margin-top: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; font-size: .82rem; }
.muted-light { color: #8f9bb8; }

/* ---------- Настройки блоков из конструктора ---------- */
.blk.bg-white > .section { background: #fff; }
.blk.bg-soft > .section { background: var(--bg-soft); }
.blk.bg-brand > .section { background: var(--brand-soft); }
.blk.bg-dark > .section { background: var(--ink); color: #c9d1e3; }
.blk.bg-dark > .section .sec-head h2, .blk.bg-dark > .section > .container > h2,
.blk.bg-dark .prose h2, .blk.bg-dark .two-col h2, .blk.bg-dark .cta-band h2 { color: #fff; }
.blk.bg-dark .sec-head p, .blk.bg-dark .soon { color: #c9d1e3; }
.blk.bg-dark .soon { background: transparent; border-color: rgba(255, 255, 255, .2); }
.blk.align-center .sec-head, .blk.align-center .prose, .blk.align-center .split-head { text-align: center; margin-left: auto; margin-right: auto; }
.blk.align-center .split-head { flex-direction: column; align-items: center; }
.blk.pad-compact > .section { padding: 36px 0; }
.blk.pad-large > .section { padding: clamp(80px, 11vw, 140px) 0; }
.narrow { max-width: 760px; }
.blk.align-center .narrow { margin: 0 auto; }
.narrow-video { max-width: 960px; margin: 0 auto; }
.two-col.img-left > :last-child { order: -1; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 44px); border-radius: 28px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; opacity: .95; }
.cta-band .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--ink); color: #fff; }
.preview-bar { position: sticky; top: 0; z-index: 90; background: #fff3c4; color: #6b5200; text-align: center; font-size: .85rem; font-weight: 600; padding: 6px 12px; }
.nf { text-align: center; padding: 120px 0; }
.nf h1 { font-size: 6rem; color: var(--brand); }
.nf .lead { margin: 0 auto 24px; }

/* Мобильная нижняя панель */
.mobile-bar { display: none; }

/* ---------- Анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* =====================================================================
   АДАПТИВНОСТЬ
   ===================================================================== */
/* Меню не помещается → «бургер» (класс ставит app.js) */
.nav-tight:not(.nav-collapsed) .header .logo-text { display: none; }
.nav-tight:not(.nav-collapsed) .nav a { padding: 8px 8px; font-size: .85rem; }
.nav-collapsed .nav { display: none; }
.nav-collapsed .burger { display: grid; }

@media (max-width: 1180px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .burger { display: grid; }
}

@media (max-width: 980px) {
  .hero-grid, .two-col, .video-grid, .branch-layout, .contact-grid, .lead-card { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .hero-media { max-width: 520px; margin: 0 auto; width: 100%; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map-wrap { position: relative; top: 0; aspect-ratio: 4 / 3; order: -1; }
  .modal-grid { grid-template-columns: 1fr; }
  .video-grid { gap: 28px; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  body { font-size: 15.5px; padding-bottom: 76px; }
  .container { padding: 0 16px; }
  .topbar { display: none; }
  .hide-sm { display: none; }
  .logo-text { font-size: .82rem; max-width: 130px; }
  .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .card { padding: 18px; }
  .card-aud .ic-lg, .card-link .ic-lg, .card-about .ic-lg { width: 40px; height: 40px; padding: 9px; }
  .card-aud h3, .card-link h3, .card-about h3 { font-size: 1rem; }
  .card-aud p, .card-link p { font-size: .88rem; }
  .prog-chip { min-height: 104px; padding: 14px 8px; }
  .prog-chip .age { font-size: 1.5rem; }
  .prog-chip span:last-child { font-size: .8rem; }
  .split-head { flex-direction: column; align-items: flex-start; }
  .hero .btn-row .btn { width: 100%; }
  .hero-badge { left: 8px; bottom: 16px; }
  .card-branch { grid-template-columns: 1fr; }
  .card-branch .card-media { aspect-ratio: 16 / 9; height: auto; }
  .contact-row { flex-direction: column; align-items: flex-start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-band .btn { width: 100%; }
  .row-2 { grid-template-columns: 1fr; }
  .lead-card { border-radius: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding-top: 44px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(20, 33, 61, .2); }
  .mobile-bar .btn { padding: .85em 1em; }
  .modal-grid { padding: 20px; }
}

@media (max-width: 400px) {
  .grid-4 { grid-template-columns: 1fr; }
  .logo-text { display: none; }
}
