/* ============================================================
   CorEd landing v2 — «премиальный» редизайн
   Приёмы взяты из портфолио-шаблона (магнит, marquee, sticky-
   карточки, посимвольный текст, fade-in), но в ФИРМЕННОЙ палитре
   CorEd и на чистом HTML/CSS/JS (без React).
   ============================================================ */

:root {
  --bg: #111111;
  --bg-deep: #0b0b0b;
  --cream: #efeae0;
  --ink: #111111;
  --orange: #d9663c;
  --teal: #1a7373;
  --text-muted: #8d8a82;
  --text-muted-dark: #6f6a60;
  --border-dark: #ffffff26;
  --border-light: #11111126;
  --font: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: clip;
}

#page { overflow-x: clip; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.accent { color: var(--orange); }

/* Градиентный текст для гигантских заголовков (тёплый «металл») */
.hero-heading {
  background: linear-gradient(180deg, #6f6a60 0%, var(--cream) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: 24px 0 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.brand-word { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }

.main-nav { display: flex; gap: 34px; }
.main-nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d7d2c8;
  transition: opacity 0.2s;
}
.main-nav a:hover { opacity: 0.7; }

.header-tools { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--cream);
  padding: 6px 14px;
  font: 600 12px var(--font);
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.lang-switch:hover { border-color: var(--orange); background: #ffffff08; }
.lang-current { color: var(--orange); font-weight: 700; }
.lang-other { color: var(--text-muted); }
.teacher-login-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  font-size: 15px;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.teacher-login-btn:hover { opacity: 1; border-color: var(--orange); }

/* ============================================================
   BUTTONS
   ============================================================ */
/* Плоская сплошная кнопка — тот же язык, что и .btn-solid на текущем сайте */
.btn-contact {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px;
  font: 700 13.5px var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111111;
  cursor: pointer;
  border: 1.5px solid var(--orange);
  background: var(--orange);
  transition: background 0.18s ease, color 0.18s ease;
}
.btn-contact:hover { background: transparent; color: var(--orange); }

/* Призрачная пилюля */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  border-radius: 999px;
  padding: 13px 28px;
  font: 600 13.5px var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  border: 2px solid var(--border-dark);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost:hover { background: #ffffff14; border-color: #ffffff4d; }
.btn-tg-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  padding-bottom: 40px;
}
.hero-top-spacer { flex: 0 0 auto; height: clamp(64px, 9vh, 118px); }

/* Заголовок сидит вне .container (не капается в 1180px) — ему нужна вся
   ширина viewport, иначе на длинной RU-фразе «открытое сообщество» вторая
   строка сама переносится ещё раз и раздувает блок так, что он наезжает
   на портрет снизу. 6.2vw подобран измерением: это максимум, при котором
   самая длинная строка гарантированно помещается в одну строку от 375px
   до широких десктопов (проверено скриптом, не на глаз). */
.hero-heading-wrap { overflow: hidden; padding: 0 20px; }
@media (min-width: 640px) { .hero-heading-wrap { padding: 0 28px; } }
@media (min-width: 1024px) { .hero-heading-wrap { padding: 0 48px; } }
@media (min-width: 1280px) { .hero-heading-wrap { padding: 0 56px; } }

.hero-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
  width: 100%;
  font-size: clamp(1.9rem, 6.2vw, 6.8rem);
  margin-top: 8px;
}
@media (min-width: 768px) { .hero-title { margin-top: 0; } }
/* акцентное слово пробивает градиентную заливку и светится оранжевым */
.hero-title .accent {
  -webkit-text-fill-color: var(--orange);
  color: var(--orange);
  background: none;
}

.hero-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 10;
  /* Портрет квадратный (высота = ширине) — на невысоких экранах (ноутбуки
     720p и ниже) ширину дополнительно ограничивает vh, иначе голова "съедает"
     всю высоту секции и наезжает на заголовок/текст. min() берёт меньшее. */
  width: min(260px, 42vh);
  pointer-events: auto;
}
/* На телефоне голова висит в вертикальном центре секции — там пусто,
   ниже идёт текстовый блок, так что конфликта по высоте нет */
