/* ================= шапка ================= */
.site-header {
  position: sticky; top: 0; z-index: 60;
  transition: background-color var(--tr-fast), box-shadow var(--tr-fast);
}
.site-header.is-stuck { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); box-shadow: var(--sh-sm); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-4); padding-block: var(--s-3); }
.logo {
  font-family: var(--f-head); font-weight: 400; font-size: 1.375rem; letter-spacing: .02em;
  color: var(--c-ink); text-decoration: none;
}
.logo b { font-weight: 800; color: var(--c-orange); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--s-4); }
.site-nav a { color: var(--c-ink-soft); text-decoration: none; font-size: var(--t-small); font-weight: 500; }
.site-nav a:hover { color: var(--c-link); }
.site-header .btn { flex: 0 0 auto; }
.nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; border-radius: var(--r-sm); }
.nav-toggle svg { margin-inline: auto; }

@media (max-width: 859px) {
  .nav-toggle { display: block; }
  .site-header .site-header__inner > .btn { display: none; }
  .site-nav {
    position: fixed; inset: 0; z-index: 65; margin: 0;
    display: none; background: var(--c-white); padding: var(--s-6) var(--gutter);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--s-4); margin-top: var(--s-7); }
  .site-nav a { font-size: var(--t-h3); font-family: var(--f-head); font-weight: 700; color: var(--c-ink); }
  .site-nav .btn { margin-top: var(--s-5); width: 100%; }
  .nav-close { position: absolute; top: var(--s-4); right: var(--gutter); width: 44px; height: 44px; }
}
@media (min-width: 860px) { .site-nav .btn, .nav-close { display: none; } }

/* ================= первый экран ================= */
.hero { position: relative; background: var(--g-hero); padding-block: clamp(2.5rem, 6vw, 5rem) clamp(5rem, 10vw, 8rem); overflow: hidden; margin-top: calc(-1 * (44px + var(--s-6))); padding-top: calc(44px + var(--s-6) + clamp(2rem, 5vw, 4rem)); }
.hero__inner { position: relative; z-index: 2; display: grid; gap: var(--s-6); align-items: center; }
.hero h1 { margin-block: var(--s-3); }
.hero__lead { max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-5); }
.hero__proof { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-5); font-size: var(--t-small); color: var(--c-ink-soft); }
.avatars { display: flex; }
.avatars i {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-blue-600); color: var(--c-white); font-style: normal; font-weight: 600; font-size: var(--t-small);
  border: 2px solid var(--c-white); margin-left: -10px;
}
.avatars i:first-child { margin-left: 0; }
.avatars i:nth-child(2) { background: var(--c-orange); }
.avatars i:nth-child(3) { background: var(--c-blue-800); }
.avatars i:nth-child(4) { background: var(--c-blue-400); }

.hero__badges { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.hero__badge { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--c-ink); font-weight: 500; }

.hero__media { position: relative; }
.hero__photo {
  width: 100%; border-radius: var(--r-lg);
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}
/* TODO: заменить на PNG Дохёна, вырезанный по контуру (см. Картинки_промты.md, п.1),
   тогда убрать border-radius и маску — фото должно стоять поверх градиента без рамки. */
.hero__note {
  position: absolute; left: -4%; bottom: 12%;
  background: var(--c-white); border-radius: var(--r-md); padding: var(--s-3) var(--s-4);
  box-shadow: var(--sh-md); max-width: 15rem;
}
.hero__note span { display: block; font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em; color: var(--c-orange-btn); font-weight: 700; }
.hero__note strong { display: block; font-family: var(--f-head); font-weight: 700; color: var(--c-ink); line-height: 1.25; margin-top: .25rem; }

.hero__brush { top: 6%; right: -8%; width: min(40%, 380px); opacity: .6; }
.hero__dots { left: -1.5rem; bottom: 18%; width: 120px; height: 120px; }
.hero__vertical { top: 22%; right: var(--gutter); color: var(--c-blue-400); }
.hero__vertical .vertical-kr { font-size: 20px; opacity: .55; }
.hero__vertical small { font-size: var(--t-micro); opacity: .45; }

@media (min-width: 860px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: var(--s-7); }
}
@media (max-width: 559px) {
  /* на телефоне столбец жмётся к самому краю, чтобы не лезть на текст */
  .hero__vertical { right: .15rem; top: 30%; }
  .hero__vertical .vertical-kr { font-size: 16px; opacity: .38; }
  .hero__vertical small { display: none; }
  .hero__note { left: 0; bottom: 4%; }
  .hero__badges { gap: var(--s-3); }
  .circle-badge { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.125rem; }
}

