/* ==========================================================================
   Азбука — репетиторский центр. Стили сайта.
   ========================================================================== */

/* ---------- Шрифты (лежат в проекте, без CDN) ---------- */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Токены ---------- */
:root {
  --green: #2c584d;
  --green-deep: #1d3f36;
  --green-line: rgba(252, 250, 237, 0.16);
  --yellow: #febb03;
  --cream: #fcfaed;
  --paper: #f4eed6;
  --ink: #15302a;
  --ink-soft: #4d615a;
  --line: rgba(21, 48, 42, 0.14);
  --error: #ffb4a3;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-text: "Onest", "Segoe UI", Arial, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;
  --radius-lg: clamp(22px, 2.4vw, 32px);
  --radius-md: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.menu-open { overflow: hidden; }

img,
svg,
canvas { display: block; max-width: 100%; }
img { height: auto; }

[hidden] { display: none !important; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }

a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible,
.header:not(.is-solid) :focus-visible { outline-color: var(--yellow); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 16px; top: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 600 17px/1.1 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background-color 0.3s, color 0.3s, box-shadow 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { box-shadow: 0 14px 30px -14px rgba(254, 187, 3, 0.9); }

.btn--green { background: var(--green); color: var(--cream); }
.btn--green:hover { background: var(--green-deep); box-shadow: 0 14px 30px -16px rgba(29, 63, 54, 0.8); }

.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line:hover { background: rgba(252, 250, 237, 0.08); }

.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }

.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--cream);
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s, transform 0.5s var(--ease);
}
/* Над первым экраном: тёмная полупрозрачная подложка, чтобы меню не сливалось с текстом */
.header.is-scrolled {
  background: rgba(29, 63, 54, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 1px 0 var(--green-line);
}
.header.is-solid {
  background: rgba(252, 250, 237, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header.is-menu {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--cream);
  box-shadow: none;
  transform: none;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 600 21px/1 var(--font-display);
  letter-spacing: -0.03em;
}
.logo svg { width: 38px; height: 38px; flex: none; }

.nav {
  display: flex;
  gap: clamp(18px, 2vw, 30px);
  margin-left: auto;
}
.nav a {
  position: relative;
  padding-block: 6px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header__phone {
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.burger {
  display: none;
  position: relative;
  width: 48px; height: 48px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 27px; }
.burger[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }

/* Мобильное меню */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  background: var(--green-deep);
  color: var(--cream);
  overflow-y: auto;
  clip-path: circle(0 at calc(100% - var(--gutter) - 16px) calc(var(--header-h) / 2));
  visibility: hidden;
  transition: clip-path 0.7s var(--ease), visibility 0s 0.7s;
}
.menu.is-open {
  clip-path: circle(160% at calc(100% - var(--gutter) - 16px) calc(var(--header-h) / 2));
  visibility: visible;
  transition: clip-path 0.7s var(--ease), visibility 0s;
}
.menu__links { display: grid; gap: 6px; margin-bottom: auto; }
.menu__links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 8px;
  font: 500 clamp(28px, 8vw, 40px)/1.15 var(--font-display);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.menu__links a span {
  flex: none;
  width: 1.8em;
  font-size: 0.5em;
  color: var(--yellow);
}
.menu__foot { display: grid; gap: 14px; padding-top: 32px; }
.menu__phone { font: 600 22px/1.2 var(--font-text); text-decoration: none; }

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 85% 15%, #3a6d60 0%, rgba(58, 109, 96, 0) 60%),
    linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  color: var(--cream);
}
.hero__field {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
/* Затемнение за текстом, чтобы буквы поля не мешали читать */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(29, 63, 54, 0.82) 0%, rgba(29, 63, 54, 0.5) 38%, rgba(29, 63, 54, 0) 68%),
    linear-gradient(0deg, rgba(29, 63, 54, 0.75) 0%, rgba(29, 63, 54, 0) 45%);
}

.hero__content {
  padding-top: calc(var(--header-h) + 8vh);
  padding-bottom: clamp(40px, 8vh, 88px);
}

.hero__kicker {
  margin-bottom: clamp(12px, 2vh, 24px);
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 500;
  color: rgba(252, 250, 237, 0.78);
}

.hero__title {
  display: flex;
  flex-direction: column;
  font: 600 clamp(60px, 12.4vw, 188px)/0.94 var(--font-display);
  letter-spacing: -0.045em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--accent { color: var(--yellow); }
.hero__char { display: inline-block; will-change: transform, opacity; }

.js .hero__title:not(.is-split) {
  visibility: hidden;
  animation: show-anyway 0s 2.5s forwards;
}
@keyframes show-anyway { to { visibility: visible; } }

.hero__lead {
  max-width: 34em;
  margin-top: clamp(20px, 3.4vh, 36px);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: rgba(252, 250, 237, 0.86);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 4vh, 40px);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(28px, 5vw, 72px);
  margin-top: clamp(36px, 7vh, 72px);
  padding: 22px 0 0;
  border-top: 1px solid var(--green-line);
  list-style: none;
}
.hero__facts li { display: flex; align-items: baseline; gap: 12px; }
.hero__facts b {
  font: 600 clamp(30px, 3vw, 44px)/1 var(--font-display);
  letter-spacing: -0.04em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.hero__facts span {
  max-width: 13em;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(252, 250, 237, 0.7);
}

.js .hero [data-hero-fade] {
  opacity: 0;
  transform: translateY(18px);
}
.hero.is-ready [data-hero-fade] {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}

/* ---------- Бегущая строка ---------- */
.ticker {
  overflow: hidden;
  padding-block: 20px;
  background: var(--yellow);
  color: var(--ink);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}
.ticker__group {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
}
.ticker__group span {
  font: 600 clamp(18px, 2vw, 26px)/1 var(--font-display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ticker__group svg { width: 22px; height: 22px; flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section { padding-block: clamp(88px, 11vw, 168px); }
.section--paper { background: var(--paper); }
.section--green { background: var(--green); color: var(--cream); }

.section__head {
  display: flex;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 28px);
  margin-bottom: clamp(40px, 6vw, 88px);
}

/* Буква раздела: страница читается как азбука, А → З */
.letter {
  display: inline-flex;
  align-items: baseline;
  flex: none;
  font: 700 clamp(76px, 9.5vw, 140px)/0.78 var(--font-display);
  letter-spacing: -0.05em;
  color: var(--yellow);
  text-shadow: 0.03em 0.03em 0 var(--green);
  user-select: none;
}
.letter small {
  margin-left: 0.02em;
  font-size: 0.46em;
  font-weight: 600;
  color: var(--green);
  text-shadow: none;
}
.on-dark .letter { text-shadow: 0.03em 0.03em 0 var(--green-deep); }
.on-dark .letter small { color: var(--cream); }

.section__title {
  padding-bottom: 0.04em;
  font: 600 clamp(32px, 4.8vw, 66px)/1.04 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* ---------- Появление при прокрутке ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="curtain"] {
  opacity: 1;
  transform: none;
  clip-path: inset(100% 0 0 0 round var(--radius-lg));
  transition: clip-path 1.4s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="curtain"].is-in { clip-path: inset(0 0 0 0 round var(--radius-lg)); }
.js [data-reveal="curtain"] img {
  transform: scale(1.2);
  transition: transform 2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="curtain"].is-in img { transform: none; }

/* ---------- А. О центре ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.about__lead {
  max-width: 24em;
  font-size: clamp(22px, 2.1vw, 29px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.about__text {
  max-width: 36em;
  margin-top: 24px;
  color: var(--ink-soft);
}
.facts {
  display: grid;
  gap: 0;
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-soft); }
.facts dd { font-weight: 600; }

.collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  aspect-ratio: 1 / 1.08;
}
.collage__item { position: relative; }
.collage__item > div,
.collage__item img {
  width: 100%;
  height: 100%;
}
.collage__item > div { overflow: hidden; border-radius: var(--radius-lg); }
.collage__item img { object-fit: cover; }
.collage__item--a { grid-column: 1 / 8; grid-row: 1 / 10; }
.collage__item--b { grid-column: 8 / 13; grid-row: 2 / 7; }
.collage__item--c { z-index: 2; grid-column: 6 / 12; grid-row: 8 / 13; }
.collage__item--c > div { box-shadow: 0 0 0 clamp(6px, 0.8vw, 10px) var(--cream); }
.collage__badge {
  position: absolute;
  z-index: 3;
  left: 4%;
  bottom: 2%;
  display: grid;
  place-items: center;
  width: clamp(104px, 11vw, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  text-align: center;
  font: 600 clamp(12px, 1vw, 14px)/1.2 var(--font-text);
  transform: rotate(-8deg);
}
.collage__badge b {
  display: block;
  font: 700 clamp(30px, 3.2vw, 44px)/1 var(--font-display);
  letter-spacing: -0.04em;
}

/* ---------- Б. Услуги ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.services__grid > :nth-child(2) { margin-top: clamp(0px, 6vw, 88px); }

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--cream);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.service::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service:hover::after { opacity: 1; }
.service.is-tilting { transition: transform 0.12s linear, box-shadow 0.6s var(--ease); }
.service:hover { box-shadow: 0 30px 60px -32px rgba(21, 48, 42, 0.45); }

.service--green { background: var(--green); color: var(--cream); }
.service--yellow { background: var(--yellow); }

.service__photo {
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
  border-radius: calc(var(--radius-lg) - 8px);
}
.service__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.service:hover .service__photo img { transform: scale(1.05); }

.service__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(18px, 2vw, 26px) clamp(12px, 1.4vw, 18px) clamp(12px, 1.4vw, 16px);
}
.service__title {
  font: 600 clamp(22px, 2vw, 28px)/1.15 var(--font-display);
  letter-spacing: -0.03em;
}
.service__text {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.55;
  opacity: 0.86;
}
.service__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 22px;
}
.service__tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.service__tags li {
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px currentColor;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
}
.service__price { font-weight: 700; white-space: nowrap; }

/* ---------- В. Почему мы ---------- */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
}
.why__aside {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  align-self: start;
}
.why__aside .section__head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
.why__list { list-style: none; padding: 0; counter-reset: none; }
.why__item {
  padding-block: clamp(26px, 3.6vw, 44px);
  border-top: 1px solid var(--green-line);
  font: 400 clamp(23px, 2.6vw, 38px)/1.22 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--cream);
  transition: color 0.8s var(--ease);
  text-wrap: pretty;
}
.why__item:last-child { border-bottom: 1px solid var(--green-line); }
.js .why__item:not(.is-lit) { color: rgba(252, 250, 237, 0.2); }

/* ---------- Г. Цены ---------- */
.tabs__list {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border-radius: 30px;
  background: var(--paper);
}
.tabs__tab {
  position: relative;
  z-index: 1;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.4s var(--ease);
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab[aria-selected="true"] { color: var(--cream); }
.tabs__pill {
  position: absolute;
  top: 0; left: 0;
  border-radius: 999px;
  background: var(--green);
  transition: transform 0.55s var(--ease), width 0.55s var(--ease), height 0.55s var(--ease);
}
/* Без JS все программы видны сразу, а переключатель не нужен */
html:not(.js) .tabs__list { display: none; }

.price-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(32px, 4vw, 56px);
}
.price-panel.is-shown { animation: panel-in 0.7s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } }

.price-panel__title {
  font: 600 clamp(22px, 2vw, 28px)/1.2 var(--font-display);
  letter-spacing: -0.03em;
}
.price-panel__text { max-width: 34em; margin-top: 16px; color: var(--ink-soft); }
.price-panel__text + .btn { margin-top: 28px; }

.price-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.price-card--accent { background: var(--yellow); }
.price-card__label { font-weight: 600; }
.price-card__value {
  margin-top: auto;
  padding-top: 24px;
  font: 600 clamp(40px, 4.6vw, 64px)/1 var(--font-display);
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.price-card__value small {
  margin-left: 0.1em;
  font-size: 0.5em;
  letter-spacing: 0;
}
.price-card__unit { font-size: 15px; color: var(--ink-soft); }
.price-card--accent .price-card__unit { color: var(--ink); opacity: 0.75; }

.discounts {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 0;
  list-style: none;
}
.discounts li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--line);
}
.discounts b {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font: 600 16px/1 var(--font-display);
  letter-spacing: -0.02em;
}
.discounts__note { grid-column: 1 / -1; font-size: 15px; color: var(--ink-soft); }