@media (min-width: 640px) {
  .hero-portrait { width: min(340px, 48vh); top: auto; bottom: 0; transform: translateX(-50%); }
}
@media (min-width: 768px) { .hero-portrait { width: min(420px, 50vh); } }
@media (min-width: 1024px) { .hero-portrait { width: min(480px, 52vh); } }
@media (min-width: 1280px) { .hero-portrait { width: min(520px, 54vh); } }
.hero-portrait .magnet,
.hero-portrait .portrait-inner { width: 100%; }
.hero-portrait .portrait-inner { position: relative; }
.hero-portrait img {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* мягкая тень «заземляет» парящую голову на тёмном фоне */
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.5));
}

/* Текст и CTA прижаты к настоящим краям экрана (не к краю .container),
   с шириной, которая математически не может залезть под голову:
   --portrait-half отслеживает половину ширины портрета на каждом брейкпоинте. */
.hero-bottom {
  --portrait-half: 0px; /* на мобильном голова в центре по вертикали — конфликта нет */
  --edge-pad: 20px;
  margin-top: auto;
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--edge-pad) 28px;
}
.hero-bottom-side { max-width: 100%; }
@media (min-width: 640px) {
  .hero-bottom { --portrait-half: 170px; --edge-pad: 28px; }
  .hero-bottom-side { max-width: clamp(150px, calc(50vw - var(--portrait-half) - var(--edge-pad) - 16px), 320px); }
}
@media (min-width: 768px) { .hero-bottom { --portrait-half: 210px; --edge-pad: 40px; } }
@media (min-width: 1024px) { .hero-bottom { --portrait-half: 240px; --edge-pad: 48px; } }
@media (min-width: 1280px) { .hero-bottom { --portrait-half: 260px; --edge-pad: 56px; } }

