/* Шрифт Nunito размещён на нашем домене (лицензия OFL): без запроса к Google Fonts, не блокирует отрисовку */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("/assets/fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("/assets/fonts/nunito-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; }

:root {
  --brand: #6c4cf5;
  --brand-dark: #4b2fd1;
  --brand-soft: #f1edff;
  --accent: #ffc83d;
  --green: #2fb97a;
  --ink: #1f1b2e;
  --muted: #625d72;
  --line: #e7e3f3;
  --bg: #ffffff;
  --bg-soft: #f8f6ff;
  --dark: #1c1638;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(60, 40, 160, .10);
  --font: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 500 17px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 900; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 780px; }
.center { text-align: center; }
.eyebrow { color: var(--brand); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.h2 { font-size: clamp(28px, 4.2vw, 42px); }
.sub { color: var(--muted); max-width: 640px; margin: 0 auto 32px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none; border: 2px solid var(--brand); cursor: pointer; transition: background .15s, transform .15s; font-family: inherit; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 17px 28px; font-size: 18px; }
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; color: var(--brand); text-decoration: none; letter-spacing: .02em; }
.logo__img { width: 36px; height: auto; }
.footer .logo__img, .logo--light .logo__img { width: 30px; }
.logo--light { color: #fff; }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; font-weight: 700; font-size: 16px; }
.nav a:hover { color: var(--brand); }

/* Круглые кнопки соцсетей и мессенджеров */
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; transition: transform .15s, filter .15s; }
.social:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social--phone { background: #43a047; }
.social--facebook { background: #1877f2; }
.social--instagram { background: radial-gradient(circle at 30% 110%, #fdcb52 0%, #fd5949 40%, #d6249f 65%, #285aeb 100%); }
.social--viber { background: #7360f2; }
.social--whatsapp { background: #25d366; }
.social--telegram { background: #26a5e4; }
.socials--header { display: none; }

/* Мобильное меню */
.burger { margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 12px; }
.burger span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.burger:focus-visible { outline: 3px solid var(--brand); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; padding: 12px 16px 24px; display: grid; gap: 18px; max-height: calc(100vh - 68px); overflow-y: auto; box-shadow: 0 20px 30px rgba(30, 20, 80, .12); }
.mobile-menu[hidden] { display: none; }
.mobile-menu__nav { display: grid; }
.mobile-menu__nav a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.socials--menu { flex-wrap: wrap; gap: 12px; }
.socials--menu .social { width: 46px; height: 46px; }
.socials--menu .social svg { width: 22px; height: 22px; }
.mobile-menu__phone { margin: 0; text-align: center; font-weight: 800; }
.mobile-menu__phone a { color: var(--ink); text-decoration: none; }

@media (max-width: 599px) { .btn--lg { padding: 15px 22px; font-size: 17px; } }
@media (min-width: 1000px) {
  .nav, .socials--header { display: flex; }
  .socials--header { margin-left: 8px; }
  .burger, .mobile-menu { display: none !important; }
}

/* Хиро */
.hero { background: linear-gradient(180deg, var(--brand-soft), #fff 85%); padding: 28px 0 48px; }
.hero__in { display: grid; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5.4vw, 56px); letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 20px; }
.hero__actions .btn { flex: 1 1 260px; }
.hero__trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-weight: 700; font-size: 15px; }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 80% 42%; border-radius: 28px; box-shadow: var(--shadow); background: var(--brand-soft); }
.hero__badge { position: absolute; left: 16px; bottom: 16px; background: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow); font-size: 15px; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 72px; }
  .hero__in { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .hero__media img { aspect-ratio: 1 / 1; max-height: 70vh; object-position: 60% 25%; }
}

/* Секции */
.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--dark); color: #ece9fb; }
.section--dark .eyebrow { color: var(--accent); }
.section--brand { background: var(--brand); color: #fff; }
@media (min-width: 900px) { .section { padding: 88px 0; } }

/* Боли */
.pains { display: grid; gap: 14px; margin: 28px 0; }
.pain { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pain p { margin: 0; font-weight: 700; }
.pain__ico { font-size: 28px; line-height: 1; }
.pains__answer { text-align: center; font-size: 19px; max-width: 640px; margin: 0 auto; }
@media (min-width: 700px) { .pains { grid-template-columns: repeat(2, 1fr); } }

/* Особенности */
.features { display: grid; gap: 16px; margin-top: 32px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 19px; margin-top: 10px; }
.feature p { color: var(--muted); margin: 0; }
.feature__ico { font-size: 30px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }

/* Сплит */
.split { display: grid; gap: 32px; align-items: center; }
.split__media img { border-radius: 28px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.split__text p { color: #cfc9ee; font-size: 18px; }
@media (min-width: 900px) { .split { grid-template-columns: .8fr 1.2fr; gap: 64px; } .split__media img { aspect-ratio: 3 / 4; } }

/* Викладачі */
.teachers { --cols: 2; --gap: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.teachers > .teacher { flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.teacher { text-align: center; background: var(--bg-soft); border-radius: var(--radius); padding: 18px 12px; display: grid; align-content: start; gap: 6px; }
.teacher h3 { font-size: 17px; margin: 4px 0 0; }
.teacher__photo { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 6px; background: var(--brand-soft) center / cover no-repeat; display: grid; place-items: center; color: var(--brand); font-weight: 900; font-size: 28px; }
.teacher__photo.has-img { color: transparent; }
.teacher__uni { color: var(--muted); font-size: 13px; line-height: 1.35; margin: 0; }
.teacher__meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 13px; font-weight: 800; color: var(--ink); }
@media (min-width: 700px) { .teachers { --cols: 3; } .teacher__photo { width: 112px; height: 112px; } }
@media (min-width: 1000px) { .teachers { --cols: 4; --gap: 18px; } .teacher { padding: 22px 16px; } .teacher__uni, .teacher__meta { font-size: 14px; } }

/* Шаги */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 72px; position: relative; display: grid; gap: 4px; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; display: grid; place-items: center; }
.steps span { color: var(--muted); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps li { padding: 70px 20px 22px; } .steps li::before { top: 20px; } }

/* Цены */
.tabs { display: flex; justify-content: center; gap: 8px; margin: 24px auto 28px; background: var(--bg-soft); padding: 6px; border-radius: 999px; width: max-content; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font: 800 16px var(--font); color: var(--muted); cursor: pointer; }
.tab small { display: block; font-weight: 700; font-size: 12px; }
.tab.is-active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.prices { display: grid; gap: 16px; }
.prices[hidden] { display: none; }
.price { position: relative; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 26px 22px; text-align: center; }
.price h3 { font-size: 22px; }
.price__per { font-size: 18px; margin-bottom: 4px; }
.price__per b { font-size: 34px; color: var(--ink); }
.price__total { color: var(--muted); margin-bottom: 18px; }
.price--hit { border-color: var(--brand); box-shadow: var(--shadow); }
.price__tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--ink); font-weight: 900; font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.prices__note { text-align: center; color: var(--muted); margin-top: 22px; }
@media (min-width: 800px) { .prices { grid-template-columns: repeat(3, 1fr); align-items: center; } .price--hit { padding: 34px 22px; } }


/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 16px 32px 16px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 26px; color: var(--brand); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); }

/* Заявка */
.signup { display: grid; gap: 32px; align-items: center; }
.signup__text p { color: #fff; font-size: 18px; }
.signup__alt a { color: #fff; font-weight: 800; }
.form { background: #fff; color: var(--ink); border-radius: 24px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(20, 10, 80, .25); }
.form label { display: grid; gap: 6px; font-weight: 800; font-size: 15px; }
.form input, .form select { font: 600 17px var(--font); padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus { outline: none; border-color: var(--brand); }
.form .is-invalid { border-color: #e5484d; }
.form__legal { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.form__msg { margin: 0; font-weight: 800; text-align: center; }
.form__msg.is-ok { color: var(--green); }
.form__msg.is-err { color: #e5484d; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 900px) { .signup { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Подвал */
.footer { background: var(--dark); color: #bdb6dd; padding: 44px 0 96px; font-size: 15px; }
.footer a { color: #fff; text-decoration: none; }
.footer__in { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer { padding-bottom: 44px; } .footer__in { grid-template-columns: repeat(3, 1fr); } }

/* Липкая кнопка на мобильном */
.sticky-cta { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; text-align: center; background: var(--brand); color: #fff; font-weight: 900; padding: 16px; border-radius: 999px; text-decoration: none; box-shadow: 0 10px 30px rgba(60, 40, 160, .35); transition: transform .25s, opacity .25s; }
.sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* Заготовки, которые нужно заполнить реальными данными. Перед запуском убрать класс .todo */
.todo { outline: 2px dashed #f59e0b; outline-offset: 4px; }

/* Юридические тексты: оферта, политика */
.legal h1 { margin-bottom: 24px; }
.legal h2 { font-size: 20px; margin: 32px 0 12px; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; }
.legal .legal__lang { font-size: 28px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.legal ul { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }

/* Страница оплаты: 4 пакета */
@media (min-width: 640px) { .prices--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .prices--4 { grid-template-columns: repeat(4, 1fr); } }

/* Страницы-сообщения: «Заявку прийнято», «Зв'яжіться з нами» */
.message { padding-block: 24px; }
.message .sub { margin-bottom: 24px; }
.socials--center { justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.socials--center .social { width: 52px; height: 52px; }
.socials--center .social svg { width: 24px; height: 24px; }
.message__phone { font-weight: 800; font-size: 20px; }
.message__phone a { color: var(--ink); text-decoration: none; }

/* Название школы рядом с логотипом в шапке */
.logo__name { font-size: 24px; font-weight: 900; letter-spacing: .03em; color: var(--brand); line-height: 1; }
@media (max-width: 359px) { .logo__name { font-size: 20px; } }

/* Преимущества в первом экране */
.hero__perks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; font-size: clamp(17px, 1.9vw, 20px); font-weight: 700; color: var(--ink); }
.hero__perks li { display: flex; gap: 10px; align-items: flex-start; }
.hero__perks span { flex: 0 0 auto; width: 28px; text-align: center; }
@media (min-width: 600px) and (max-width: 899px), (min-width: 1100px) { .hero__perks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }

.split__text { min-width: 0; }

/* Отзывы: зацикленная галерея в стиле сторис.
   Ширина центральной карточки --w задаётся здесь; положение карточек считает main.js */
.reviews-section { overflow: hidden; }
.player { --w: min(340px, calc(100vw - 104px)); position: relative; margin: 28px auto 24px; }
.player__bars { display: flex; gap: 4px; width: var(--w); margin: 0 auto 12px; }
.player__bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.player__bars i { display: block; height: 100%; width: 0; background: var(--brand); }
.player__stage { position: relative; width: var(--w); aspect-ratio: 489 / 722; margin: 0 auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.slide { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: var(--brand-soft); box-shadow: var(--shadow);
  transition: transform .65s cubic-bezier(.22, .8, .25, 1), opacity .65s ease, filter .65s ease; will-change: transform; }
.player:not(.is-ready) .slide, .player:not(.is-ready) .slide::after { transition: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.slide::after { content: ""; position: absolute; inset: 0; background: rgb(28, 22, 56); opacity: var(--dim, 0); transition: opacity .65s ease; pointer-events: none; }
.slide.is-side { cursor: pointer; }
.slide.is-hidden { pointer-events: none; }
.player__zone { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; background: transparent; cursor: pointer; z-index: 15; }
.player__zone--prev { left: 0; }
.player__zone--next { right: 0; }
.player__zone:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 22px; }
.player__arrow { display: none; position: absolute; top: 50%; z-index: 20; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--brand); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); place-items: center; transform: translateY(-50%); }
.player__arrow:hover { background: var(--brand); color: #fff; }
.player__arrow--prev { left: -20px; }
.player__arrow--next { right: -20px; }
@media (min-width: 900px) { .player { --w: 340px; } .player__arrow { display: grid; } }
@media (min-width: 1200px) { .player { --w: 360px; } }
@media (prefers-reduced-motion: reduce) { .slide, .slide::after { transition: none; } }
details ul { color: var(--muted); padding-left: 22px; margin: 0 0 1em; }
details li { margin-bottom: 4px; }

picture { display: block; }