/* ---------- Д. Как проходят занятия ---------- */
.gallery { position: relative; background: var(--paper); }
.gallery__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  padding-top: var(--header-h);
}
.gallery .section__head { margin-bottom: clamp(28px, 4vh, 48px); }
.gallery__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  width: max-content;
  padding-inline: var(--gutter);
  padding-bottom: 72px;
  list-style: none;
  margin: 0;
  will-change: transform;
}
.gallery__item { flex: none; width: clamp(240px, min(26vw, 36vh), 400px); }
.gallery__item:nth-child(even) { transform: translateY(56px); }
.gallery__item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--cream);
}
.gallery__item figcaption {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Без горизонтальной прокрутки-по-скроллу (телефон, «уменьшить движение») */
.gallery.is-static { padding-block: clamp(88px, 11vw, 168px); }
.gallery.is-static .gallery__sticky {
  position: static;
  height: auto;
  padding-top: 0;
  overflow: visible;
}
.gallery.is-static .gallery__track {
  width: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-bottom: 24px;
  transform: none !important;
  scrollbar-width: thin;
}
.gallery.is-static .gallery__item { scroll-snap-align: start; width: min(72vw, 320px); }
.gallery.is-static .gallery__item:nth-child(even) { transform: none; }

/* ---------- Е. Отзывы ---------- */
.reviews__stage { display: grid; }
.review {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease), visibility 0s 0.6s;
}
.review.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.8s var(--ease) 0.15s, transform 1s var(--ease) 0.15s, visibility 0s;
}
.review blockquote {
  position: relative;
  max-width: 26em;
  font: 300 clamp(24px, 3.1vw, 44px)/1.28 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
.review blockquote::before {
  content: "«";
  position: absolute;
  left: -0.62em;
  top: -0.08em;
  color: var(--yellow);
  font-weight: 700;
}
.review figcaption { margin-top: 28px; color: var(--ink-soft); font-weight: 500; }

.reviews__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 56px);
}
.round-btn {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.35s var(--ease);
}
.round-btn:hover { background: var(--green); color: var(--cream); box-shadow: none; }
.round-btn:active { transform: scale(0.94); }
.round-btn svg { width: 22px; height: 22px; }
.reviews__count {
  min-width: 4em;
  margin-left: 8px;
  font: 500 16px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* ---------- Ж. Запись ---------- */
.signup__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 96px);
  padding: clamp(28px, 5.5vw, 80px);
  overflow: hidden;
  border-radius: clamp(26px, 3vw, 44px);
  background: var(--green);
  color: var(--cream);
}
.signup__panel .section__head {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 28px;
}
.signup__panel .section__title { font-size: clamp(30px, 3.6vw, 52px); }
.signup__intro { max-width: 26em; color: rgba(252, 250, 237, 0.84); }
.signup__call { margin-top: 28px; color: rgba(252, 250, 237, 0.7); }
.signup__call a {
  display: inline-block;
  margin-top: 4px;
  color: var(--cream);
  font: 600 clamp(20px, 2vw, 26px)/1.2 var(--font-display);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.signup__call a:hover { color: var(--yellow); }

.form { position: relative; display: grid; gap: 14px; align-content: start; }
.field { position: relative; }
.field input {
  width: 100%;
  height: 66px;
  padding: 24px 20px 8px;
  border: 1.5px solid rgba(252, 250, 237, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(252, 250, 237, 0.06);
  color: var(--cream);
  font-size: 18px;
  font-weight: 500;
  transition: border-color 0.3s, background-color 0.3s;
}
.field input:hover { border-color: rgba(252, 250, 237, 0.4); }
.field input:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(252, 250, 237, 0.1);
}
.field label {
  position: absolute;
  left: 21px;
  top: 22px;
  color: rgba(252, 250, 237, 0.7);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.3s var(--ease), color 0.3s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-12px) scale(0.74);
  color: rgba(252, 250, 237, 0.86);
}
.field input::placeholder { color: transparent; }
.field__hint,
.field__error {
  display: block;
  margin-top: 6px;
  padding-left: 4px;
  font-size: 14px;
  line-height: 1.4;
}
.field__hint { color: rgba(252, 250, 237, 0.6); }
.field__error { color: var(--error); }
.field__error:empty { display: none; }
.field.is-invalid input { border-color: var(--error); }