.hero-eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orange); font-weight: 700; margin-bottom: 14px;
}
.hero-lead {
  color: #d7d2c8;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.35;
  font-size: clamp(0.78rem, 1.3vw, 1.35rem);
}
.hero-ctas { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.hero-vk-note { font-size: 12px; color: var(--text-muted); text-align: right; }
.hero-vk-note a { text-decoration: underline; text-underline-offset: 3px; }
.hero-vk-note a:hover { color: var(--cream); }

@media (max-width: 640px) {
  .main-nav { display: none; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-ctas { align-items: flex-start; }
  .hero-vk-note { text-align: left; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  background: var(--bg);
  padding: 96px 0 40px;
  overflow: hidden;
}
@media (min-width: 640px) { .marquee { padding-top: 128px; } }
@media (min-width: 768px) { .marquee { padding-top: 160px; } }
.marquee-rows { display: flex; flex-direction: column; gap: 12px; }
.marquee-row { display: flex; gap: 12px; width: max-content; will-change: transform; }
/* Плитка-факт: иконка + крупное число + подпись — вместо картинки/скриншота */
.marquee-tile {
  flex: 0 0 auto;
  width: 300px;
  height: 200px;
  border-radius: 16px;
  border: 1px solid var(--border-dark);
  background: #161616;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}
.marquee-tile-icon { width: 34px; height: 34px; color: var(--orange); }
.marquee-tile.is-teal .marquee-tile-icon { color: var(--teal); }
.marquee-tile-value {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--cream);
  line-height: 1;
}
.marquee-tile-label {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 220px;
}
@media (max-width: 640px) {
  .marquee-tile { width: 220px; height: 160px; padding: 18px; gap: 8px; }
  .marquee-tile-icon { width: 28px; height: 28px; }
}

/* Скрыто визуально, доступно для скринридеров (реальная информация не должна
   теряться из-за aria-hidden на утроенной декоративной ленте) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   FADE-IN / MAGNET утилиты
   ============================================================ */
.fade {
  opacity: 0;
  transform: translate(var(--fx, 0), var(--fy, 30px));
  transition: opacity var(--fdur, 0.7s) cubic-bezier(0.25,0.1,0.25,1),
              transform var(--fdur, 0.7s) cubic-bezier(0.25,0.1,0.25,1);
  transition-delay: var(--fd, 0s);
}
.fade.fade-in { opacity: 1; transform: translate(0, 0); }

/* Появление только по прозрачности (для магнитного портрета) */
.fade-op {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.25,0.1,0.25,1);
  transition-delay: var(--fd, 0s);
}
.fade-op.fade-in { opacity: 1; }

.magnet { will-change: transform; display: block; }

/* Доступность: видимый фокус для клавиатурной навигации */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.btn-contact:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Доступность: уважать «уменьшить движение» — гасим все скролл-эффекты */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade, .fade-op { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-row { transform: none !important; }
  .magnet { transform: none !important; }
  .about-text .ch { opacity: 1 !important; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px;
  overflow: clip;
}
@media (min-width: 640px) { .about { padding: 32px; } }
@media (min-width: 768px) { .about { padding: 40px; } }

.about-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
  max-width: 620px;
  position: relative;
  z-index: 2;
}
@media (min-width: 640px) { .about-inner { gap: 56px; } }
@media (min-width: 768px) { .about-inner { gap: 64px; } }

.about-heading {
  font-size: clamp(2.6rem, 11vw, 9rem);
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.about-text {
  color: var(--cream);
  font-weight: 500;
  line-height: 1.55;
  font-size: clamp(1rem, 2vw, 1.3rem);
}
.about-text .ch { opacity: 0.2; transition: opacity 0.05s linear; }

/* Декоративные кактусы по углам */
.about-deco { position: absolute; z-index: 1; pointer-events: none; }
.about-deco svg { width: 100%; height: 100%; display: block; }
.about-deco-tl { width: 100px; top: 5%; left: 2%; }
.about-deco-bl { width: 90px; bottom: 8%; left: 4%; }
.about-deco-tr { width: 90px; top: 6%; right: 3%; }
.about-deco-br { width: 100px; bottom: 8%; right: 5%; }
@media (min-width: 640px) {
  .about-deco-tl { width: 140px; left: 3%; }
  .about-deco-bl { width: 120px; left: 6%; }
  .about-deco-tr { width: 120px; right: 4%; }
  .about-deco-br { width: 140px; right: 6%; }
}
@media (min-width: 1024px) {
  .about-deco-tl { width: 190px; left: 5%; }
  .about-deco-bl { width: 160px; left: 9%; }
  .about-deco-tr { width: 160px; right: 6%; }
  .about-deco-br { width: 190px; right: 9%; }
}
@media (max-width: 900px) {
  /* На среднем экране декору тесно рядом с текстом — приглушаем */
  .about-deco { opacity: 0.7; }
}
@media (max-width: 560px) {
  /* На узком экране кактусы будут перекрывать текст — прячем совсем */
  .about-deco { display: none; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  position: relative;
  z-index: 5;
  background: var(--cream);
  color: var(--ink);
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  padding: 56px 20px 72px;
}
@media (min-width: 640px) { .services { border-radius: 50px 50px 0 0; padding: 64px 32px 88px; } }
@media (min-width: 1024px) { .services { border-radius: 60px 60px 0 0; padding: 80px 48px 100px; } }

.services-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto 48px;
}
.services-head .eyebrow { margin-bottom: 10px; }
.services-heading {
  font-size: clamp(2rem, 6vw, 4.2rem);
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
}
.services-lasso-wrap { width: 150px; flex-shrink: 0; text-align: center; }
.services-lasso-wrap img { width: 100%; height: auto; filter: drop-shadow(0 14px 24px rgba(17,17,17,0.18)); }
@media (min-width: 768px) { .services-lasso-wrap { width: 190px; } }
/* Обычный текст, без бирки: часть слов — акцентным оранжевым (см. .accent) */
.services-lasso-caption {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 10px 0 0;
  line-height: 1.4;
}

.services-list {
  border-top: 1px solid var(--border-light);
  max-width: 1180px;
  margin: 0 auto;
}
.service-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-light);
}
.service-num {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--ink);
  opacity: 0.15;
  flex-shrink: 0;
  width: 80px;
}
.service-body-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.service-body h3 {
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  margin: 0;
}
/* Кнопка-ссылка на тёмном тексте/светлом фоне (для Services) */
.btn-ghost-dark {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  font: 700 11.5px var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1.5px solid var(--border-light);
  background: transparent;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s;
}
.btn-ghost-dark:hover { border-color: var(--orange); color: var(--orange); }
.service-body p {
  color: var(--text-muted-dark);
  font-size: clamp(0.9rem, 1.3vw, 1.02rem);
  line-height: 1.55;
  max-width: 580px;
  margin: 0;
}
@media (max-width: 560px) {
  .service-row { gap: 16px; }
  .service-num { width: 52px; font-size: 1.7rem; }
}

