/* ---------- кнопки ---------- */
.btn {
  --bg: var(--c-surface); --fg: var(--c-ink); --bd: var(--c-line);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 52px; padding: 14px 26px;
  border: 2px solid var(--bd); border-radius: 999px; background: var(--bg); color: var(--fg);
  font-weight: 800; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0, 61, 101, .5); }
.btn:active { transform: translateY(0); }
.btn-primary { --bg: var(--c-cta); --fg: #fff; --bd: var(--c-cta); }
.btn-primary:hover { --bg: var(--c-cta-dark); --bd: var(--c-cta-dark); }
.btn-ghost { --bg: transparent; --fg: var(--c-ink); --bd: var(--c-ink); }
.btn-ghost:hover { --bg: var(--c-ink); --fg: #fff; }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn .icon { flex: none; }

/* ---------- карточки ---------- */
.card {
  background: var(--c-surface); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-card); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.icon-badge {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: var(--c-foam); color: var(--c-deep);
}

/* ---------- заголовки секций ---------- */
.section { position: relative; padding-block: clamp(32px, 5vw, 64px); }
.section--foam { background: var(--c-foam); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.section--ink { background: var(--c-ink); color: #fff; border-radius: var(--r-xl); }
.section__head { max-width: 780px; margin-bottom: clamp(20px, 3vw, 36px); }
.section__head p { margin-top: 16px; font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--c-muted); }
.section__cta { margin-top: clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* «Дорожка бассейна» — разделитель-канат с поплавками (фирменный элемент) */
.rope { height: 12px; border-radius: 99px; background:
    repeating-linear-gradient(90deg, var(--c-aqua) 0 26px, #fff 26px 34px, var(--c-ice) 34px 60px, #fff 60px 68px);
  box-shadow: inset 0 -3px 0 rgba(0, 61, 101, .14); }
.rope--thin { height: 8px; }

/* ---------- появление при прокрутке (прогрессивное улучшение) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; transition: background-color .3s, box-shadow .3s, padding .3s; padding-block: 14px; }
.site-header.is-compact { box-shadow: 0 6px 24px -14px rgba(0, 61, 101, .35); padding-block: 8px; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -2; background: rgba(243, 254, 254, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: opacity .3s; pointer-events: none; }
.site-header.is-compact::before { opacity: 1; }
.site-header__bar { display: flex; align-items: center; gap: 20px; }
.logo { flex: none; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-head); font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; line-height: 1; }
.logo small { display: block; font-family: var(--f-body); font-weight: 700; font-size: .62rem; letter-spacing: .02em; color: var(--c-muted); margin-top: 4px; }
.logo svg { width: 42px; height: 42px; flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(10px, 1.6vw, 26px); }
.site-nav a { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 2px; position: relative; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 3px; border-radius: 3px; background: var(--c-aqua); transition: right .3s var(--ease); }
.site-nav a:hover::after { right: 0; }
.site-header__phone { font-weight: 800; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.site-header__cta { white-space: nowrap; }
.burger { display: none; width: 48px; height: 48px; border: 2px solid var(--c-ink); border-radius: 50%; background: transparent; position: relative; flex: none; }
.burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 13px; right: 13px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger::before { top: 16px; } .burger span { top: 22px; } .burger::after { top: 28px; }
.burger[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span { opacity: 0; }
.burger[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
.cta-short { display: none; }

@media (max-width: 1100px) {
  .site-header__phone .phone-text { display: none; }
  .site-header__phone { width: 48px; height: 48px; justify-content: center; border-radius: 50%; background: var(--c-foam); }
}
@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .burger { display: inline-block; }
  .site-header__bar { gap: 10px; }
  .site-header__cta { margin-left: auto; }
  .site-header__phone { display: none; }
  .cta-full { display: none; } .cta-short { display: inline; }
  .site-nav { position: fixed; inset: 0; margin: 0; padding: calc(var(--header-h) + 24px) var(--gutter) 32px; background: var(--c-bg);
    transform: translateY(-102%); transition: transform .45s var(--ease); z-index: -1; overflow-y: auto; }
  .site-nav.is-open { transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; font-family: var(--f-head); font-size: 1.5rem; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
  .site-nav a::after { display: none; }
  .site-nav .nav-phone { display: block; }
}
.nav-phone { display: none; margin-top: 24px; font-weight: 800; font-size: 1.2rem; }

/* ---------- нижняя sticky-плашка (мобильные) ---------- */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  :root { --sticky-h: 72px; }
  .sticky-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; inset: auto 0 var(--cookie-h) 0; height: var(--sticky-h); z-index: 90; padding: 10px var(--gutter);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -8px 24px -12px rgba(0, 61, 101, .3); transition: transform .35s var(--ease);
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .sticky-cta.is-hidden { transform: translateY(120%); }
  .sticky-cta strong { font-family: var(--f-head); font-size: .85rem; line-height: 1.2; }
  .sticky-cta strong span { display: block; font-family: var(--f-body); font-weight: 600; color: var(--c-muted); font-size: .8rem; }
  body { padding-bottom: var(--sticky-h); }
}

/* ---------- cookie ---------- */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95; max-width: 560px; margin-inline: auto;
  background: var(--c-ink); color: #fff; border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 18px 40px -12px rgba(0, 61, 101, .6); font-size: .875rem; line-height: 1.4;
}
.cookie p { flex: 1 1 220px; margin: 0; }
.cookie a { color: var(--c-foam); }
.cookie__btns { display: flex; gap: 8px; flex: none; }
.cookie .btn { min-height: 44px; padding: 8px 18px; font-size: .9rem; }
.cookie .btn-ghost { --fg: #fff; --bd: rgba(255, 255, 255, .55); }
.cookie .btn-ghost:hover { --bg: #fff; --fg: var(--c-ink); }
@media (min-width: 761px) { .cookie { left: 24px; right: auto; bottom: 24px; margin: 0; } }
@media (max-width: 760px) { .cookie { bottom: 0; left: 0; right: 0; max-width: none; border-radius: 20px 20px 0 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); } }

/* шапка шире основного контейнера, чтобы меню не прижималось к логотипу */
.site-header .container { max-width: 1440px; }
@media (max-width: 1320px) {
  .site-header__phone .phone-text { display: none; }
  .site-header__phone { width: 48px; height: 48px; justify-content: center; border-radius: 50%; background: var(--c-foam); }
}

/* ---------- узкие экраны ---------- */
.about__grid > *, .trainer__grid > *, .hero__grid > *, .prices__grid > *, .vosvod > *, .final > *, .step__body, .facts > * { min-width: 0; }
.hero__facts > * { min-width: 0; }
@media (max-width: 480px) {
  .logo { font-size: 1rem; gap: 8px; }
  .logo small { display: none; }
  .logo img { width: 36px; height: 36px; }
  .site-header .btn-sm { padding-inline: 14px; font-size: .88rem; }
  .burger { width: 44px; height: 44px; }
  .burger span, .burger::before, .burger::after { left: 11px; right: 11px; }
  .burger::before { top: 14px; } .burger span { top: 20px; } .burger::after { top: 26px; }
}
@media (max-width: 400px) {
  .logo { font-size: .85rem; gap: 6px; }
  .logo img { width: 32px; height: 32px; }
  .site-header .btn-sm { padding-inline: 12px; font-size: .82rem; }
  .site-header__bar { gap: 8px; }
}
@media (max-width: 760px) { .sticky-cta strong span { display: none; } .sticky-cta strong { font-size: .95rem; } }

/* ---------- мобильные: шапка и нижняя плашка не должны сливаться с белым фоном ---------- */
@media (max-width: 960px) {
  .site-header { box-shadow: 0 6px 24px -14px rgba(0, 61, 101, .35); }
  .site-header::before { opacity: 1; background: var(--c-foam); border-bottom: 1px solid var(--c-line); }
}
@media (max-width: 760px) {
  .sticky-cta { background: var(--c-deep); color: #fff; box-shadow: 0 -8px 24px -10px rgba(0, 61, 101, .55); }
  .sticky-cta strong span { color: var(--c-ice); }
  .sticky-cta .btn-primary:hover { --bg: var(--c-ice); --bd: var(--c-ice); --fg: var(--c-deep); }
}