.check {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(252, 250, 237, 0.8);
  cursor: pointer;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 26px; height: 26px;
  margin: 0;
  border: 1.5px solid rgba(252, 250, 237, 0.4);
  border-radius: 8px;
  background: transparent center / 16px no-repeat;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s;
}
.check input:checked {
  border-color: var(--yellow);
  background-color: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%2315302a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.check a { color: var(--cream); text-underline-offset: 3px; }
.check.is-invalid input { border-color: var(--error); }
.check + .field__error { margin-top: -4px; padding-left: 38px; }

.form__submit { justify-self: start; margin-top: 8px; min-width: 220px; }
.form__submit[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.form__submit .spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(21, 48, 42, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form__status {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 180, 163, 0.14);
  color: var(--cream);
  font-size: 15px;
}
.form__status a { color: var(--yellow); font-weight: 600; }
.form__status:empty { display: none; }

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Успешная отправка */
.success {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  min-height: 100%;
}
.success__mark { width: 96px; height: 96px; }
.success__mark circle { fill: var(--yellow); transform-origin: center; animation: pop 0.7s var(--ease) both; }
.success__mark path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.6s 0.35s var(--ease) forwards;
}
@keyframes pop { from { transform: scale(0.2); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success__title {
  font: 600 clamp(26px, 2.8vw, 38px)/1.1 var(--font-display);
  letter-spacing: -0.03em;
}
.success__text { max-width: 26em; color: rgba(252, 250, 237, 0.84); }

/* ---------- З. Контакты ---------- */
.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: stretch;
}
.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list div { padding-block: 18px; border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 15px; color: var(--ink-soft); }
.contact-list dd {
  margin-top: 4px;
  font: 500 clamp(19px, 1.7vw, 23px)/1.3 var(--font-display);
  letter-spacing: -0.03em;
}
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.contact-list dd small {
  display: block;
  margin-top: 4px;
  font: 400 15px/1.4 var(--font-text);
  letter-spacing: 0;
  color: var(--ink-soft);
}
.contacts__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: var(--ink-soft);
}
.map__placeholder svg { width: 44px; height: 44px; color: var(--green); }

/* ---------- Подвал ---------- */
.footer {
  padding-block: clamp(64px, 8vw, 104px) 32px;
  background: var(--green-deep);
  color: rgba(252, 250, 237, 0.72);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: start;
}
.footer .logo { color: var(--cream); }
.footer__tagline { margin-top: 14px; max-width: 22em; }
.footer__contacts { display: grid; gap: 6px; justify-items: end; text-align: right; }
.footer__contacts a { color: var(--cream); text-decoration: none; font-weight: 500; }
.footer__contacts a:hover { color: var(--yellow); }

.footer__alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 2px clamp(8px, 1.2vw, 16px);
  margin-top: clamp(48px, 7vw, 88px);
  padding: 0;
  list-style: none;
  font: 600 clamp(24px, 3.6vw, 52px)/1.15 var(--font-display);
  letter-spacing: -0.03em;
  color: rgba(252, 250, 237, 0.13);
  user-select: none;
}
.footer__alphabet a {
  display: inline-block;
  color: var(--yellow);
  text-decoration: none;
  transition: transform 0.4s var(--ease), color 0.3s;
}
.footer__alphabet a:hover { color: var(--cream); transform: translateY(-4px); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--green-line);
  font-size: 15px;
}
.footer__bottom a { color: inherit; text-underline-offset: 3px; }
.footer__bottom a:hover { color: var(--cream); }