/* Общие утилиты для детальных секций ниже */
.section-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.about-ctas { justify-content: center; }
.section-head-block { max-width: 1180px; margin: 0 auto 40px; }

/* ============================================================
   BOT — сетка карточек-фич + маскот (своя визуальная логика)
   ============================================================ */
.bot-detail {
  position: relative;
  z-index: 7;
  background: var(--bg);
  color: var(--cream);
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  padding: 56px 20px 72px;
}
.bot-detail-head, .bot-detail-compare, .bot-features-grid, .bot-trial-box, .bot-detail > .section-ctas {
  max-width: 1180px; margin-left: auto; margin-right: auto;
}
@media (min-width: 640px) { .bot-detail { border-radius: 50px 50px 0 0; padding: 64px 32px 88px; } }
@media (min-width: 1024px) { .bot-detail { border-radius: 60px 60px 0 0; padding: 80px 48px 100px; } }

/* Уже, чем остальной блок (1180) — иначе на широких экранах текст с маскотом
   разъезжаются на разные края строки с пустым провалом между ними. */
.bot-detail-head { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; margin-bottom: 32px; max-width: 880px; }
.bot-detail-head-text { flex: 1 1 auto; min-width: 320px; max-width: 620px; }
.bot-detail-heading { font-size: clamp(1.9rem, 5vw, 3.6rem); text-transform: uppercase; line-height: 1.02; margin: 10px 0 18px; overflow-wrap: anywhere; }
/* @CorEdAICoachBot — «хэндл» под названием, заметно мельче заголовка (как
   @ник под именем в Twitter/Instagram): одно длинное слово без пробелов.
   overflow-wrap: anywhere у родителя (.bot-detail-heading) иначе может
   разорвать его посреди слова на нестандартных DPI/масштабах — явно
   запрещаем перенос именно здесь и уменьшаем шрифт по ширине колонки
   через clamp вместо надежды на то, что 0.42em всегда влезет. */