/* ---------- разлёт хангыля ---------- */
.hangul-field { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hangul {
  position: absolute; font-family: var(--f-kr); font-weight: 700; line-height: 1;
  will-change: transform, opacity; user-select: none;
  transform: translate3d(0,0,0);
}
.hangul--outline { -webkit-text-stroke: 2px currentColor; color: transparent; }
@media (prefers-reduced-motion: reduce) { .hangul { transition: none; } }

/* ================= проблема ================= */
.problem { background: var(--c-white); }
.problem__grid { display: grid; gap: var(--s-4); }
.problem__note { margin-top: var(--s-5); font-weight: 500; color: var(--c-ink); }
@media (min-width: 560px) { .problem__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .problem__grid { grid-template-columns: repeat(3, 1fr); } }
.problem__dots { right: -1rem; top: 12%; width: 140px; height: 100px; }

/* ================= как устроена группа ================= */
.group { position: relative; overflow: hidden; }
.group__grid { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
@media (min-width: 560px) { .group__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .group__grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-lg); padding: var(--s-5); backdrop-filter: blur(2px);
  transition: transform var(--tr-fast), background-color var(--tr-fast);
}
.tile:hover { transform: translateY(-5px); background: rgba(255,255,255,.16); }
.tile h3 { margin-bottom: var(--s-2); }
.tile p { color: rgba(255,255,255,.92); }

.lesson { margin-top: var(--s-7); }
.lesson__list { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
@media (min-width: 860px) { .lesson__list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 859px) {
  .lesson__list { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s-3); }
  .lesson__step { scroll-snap-align: start; }
}
.lesson__step { background: rgba(255,255,255,.10); border-radius: var(--r-md); padding: var(--s-4); }
.lesson__num { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.lesson__num b { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; color: var(--c-orange); }
.lesson__num .vertical-kr { font-size: 13px; color: var(--c-orange); letter-spacing: .1em; }
.lesson__time { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--c-blue-200); font-weight: 600; }
.lesson__step h3 { font-size: var(--t-body); margin-block: .25rem var(--s-2); }
.group__vertical { top: 18%; left: calc(var(--gutter) / 2); color: var(--c-blue-200); }
.group__vertical .vertical-kr { font-size: 18px; opacity: .72; }
.group__vertical small { font-size: var(--t-micro); opacity: .55; }
@media (max-width: 1100px) { .group__vertical { display: none; } }
.group__cta { margin-top: var(--s-6); }

/* ================= цены ================= */
.prices__grid { display: grid; gap: var(--s-4); margin-top: var(--s-6); align-items: start; }
@media (min-width: 560px) { .prices__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1120px) { .prices__grid { grid-template-columns: 1.25fr 1fr 1fr; } }
.price-card { display: flex; flex-direction: column; gap: var(--s-3); height: 100%; }
.price-card ul { display: grid; gap: var(--s-2); font-size: var(--t-small); }
.price-card li { display: flex; gap: var(--s-2); }
.price-card li::before { content: "—"; color: var(--c-orange); }
.price-card__price { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--c-line); }
.price-card__main { font-family: var(--f-head); font-weight: 800; font-size: var(--t-h2); color: var(--c-ink); line-height: 1.1; }
.price-card__sub { font-size: var(--t-small); color: var(--c-ink-faint); }
.price-card__alt { margin-top: var(--s-2); font-weight: 600; color: var(--c-ink); }
.price-card__save { font-size: var(--t-small); color: var(--c-orange-btn); font-weight: 600; }
.price-card .btn { width: 100%; }
.prices__rules { margin-top: var(--s-5); font-size: var(--t-small); color: var(--c-ink-faint); display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.prices__rules p { max-width: 70ch; margin: 0; }
.prices__plan { margin-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.prices__plan .field__hint { font-size: var(--t-micro); }

/* ================= автор ================= */
.author { position: relative; overflow: hidden; }
.author__inner { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 860px) { .author__inner { grid-template-columns: .85fr 1.15fr; gap: var(--s-7); } }
.author__media { position: relative; }
.author__brush { left: -8%; top: -6%; width: 118%; }
.author__photo { position: relative; z-index: 1; width: 100%; border-radius: var(--r-lg); }
.author__stats { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-5); }
.author p + p { margin-top: var(--s-3); }

/* ================= одна система ================= */
.system__grid { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
@media (min-width: 560px) { .system__grid { grid-template-columns: repeat(2, 1fr); } }
.system__note { margin-top: var(--s-5); font-weight: 500; color: var(--c-ink); }

/* ================= доверие ================= */
.trust__grid { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
@media (min-width: 560px) { .trust__grid { grid-template-columns: repeat(2, 1fr); max-width: 720px; } }
.proof { padding: 0; overflow: hidden; text-align: left; width: 100%; display: block; background: var(--c-white); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: transform var(--tr-fast), box-shadow var(--tr-fast); }
.proof:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.proof img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.proof span { display: block; padding: var(--s-3) var(--s-4); font-weight: 600; color: var(--c-ink); font-size: var(--t-small); }

/* ================= заявка ================= */
.apply__card { background: var(--c-white); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: clamp(1.5rem, 4vw, 3rem); max-width: 760px; margin-inline: auto; }
.apply__head { max-width: 760px; margin-inline: auto; margin-bottom: var(--s-5); text-align: center; }
.apply__head p { margin-inline: auto; }
.apply__points { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-4); }
.apply__points li { display: flex; align-items: center; gap: .5rem; font-size: var(--t-small); color: var(--c-ink); }
.apply__points li::before {
  content: ""; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%;
  background: var(--c-orange-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DA6A0E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.apply__fallback { margin-top: var(--s-4); font-size: var(--t-small); color: var(--c-ink-faint); }

/* ================= FAQ ================= */
.faq__list { margin-top: var(--s-5); }

/* ================= финальный CTA и подвал ================= */
.final { position: relative; overflow: hidden; text-align: center; }
.final .container { position: relative; z-index: 2; }
.final h2 { margin-bottom: var(--s-3); }
.final p { margin-inline: auto; }
.final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); margin-top: var(--s-5); }
.final__brush { right: -4%; top: -10%; width: min(42%, 380px); opacity: .55; }
.final__vertical { top: 20%; left: var(--gutter); color: var(--c-blue-200); }
.final__vertical .vertical-kr { font-size: 18px; opacity: .7; }
.final__vertical small { font-size: var(--t-micro); opacity: .5; }
@media (max-width: 559px) { .final__vertical { display: none; } }

.site-footer { background: var(--c-blue-950); color: rgba(255,255,255,.72); padding-block: var(--s-6); font-size: var(--t-small); }
.site-footer__inner { display: grid; gap: var(--s-5); }
@media (min-width: 860px) { .site-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer .logo { color: var(--c-white); }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: var(--c-white); }
.site-footer ul { display: grid; gap: var(--s-2); }
.site-footer__brand { display: flex; align-items: flex-start; gap: var(--s-3); }
.site-footer__brand .vertical-kr { font-size: 18px; color: var(--c-blue-200); pointer-events: auto; }
.site-footer__legal { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid rgba(255,255,255,.14); font-size: var(--t-micro); color: rgba(255,255,255,.55); display: grid; gap: var(--s-1); }

/* ================= страница «группа» ================= */
.page-hero { background: var(--g-hero); position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 5.5rem); }
.page-hero .container { position: relative; z-index: 2; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-5); }
.table-wrap { overflow-x: auto; margin-top: var(--s-5); border-radius: var(--r-md); box-shadow: var(--sh-sm); background: var(--c-white); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: var(--t-small); }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line); vertical-align: top; }
th { font-family: var(--f-head); font-weight: 700; color: var(--c-ink); background: var(--c-blue-050); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.checklist { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.checklist li { display: flex; gap: var(--s-2); align-items: flex-start; }
.checklist li::before {
  content: ""; width: 20px; height: 20px; flex: 0 0 20px; margin-top: .25rem; border-radius: 50%;
  background: var(--c-orange-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DA6A0E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.rules { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
@media (min-width: 860px) { .rules { grid-template-columns: repeat(2, 1fr); } }

/* ================= страница благодарности ================= */
.thanks { min-height: 70vh; display: grid; place-items: center; background: var(--g-hero); position: relative; overflow: hidden; }
.thanks .container { position: relative; z-index: 2; text-align: center; }
.thanks__mark { width: 84px; height: 84px; margin: 0 auto var(--s-4); border-radius: 50%; background: var(--c-white); display: grid; place-items: center; box-shadow: var(--sh-md); }
.thanks p { margin-inline: auto; }
.thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); margin-top: var(--s-5); }

/* ================= кит компонентов ================= */
.kit__row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-5); }
.kit__swatch { width: 96px; }
.kit__swatch i { display: block; height: 56px; border-radius: var(--r-sm); box-shadow: var(--sh-sm); }
.kit__swatch span { font-size: var(--t-micro); color: var(--c-ink-faint); }

/* цвета букв хангыля (никаких inline style — их режет CSP) */
.hangul--blue-600 { color: var(--c-blue-600); }
.hangul--blue-400 { color: var(--c-blue-400); }
.hangul--orange   { color: var(--c-orange); }

/* образцы цвета для _kit.html */
.kit-blue-950 { background: var(--c-blue-950); }
.kit-blue-800 { background: var(--c-blue-800); }
.kit-blue-600 { background: var(--c-blue-600); }
.kit-blue-400 { background: var(--c-blue-400); }
.kit-blue-200 { background: var(--c-blue-200); }
.kit-blue-050 { background: var(--c-blue-050); }
.kit-orange { background: var(--c-orange); }
.kit-orange-deep { background: var(--c-orange-deep); }
.kit-orange-050 { background: var(--c-orange-050); }

/* ===== без JS ===== */
/* буквы позиционируются скриптом — без него прятать, иначе свалятся в угол */
.no-js .hangul-field { display: none; }
@media (max-width: 859px) {
  /* меню раскрывает скрипт; без него показываем ссылки как обычный список */
  .no-js .nav-toggle, .no-js .nav-close { display: none; }
  .no-js .site-nav { position: static; display: block; padding: 0 0 var(--s-3); background: none; width: 100%; }
  .no-js .site-header__inner { flex-wrap: wrap; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }
  .no-js .site-nav a { font-family: var(--f-body); font-size: var(--t-small); font-weight: 500; color: var(--c-ink-soft); }
  .no-js .site-nav .btn { display: none; }
}

/* ================= плавающий видеовиджет ================= */
.video-bubble {
  position: fixed; left: var(--s-4); bottom: var(--s-4); z-index: 76;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.96);
  transition: opacity var(--tr-fast), transform var(--tr-fast), visibility var(--tr-fast);
}
.video-bubble.is-shown { opacity: 1; visibility: visible; transform: none; }
.video-bubble__open {
  position: relative; display: block; width: 132px; height: 132px;
  border-radius: 50%; overflow: hidden; background: var(--c-blue-950);
  box-shadow: var(--sh-lg); border: 3px solid var(--c-white);
  transition: transform var(--tr-fast);
}
.video-bubble__open:hover { transform: scale(1.04); }
.video-bubble__loop { width: 100%; height: 100%; object-fit: cover; }
.video-bubble__play {
  position: absolute; right: 6px; bottom: 30px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-orange); color: var(--c-white); box-shadow: var(--sh-orange);
}
.video-bubble__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem .5rem .5rem;
  background: linear-gradient(to top, rgba(12,36,80,.9), transparent);
  color: var(--c-white); font-size: var(--t-micro); font-weight: 600; text-align: center;
}
.video-bubble__close {
  position: absolute; top: -6px; right: -6px; width: 26px; height: 26px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--c-white); color: var(--c-ink-soft); box-shadow: var(--sh-sm);
}
.video-bubble__close:hover { color: var(--c-ink); }
@media (max-width: 859px) {
  /* снизу живёт липкая кнопка заявки — поднимаем виджет над ней и делаем компактнее */
  .video-bubble { left: var(--s-3); bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  .video-bubble__open { width: 96px; height: 96px; }
  .video-bubble__play { width: 28px; height: 28px; right: 4px; bottom: 24px; }
  .video-bubble__label { font-size: 10px; padding: 1rem .25rem .35rem; }
}

/* видео во всплывающем окне */
.lightbox__video { max-height: 85vh; max-width: min(92vw, 420px); width: 100%; border-radius: var(--r-md); box-shadow: var(--sh-lg); background: #000; }

/* ================= кадры с занятия ================= */
.lesson-shots__grid { max-width: none; }
@media (min-width: 560px) { .lesson-shots__grid { grid-template-columns: repeat(2, 1fr); } }
.lesson-shots .proof img { aspect-ratio: 16 / 10; object-fit: cover; }

/* ================= оценка на Авито ================= */
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); font-size: var(--t-small); }
.rating__stars { color: #FFB800; letter-spacing: .1em; }

/* ================= кнопка «наверх» ================= */
.to-top {
  position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 75;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-white); color: var(--c-blue-600);
  border: 1px solid var(--c-line); box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--tr-fast), transform var(--tr-fast), visibility var(--tr-fast);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-blue-050); }
@media (max-width: 859px) {
  /* на телефоне снизу живёт липкая кнопка заявки — поднимаем «наверх» над ней */
  .to-top { bottom: calc(4.75rem + env(safe-area-inset-bottom)); right: var(--s-3); width: 44px; height: 44px; }
}