/* ---------- Текстовые страницы (политика) ---------- */
.page { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 104px)); padding-bottom: clamp(72px, 10vw, 140px); }
.page__title {
  max-width: 16em;
  font: 600 clamp(34px, 5vw, 64px)/1.05 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.prose { max-width: 42em; margin-top: clamp(32px, 4vw, 56px); }
.prose h2 {
  margin-top: 2.2em;
  font: 600 clamp(21px, 1.8vw, 25px)/1.25 var(--font-display);
  letter-spacing: -0.03em;
}
.prose p, .prose ul { margin-top: 1em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose .todo { padding: 0 6px; border-radius: 6px; background: var(--yellow); }

/* ---------- 404 ---------- */
.notfound { align-items: center; }
.notfound .hero__content { padding-block: calc(var(--header-h) + 40px) 64px; }
.notfound__code {
  font: 700 clamp(120px, 24vw, 320px)/0.8 var(--font-display);
  letter-spacing: -0.06em;
  color: var(--yellow);
}
.notfound__title {
  margin-top: 28px;
  font: 600 clamp(28px, 3.6vw, 48px)/1.1 var(--font-display);
  letter-spacing: -0.035em;
}
.notfound__text { max-width: 30em; margin-top: 16px; color: rgba(252, 250, 237, 0.84); }
.notfound .btn { margin-top: 32px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1120px) {
  .nav, .header__phone { display: none; }
  .burger { display: block; }
  .header .btn { margin-left: auto; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  body { font-size: 17px; }

  .about__grid,
  .why__grid,
  .price-panel,
  .signup__panel,
  .contacts__grid { grid-template-columns: minmax(0, 1fr); }

  .collage { max-width: 560px; }

  .services__grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .services__grid > :nth-child(2) { margin-top: 0; }

  .why__aside { position: static; }
  .why__aside .section__head { flex-direction: row; align-items: flex-end; }

  .footer__top { grid-template-columns: minmax(0, 1fr); }
  .footer__contacts { justify-items: start; text-align: left; }

  .map { min-height: 340px; }
}

@media (max-width: 700px) {
  /* Текст занимает всю ширину — затемняем снизу вверх, а не слева */
  .hero::after {
    background: linear-gradient(0deg, rgba(29, 63, 54, 0.92) 0%, rgba(29, 63, 54, 0.7) 55%, rgba(29, 63, 54, 0.05) 88%);
  }
}

@media (max-width: 600px) {
  .header .btn { display: none; }
  .burger { margin-left: auto; }

  .hero__facts { gap: 14px 24px; }
  .hero__facts li { flex-direction: column; gap: 4px; }
  .hero__actions .btn { flex: 1 1 auto; }

  .section__head { gap: 12px; }

  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  .tabs__list { display: flex; border-radius: 24px; }
  .tabs__tab { flex: 1 1 auto; padding: 12px 16px; font-size: 15px; }

  .price-cards { grid-template-columns: minmax(0, 1fr); }

  .review blockquote { padding-left: 0.1em; }
  .review blockquote::before { position: static; display: block; margin-bottom: -0.2em; font-size: 1.6em; line-height: 1; }

  .form__submit { justify-self: stretch; }
}

/* ---------- Уменьшенное движение ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal],
  .js .hero [data-hero-fade] { opacity: 1; transform: none; }
  .js [data-reveal="curtain"] { clip-path: none; }
  .js [data-reveal="curtain"] img { transform: none; }
  .ticker__track { animation: none; }
}