.bot-detail-handle {
  display: block; margin-top: 6px; letter-spacing: 0;
  white-space: nowrap; overflow-wrap: normal; word-break: keep-all;
  font-size: clamp(0.62rem, 5.5vw, 1.5rem);
}
@media (min-width: 480px) { .bot-detail-handle { font-size: clamp(0.9rem, 3vw, 1.5rem); } }
.bot-detail-lead { color: var(--cream); font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.45; max-width: 560px; margin: 0 0 10px; }
.bot-detail-lead .accent { font-weight: 800; }
.bot-detail-subtitle { color: #a8a29a; font-size: clamp(0.82rem, 1.2vw, 0.92rem); line-height: 1.55; max-width: 560px; margin: 0; }
.bot-detail-mascot { width: 140px; flex-shrink: 0; }
.bot-detail-mascot img { width: 100%; height: auto; border-radius: 50%; filter: drop-shadow(0 10px 30px rgba(217,102,60,0.25)); }
@media (min-width: 768px) { .bot-detail-mascot { width: 170px; } }

.bot-detail-compare {
  font-size: 15px;
  color: var(--cream);
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 20px;
  max-width: 720px;
  margin: 0 0 40px;
}

/* Coverflow — карточки-фичи веером в 3D, тянутся мышью/тачем, как обложки
   пластинок. Порт идеи из React-референса на чистый CSS-transform + rAF,
   без сборки/фреймворка — см. initBotCoverflow в script-v2.js. */
.bot-coverflow { margin-bottom: 40px; --cf-card: clamp(220px, 46vw, 300px); }
.bot-coverflow-stage {
  position: relative;
  height: 320px;
  perspective: calc(var(--cf-card) * 2.6);
  outline: none;
  cursor: grab;
  touch-action: pan-y;
}
.bot-coverflow-stage:active { cursor: grabbing; }
.bot-coverflow-stage:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }
.bot-coverflow-track { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.bot-coverflow-card {
  position: absolute; left: 50%; top: 0;
  width: var(--cf-card); height: 300px;
  background: var(--bg); border: 1px solid var(--border-dark);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 10px;
  will-change: transform, opacity;
  box-shadow: 0 26px 50px -22px rgba(0,0,0,0.6);
  user-select: none;
}
.bot-feature-icon { width: 26px; height: 26px; color: var(--orange); flex-shrink: 0; }
.bot-coverflow-card h3 { font-size: 15.5px; margin: 0; text-transform: uppercase; }
.bot-coverflow-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.bot-coverflow-card p strong { color: var(--orange); font-weight: 700; }

.coverflow-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.coverflow-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: var(--border-dark); cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.coverflow-dots button.active { background: var(--orange); transform: scale(1.35); }

/* Без анимации — карточки просто в ряд, листаются горизонтальным скроллом
   (нативно тачем/трекпадом/drag мышью, без стрелок). */
@media (prefers-reduced-motion: reduce) {
  .bot-coverflow-stage { height: auto; perspective: none; cursor: auto; }
  .bot-coverflow-track {
    display: flex; flex-wrap: nowrap; gap: 16px; transform: none !important;
    overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
    padding: 4px 20px 12px;
  }
  .bot-coverflow-card { position: static; transform: none !important; opacity: 1 !important; width: 260px; flex-shrink: 0; scroll-snap-align: start; }
}

.bot-trial-box { border: 1.5px solid var(--orange); padding: 22px 24px; font-size: 14.5px; }
.bot-trial-box p { margin: 0; }
.bot-trial-box p strong { color: var(--orange); }

/* ============================================================
   COURSE — горизонтальная galería реальных скриншотов (своя логика)
   ============================================================ */
.course-detail {
  position: relative;
  z-index: 8;
  background: var(--cream);
  color: var(--ink);
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  padding: 56px 0 72px;
}
@media (min-width: 640px) { .course-detail { border-radius: 50px 50px 0 0; padding: 64px 0 88px; } }
@media (min-width: 1024px) { .course-detail { border-radius: 60px 60px 0 0; padding: 80px 0 100px; } }

.course-detail-head, .level-grid, .course-method, .course-detail > .section-ctas {
  max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px;
}
@media (min-width: 640px) { .course-detail-head, .level-grid, .course-method, .course-detail > .section-ctas { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 1024px) { .course-detail-head, .level-grid, .course-method, .course-detail > .section-ctas { padding-left: 48px; padding-right: 48px; } }

.course-detail-head { margin-bottom: 32px; }
.course-detail-heading { font-size: clamp(1.9rem, 5vw, 3.6rem); text-transform: uppercase; line-height: 1.02; margin: 10px 0 16px; }
.course-detail-subtitle { color: var(--text-muted-dark); font-size: clamp(0.95rem, 1.5vw, 1.1rem); line-height: 1.6; max-width: 620px; margin: 0; }

.level-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 40px; max-width: 620px; margin-left: 20px; }
@media (min-width: 640px) { .level-grid { margin-left: 32px; } }
@media (min-width: 1024px) { .level-grid { margin-left: 48px; } }
@media (max-width: 640px) { .level-grid { grid-template-columns: repeat(4, 1fr); max-width: none; margin-left: 20px; margin-right: 20px; } }
.level-card {
  aspect-ratio: 1; border: 2px solid var(--teal); background: rgba(26,115,115,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}
.level-card span { font-weight: 800; font-size: 15px; transition: color 0.4s ease; }
/* "Зажигаются" по очереди при появлении блока в зоне видимости — см. initLevelPath */
.level-card.lit { background: var(--teal); color: #fff; transform: scale(1.08); box-shadow: 0 10px 24px -12px rgba(26,115,115,0.55); }
.level-card.lit span { color: #fff; }

/* Галерея — едет за курсором (drag-to-scroll), без карты/капчи, только CSS+JS */
.course-gallery-wrap { padding: 4px 0 40px; }
.course-gallery-label {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted-dark); margin: 0 0 14px; padding: 0 20px;
}
@media (min-width: 640px) { .course-gallery-label { padding: 0 32px; } }
@media (min-width: 1024px) { .course-gallery-label { padding: 0 48px; } }
.course-gallery {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 20px 18px;
  cursor: grab; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--border-light) transparent;
  -webkit-overflow-scrolling: touch; user-select: none;
}
@media (min-width: 640px) { .course-gallery { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 1024px) { .course-gallery { padding-left: 48px; padding-right: 48px; } }
.course-gallery.dragging { cursor: grabbing; }
.gallery-card { flex: 0 0 auto; width: 200px; margin: 0; scroll-snap-align: start; border: 1px solid var(--border-light); background: #fff; box-shadow: 0 10px 28px -18px rgba(17,17,17,0.35); }
.gallery-card img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: top; pointer-events: none; }
.gallery-card figcaption { padding: 8px 12px 12px; border-top: 1px solid var(--border-light); }
.gallery-badge { font-size: 12px; font-weight: 700; color: var(--orange); }

.course-method { padding-top: 12px; }
.course-method-title { font-size: clamp(1.1rem, 2.2vw, 1.5rem); margin: 0 0 18px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.skill-chip { display: inline-flex; padding: 9px 16px; font-size: 13px; font-weight: 600; border: 1px solid var(--border-light); background: #ffffffb0; }
.course-access { font-size: 14px; color: var(--text-muted-dark); margin: 0; }

/* ============================================================
   COMMUNITY — мокап переписки (своя визуальная логика)
   ============================================================ */
.community-detail {
  position: relative;
  z-index: 9;
  background: var(--cream);
  color: var(--ink);
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  padding: 56px 20px 72px;
}
@media (min-width: 640px) { .community-detail { border-radius: 50px 50px 0 0; padding: 64px 32px 88px; } }
@media (min-width: 1024px) { .community-detail { border-radius: 60px 60px 0 0; padding: 80px 48px 100px; } }

.community-detail-head, .phone-carousel-wrap, .community-cards, .community-detail > .section-ctas {
  max-width: 1180px; margin-left: auto; margin-right: auto;
}
.community-detail-head { margin-bottom: 36px; }
.community-detail-heading { font-size: clamp(2rem, 6vw, 4rem); text-transform: uppercase; line-height: 0.98; margin: 10px 0 16px; }
.community-detail-subtitle { color: var(--text-muted-dark); font-size: clamp(0.95rem, 1.5vw, 1.1rem); margin: 0; }

/* Карусель телефонов — три иллюстративных экрана сменяют друг друга по кругу */
.phone-carousel-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
.phone-carousel { position: relative; width: 100%; height: 520px; display: flex; align-items: center; justify-content: center; }
.phone {
  position: absolute;
  width: 280px;
  border: 9px solid #1c1c1c;
  border-radius: 40px;
  background: #161616;
  color: var(--cream);
  box-shadow: 0 28px 56px -20px rgba(0,0,0,0.6);
  transition: transform 0.7s cubic-bezier(0.25,0.1,0.25,1), opacity 0.7s ease, filter 0.7s ease;
  overflow: hidden;
}
.phone::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 84px; height: 20px; background: #1c1c1c; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone-screen { padding: 36px 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 460px; }
.phone[data-pos="left"] { transform: translateX(-164px) scale(0.78); z-index: 2; opacity: 0.5; filter: blur(0.5px); }
.phone[data-pos="center"] { transform: translateX(0) scale(1); z-index: 3; opacity: 1; }
.phone[data-pos="right"] { transform: translateX(164px) scale(0.78); z-index: 2; opacity: 0.5; filter: blur(0.5px); }
.phone[data-pos="hidden"] { transform: translateX(0) scale(0.6); z-index: 1; opacity: 0; }

.phone-carousel-dots { display: flex; gap: 8px; margin-top: 18px; }
.phone-carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0;
  background: var(--border-light); cursor: pointer;
}
.phone-carousel-dots button.is-active { background: var(--orange); }

.chat-bubble { max-width: 92%; padding: 12px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.42; align-self: flex-start; }
.chat-bubble p { margin: 0; }
.chat-bubble-bot { background: #232323; border-bottom-left-radius: 4px; }
.chat-bubble-user { align-self: flex-end; background: var(--orange); color: #1a0d05; border-bottom-right-radius: 4px; }
.chat-bubble-alt { background: #3a2418; color: var(--cream); }
.chat-bubble-label { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--orange); margin-bottom: 4px; }
.chat-bubble-bot .chat-bubble-label { color: var(--teal); }
.chat-bubble p strong { color: inherit; text-decoration: underline; text-decoration-color: var(--orange); }
.chat-reactions { align-self: flex-end; display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); }
.chat-reactions span { display: inline-flex; align-items: center; gap: 3px; }
.chat-reactions img { width: 18px; height: 18px; object-fit: contain; border-radius: 50%; background: #232323; }

/* Экран 2 — квиз Classroom */
.phone-screen-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--teal); text-transform: uppercase; }
.phone-quiz-q { font-size: 17px; font-weight: 600; margin: 10px 0 4px; }
.phone-quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.phone-quiz-options span { padding: 11px 14px; border-radius: 12px; background: #232323; font-size: 14.5px; }
.phone-quiz-options .is-correct { background: rgba(26,115,115,0.25); border: 1px solid var(--teal); color: var(--cream); font-weight: 700; }
.phone-xp-badge { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--orange); background: rgba(217,102,60,0.12); padding: 7px 14px; border-radius: 999px; }

/* Экран 3 — стрик / топ-10 */
.phone-screen-center { align-items: center; justify-content: center; text-align: center; gap: 16px; flex: 1; }
.phone-streak { font-size: 30px; font-weight: 800; margin: 0; }
.phone-top-badge { font-size: 14.5px; font-weight: 700; color: var(--ink); background: var(--orange); padding: 9px 18px; border-radius: 999px; }

@media (max-width: 640px) {
  .phone { width: 230px; }
  .phone-screen { min-height: 400px; padding: 32px 16px 18px; }
  .phone[data-pos="left"] { transform: translateX(-120px) scale(0.72); }
  .phone[data-pos="right"] { transform: translateX(120px) scale(0.72); }
  .phone-carousel { height: 460px; }
}

.community-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-light); border: 1px solid var(--border-light); margin-bottom: 40px; }
.community-card { background: var(--bg-deep); padding: 22px 20px; }
.community-card h3 { color: var(--cream); font-size: 14.5px; text-transform: uppercase; margin: 0 0 8px; }
.community-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }
@media (max-width: 900px) { .community-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .community-cards { grid-template-columns: 1fr; } }

/* ============================================================
   LESSONS — карточки-персонажи (своя визуальная логика)
   ============================================================ */
.lessons-detail {
  position: relative;
  z-index: 10;
  background: var(--cream);
  color: var(--ink);
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  padding: 56px 20px 72px;
}
@media (min-width: 640px) { .lessons-detail { border-radius: 50px 50px 0 0; padding: 64px 32px 88px; } }
@media (min-width: 1024px) { .lessons-detail { border-radius: 60px 60px 0 0; padding: 80px 48px 100px; } }

.lessons-detail-head, .lessons-cards, .lessons-note {
  max-width: 1180px; margin-left: auto; margin-right: auto;
}
.lessons-detail-head { margin-bottom: 36px; }
.lessons-detail-heading { font-size: clamp(1.9rem, 5vw, 3.4rem); text-transform: uppercase; line-height: 1.05; margin: 10px 0 16px; }
.lessons-detail-subtitle { color: var(--text-muted-dark); font-size: clamp(0.95rem, 1.5vw, 1.1rem); margin: 0; }

.lessons-cards { margin-bottom: 32px; }
/* С 2026-08-18 — одна карточка (пробный урок), не стопка из трёх, поэтому
   sticky-механика стопки (position: sticky + margin-bottom: 60vh + spacer
   40vh, раньше нужная для эффекта наезда карточек друг на друга при
   скролле, см. initStackCards в script.js) убрана — с одной карточкой она
   только создавала ~100vh пустого пространства под секцией без всякого
   визуального эффекта. Простая статичная карточка. */
.lessons-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 32px;
  padding: 22px 28px;
  box-shadow: 0 20px 40px -24px rgba(17,17,17,0.25);
}
.lessons-card-media { flex-shrink: 0; width: 130px; }
.lessons-card-media img { width: 100%; height: auto; filter: drop-shadow(0 12px 20px rgba(17,17,17,0.18)); }
.lessons-card-body h3 { font-size: clamp(1rem, 1.8vw, 1.3rem); text-transform: uppercase; margin: 0 0 8px; }
.lessons-card-body p { font-size: 13.5px; color: var(--text-muted-dark); line-height: 1.5; margin: 0 0 14px; max-width: 420px; }
@media (max-width: 640px) {
  .lessons-card { flex-direction: column; text-align: center; gap: 12px; padding: 20px; }
  .lessons-card-media { width: 110px; }
}

.lessons-note {
  font-size: 14px; color: var(--text-muted-dark);
  border-left: 3px solid var(--teal); padding: 4px 0 4px 20px; max-width: 620px; margin-top: 0;
}

/* ============================================================
   PRICING — интерактивная сетка на канвасе (своя визуальная логика)
   ============================================================ */
.pricing-detail {
  position: relative;
  z-index: 11;
  background: #161618;
  border-radius: 40px 40px 0 0;
  margin-top: -20px;
  overflow: hidden;
  padding: 56px 20px 80px;
}
@media (min-width: 640px) { .pricing-detail { border-radius: 50px 50px 0 0; padding: 64px 32px 96px; } }
@media (min-width: 1024px) { .pricing-detail { border-radius: 60px 60px 0 0; padding: 80px 48px 110px; } }

.kinetic-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.pricing-detail-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }
.pricing-detail-head { margin-bottom: 40px; }
.pricing-detail-heading { color: var(--cream); font-size: clamp(2rem, 6vw, 4rem); text-transform: uppercase; line-height: 0.98; margin: 10px 0 0; }
.pricing-detail-head .eyebrow { color: var(--orange); }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(22,22,24,0.72);
  backdrop-filter: blur(6px);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-card h3 { color: var(--cream); font-size: 16.5px; margin: 0; }
.price-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.price-card .price-tag { font-weight: 800; font-size: 20px; color: var(--orange); align-self: flex-start; }
.price-card .btn-ghost,
.price-card .btn-contact { margin-top: auto; align-self: flex-start; }
.price-old { font-weight: 600; font-size: 13px; color: var(--text-muted); text-decoration: line-through; margin-right: 6px; }
.price-rub { font-weight: 600; font-size: 12px; color: var(--text-muted); }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }

/* Декоративные кактусы в пустующих углах разделов — заполняют воздух,
   не мешают контенту (скрыты на узких экранах, где и так тесно). */
.section-deco-cactus { position: absolute; z-index: 0; pointer-events: none; opacity: 0.9; }
.section-deco-cactus-bot { width: 110px; right: 4%; bottom: 6%; filter: drop-shadow(0 16px 24px rgba(0,0,0,0.4)); }
.section-deco-cactus-course { width: 100px; right: 3%; top: 8%; filter: drop-shadow(0 14px 20px rgba(17,17,17,0.18)); }
@media (max-width: 900px) { .section-deco-cactus { display: none; } }

/* ============================================================
   FOOTER (временный минимум для превью)
   ============================================================ */
.site-footer { padding: 80px 0 36px; border-top: 1px solid var(--border-dark); }
.footer-top { padding-bottom: 28px; border-bottom: 1px solid var(--border-dark); }
.footer-brand-word { display: block; font-size: clamp(48px, 10vw, 120px); font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.footer-top p { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.footer-also {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  padding: 20px 0; font-size: 13px; color: var(--text-muted);
}
.footer-also a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-also a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border-dark); font-size: 13px; color: var(--text-muted);
}
