/* ==========================================================================
   Ilmo — промостраница
   1. Основа          6. Слайды и заголовки   11. Подвал
   2. Шапка           7. Как это работает     12. Диалог и демозадания
   3. Кнопки          8. Курсы                13. Полоса прогресса
   4. Первый экран    9. Механики             14. Появление и движение
   5. Телефон        10. Скачивание           15. Большие экраны
   Контрольные ширины: 1100 (меню-гамбургер), 999 (карточка курса), 700 (телефон), 440.
   ========================================================================== */

/* ---------- 1. Основа ---------- */
/* Inter лежит в проекте, чтобы страница выглядела одинаково на любом устройстве и без интернета. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
  color-scheme: dark;
  --hh: 80px;                                   /* высота шапки */
  --slide: calc(100vh - var(--hh));             /* высота одного слайда = окно без шапки */
  --phone-scale: 1;
}
@supports (height: 100svh) { :root { --slide: calc(100svh - var(--hh)); } }
@media (max-width: 1100px) { :root { --hh: 68px; } }
@media (max-width: 700px)  { :root { --hh: 64px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh); }
body {
  margin: 0;
  background: #060e13;
  color: #f5faf9;
  font: 16px/1.5 "Inter", "Helvetica Neue", Arial, sans-serif;
  transition: opacity .25s ease;
}
html.loading body { opacity: 0; }               /* пока язык не загрузился, английские заглушки не показываем */
body:has(dialog[open]) { overflow: hidden; }
main { overflow-x: clip; }                      /* декоративные элементы не растягивают страницу вбок */
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { border: 0; color: inherit; cursor: pointer; }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #7ff6e3; outline-offset: 4px; }
svg { display: block; flex-shrink: 0; width: 1.2em; height: 1.2em; }
i[data-icon] { display: inline-flex; font-style: normal; }
::selection { background: #80f0d6; color: #062721; }

.navwrap, .herowrap, .content, footer {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: clamp(24px, 6.6vw, 110px);
}
@media (max-width: 980px) { .navwrap, .herowrap, .content, footer { padding-inline: 5vw; } }

/* ---------- 2. Шапка ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid #ffffff14;
  background: #060d11;                          /* сплошной: под шапкой страница не просвечивает (владелец 2026-12-04) */
}
body:has(dialog[open]) header { z-index: 2; }
.navwrap {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(10px, 2vw, 26px);
  height: var(--hh);
}
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 86px; height: auto; }
.navwrap nav { display: flex; align-items: center; gap: clamp(2px, 1.8vw - 12px, 18px); }
.navwrap nav a { min-width: 30px; padding: 8px 6px; font-size: 14px; color: #a6b0b4; text-align: center; }
.navwrap nav a.active, .navwrap nav a:hover { color: #f6fffc; }
.navtools, .language { display: flex; align-items: center; gap: 8px; }

.language {
  position: relative;
  padding-inline: 10px;
  border: 1px solid #344549; border-radius: 25px;
  background: #101d21; color: #dbeae6;
}
.language > i { position: absolute; inset-inline-start: 10px; font-size: 14px; pointer-events: none; }
.language > i:last-child { inset-inline-start: auto; inset-inline-end: 9px; font-size: 11px; }
.language { min-height: 38px; padding-block: 0; padding-inline: 32px 26px; }
.language .langshort { display: inline; font-size: 13px; font-weight: 650; }
.language select {
  -webkit-appearance: none; appearance: none;
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; padding: 0;
  border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 14px;
  opacity: 0; cursor: pointer;
}
.language option { color: #effdfa; background: #142126; }
.language:focus-within, .menutoggle:focus-visible { outline: 2px solid #85f0d8; outline-offset: 2px; }
.language select:focus-visible { outline: 0; }
.menutoggle { display: none; }
#language-feedback {
  position: absolute; inset: 100% 0 auto;
  padding: 7px 14px;
  font-size: 13px; text-align: center;
  color: #f8eedf; background: #40362f;
}

@media (max-width: 1100px) {
  .navwrap nav { display: none; }
  .navwrap nav.open {
    position: absolute; inset: 100% 0 auto;
    display: grid; gap: 0;
    padding: 10px 5vw 18px;
    background: #0b161b;
    border-bottom: 1px solid #344744;
    box-shadow: 0 15px 25px #0006;
  }
  .navwrap nav.open a { display: block; min-width: 0; padding: 11px 0; font-size: 15px; text-align: start; }
  .menutoggle {
    display: grid; place-items: center; flex-shrink: 0;
    width: 39px; height: 39px;
    border: 1px solid #344549; border-radius: 50%;
    background: #111e23;
  }
}
@media (max-width: 700px) {
  .brand img { width: 70px; }
}
@media (max-width: 440px) {
  .navwrap { padding-inline: 4vw; gap: 7px; }
  .navtools { flex-shrink: 1; min-width: 0; gap: 5px; }
  .brand img { width: 62px; }
  .language { justify-content: center; min-width: 62px; min-height: 36px; padding-block: 0; padding-inline: 22px 8px; }
  .language > i { inset-inline-start: 8px; }
  .language > i:last-child { display: none; }
  .language .langshort { display: inline; font-size: 12px; font-weight: 650; }
  .language select {
    position: absolute; inset: 0; z-index: 1;
    width: 100%; min-width: 0; max-width: none; height: 100%;
    padding: 0; font-size: 13px;
    opacity: 0;
  }
}
@media (max-width: 350px) {
  .navcta i { display: none; }                  /* самый узкий экран: в шапке остаётся только текст кнопки */
}

/* ---------- 3. Кнопки ---------- */
.navcta, .secondary, .primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 100px;
  font-weight: 650; font-size: 15px; white-space: nowrap;
}
.navcta { padding: 9px 17px; border: 1px solid #465354; background: #162125; color: #f5faf9; }
.navcta i { font-size: 13px; color: #c6ded9; }
.primary, .secondary { min-height: 49px; padding: 0 23px; }
.primary { background: #80f0d6; color: #062721; box-shadow: 0 5px 24px #40f4be12; }
.secondary { background: #111d22ce; border: 1px solid #415156; color: white; }
.primary:hover { background: #a9ffe7; }
.secondary:hover, .navcta:hover { background: #203036; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }

@media (max-width: 700px) {
  .navcta { padding: 7px 13px; font-size: 12px; }
  .primary, .secondary { min-height: 45px; padding: 0 18px; font-size: 14px; }
  .actions { margin-top: 22px; }
}
@media (max-width: 440px) {
  .navcta { padding: 8px 10px; }
  .actions a, .actions button { white-space: normal; text-align: center; }
}

/* ---------- 4. Первый экран ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid #26373a; }
.current {
  position: absolute; inset: 0; z-index: -2;
  background: #060e13 url(assets/current.webp) center / cover no-repeat;
}
.current::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, #060d12cc 0%, #060e1366 34%, transparent 66%),
    linear-gradient(to top, #060e1366, transparent 11%);
}
[dir=rtl] .current { transform: scaleX(-1); }   /* в арабской версии текст справа — затемнение тоже */
.herowrap {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  min-height: var(--slide);
}
.intro { z-index: 1; padding-block: 55px 59px; }
.eyebrow, .kicker {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 750; letter-spacing: .16em;
  color: #76eed8;
}
.eyebrow {
  width: max-content; max-width: 100%;
  padding: 6px 12px;
  border: 1px solid #2f5b55; border-radius: 100px;
  background: #10312d80;
  letter-spacing: .13em;
}
.eyebrow i { font-size: 13px; }
a.eyebrow { transition: background .2s ease, border-color .2s ease; }
a.eyebrow:hover, a.eyebrow:focus-visible { border-color: #4f8f86; background: #164139; }
h1 {
  margin: 25px 0 24px;
  font-size: clamp(60px, min(6vw, 11.5vh), 93px); font-weight: 690; line-height: .99; letter-spacing: -.064em;
  overflow-wrap: anywhere;
}
h1 > span, h1 em { display: block; }
h1 > span:empty, h1 em:empty { display: none; }
h1 em {
  font-style: normal;
  color: #75ecd9;
  background: linear-gradient(95deg, #9df5d6, #53e1d6 65%, #53cddc);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.intro > p { max-width: 455px; font-size: 18px; line-height: 1.65; letter-spacing: -.012em; color: #b0bec2; text-wrap: pretty; }
.castnote {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  margin-top: 21px;
  font-size: 13px; color: #bfcecf;
}
.friend-stack {
  display: flex; flex-wrap: wrap; row-gap: 4px;
  max-width: 100%; margin: 0; padding: 0;
  list-style: none;
}
.friend-stack li { position: relative; width: 23px; height: 32px; }
.friend-stack li:last-child { width: 32px; }
.friend-stack li:hover, .friend-stack li:focus-within { z-index: 1; }
.friend-stack img {
  position: relative;
  width: 32px; height: 32px;
  border: 2px solid #0d1b21; border-radius: 50%;
  background: var(--portrait-bg, #476565);
  object-fit: cover;
}
.friend-stack button { display: block; padding: 0; border-radius: 50%; background: none; }
.friend-stack button:focus-visible { outline: 0; }
.friend-stack button img { transition: transform .2s ease; }
.friend-stack button:hover img, .friend-stack button:focus-visible img { transform: translateY(-3px); outline: 2px solid #7deacf; }

@media (max-width: 980px) {
  .intro > p { font-size: 17px; }
}
@media (max-width: 700px) {
  .herowrap { grid-template-columns: minmax(0, 1fr); }
  .intro { padding: 47px 0 0; }
  h1 { margin: 19px 0; font-size: clamp(49px, 10vw, 70px); }
  .intro > p { max-width: 440px; font-size: 16px; line-height: 1.55; }
  .friend-stack { padding-inline-end: 9px; }
  .friend-stack li { width: 22px; }
  .current, [dir=rtl] .current { transform: none; background-size: auto 68%; background-position: 55% 108%; }
  .current::after { background: linear-gradient(#060e13 20%, transparent 58%); }
}
@media (max-width: 440px) {
  .castnote { font-size: 12px; }
}

/* ---------- 5. Телефон ---------- */
.stage {
  position: relative; isolation: isolate;
  display: grid; place-items: center; align-content: center;   /* телефон по центру, даже когда он уменьшен */
  height: 614px;
  perspective: 1400px;
}
.stageglow {
  position: absolute;
  width: 90%; height: 76%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #26e4c11c, transparent 67%);
  filter: blur(18px);
}
.phone {
  position: relative;
  width: 280px; height: 547px; padding: 7px;
  border-radius: 44px;
  background: linear-gradient(115deg, #7c898a 0%, #182023 9%, #7b8f91 27%, #222b2f 44%, #080b0d 74%, #8fa5a5 100%);
  box-shadow:
    inset 1px 1px 1px 1px #b7c9c9, inset -4px -2px 1px #2b393c,
    3px 1px 0 #657678, 6px 2px 0 #28393c, 9px 4px 0 #152326, 11px 6px 1px #344448,
    22px 30px 30px #0007;
  transform: scale(var(--phone-scale)) rotateY(-13deg) rotateX(4deg) rotateZ(8deg);
  transition: transform .45s ease;
}
.phone:hover, .phone:focus-within { transform: scale(var(--phone-scale)) rotateY(-6deg) rotateX(1deg) rotateZ(5deg); }
[dir=rtl] .phone { direction: ltr; }
[dir=rtl] .apppage, [dir=rtl] .apptabs { direction: rtl; }
.sidekey {
  position: absolute; left: -3px; top: 105px;
  width: 4px; height: 34px;
  border-radius: 4px;
  background: linear-gradient(90deg, #172326, #839090);
}
.key2 { top: 145px; }
.screen {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 3px solid #070b0d; border-radius: 37px;
  background: linear-gradient(150deg, #142229, #0b151b 64%);
}
.status {
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  height: 33px; padding: 7px 17px 0;
  font-size: 10px; color: #e3e9e9;
}
.island {
  position: absolute; left: 50%; top: 8px;
  width: 70px; height: 17px;
  border-radius: 22px;
  background: #040709;
  box-shadow: inset 0 0 2px #000;
  transform: translateX(-50%);
}
.island::after {
  content: ""; position: absolute; right: 6px; top: 6px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #11232d;
}
.network { display: flex; gap: 3px; }
.network svg { width: 12px; height: 12px; }
.appbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 15px 8px; }
.appbar > a { display: flex; }
.appbar > a img { width: 52px; height: auto; }
.avatar {
  width: 25px; height: 25px; padding: 1px;
  overflow: hidden;
  border: 1px solid #34544f; border-radius: 50%;
  background: #233e3a;
}
.avatar img { display: block; width: 100%; }
.apppage {
  flex: 1; min-height: 0;
  padding: 0 13px;
  overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #37534f transparent;
}
.appname { font-size: 24px; font-weight: 720; line-height: 1.2; letter-spacing: -.055em; }
.appsub { margin: 3px 0 11px; font-size: 10px; color: #a4b7bb; }

.featured {
  position: relative; isolation: isolate;
  display: block;
  width: 100%; height: 175px; padding: 0;
  overflow: hidden;
  border: 1px solid #68b5a66e; border-radius: 17px;
  background: radial-gradient(ellipse at 65% 50%, #2da99c, #14675e 63%, #0a4946);
  text-align: start;
}
.featured::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-radial-gradient(ellipse at 100% 120%, transparent 0 17px, #a1ffdd19 18px, transparent 19px 30px);
}
.featured::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, #051c22ed 1%, #0b362d28 39%, transparent 60%);
}
.featured > img { position: absolute; top: 5px; inset-inline-end: 10%; height: 242px; filter: drop-shadow(3px 8px 8px #06352b65); }
.featurelabel {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
  padding: 5px 7px;
  border: 1px solid #99bfb566; border-radius: 20px;
  background: #12342dde; color: #dafff1;
  font-size: 8px; font-weight: bold; line-height: 1; letter-spacing: .09em; text-transform: uppercase;
}
.featurename { position: absolute; inset-inline-start: 13px; bottom: 11px; z-index: 1; display: grid; }
.featurename b { font-size: 24px; line-height: 1.18; letter-spacing: -.06em; }
.featurename small { font-size: 10px; color: #d8e3e1; }
.roundplay {
  position: absolute; inset-inline-end: 12px; bottom: 14px; z-index: 1;
  display: grid; place-items: center;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: #82efd4; color: #153730;
  font-size: 12px;
}

.minihead {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 0 7px;
  font-size: 13px; letter-spacing: -.02em;
}
.minirow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mini {
  position: relative;
  display: grid; grid-template-rows: auto 1fr;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff20; border-radius: 10px;
  background: #17282e;
  text-align: center;
}
.mini img { display: block; width: 100%; height: auto; aspect-ratio: 1.4; object-fit: cover; object-position: center 32%; }
.mini span {
  display: grid; place-items: center;
  min-height: 25px; padding: 3px 2px 4px;
  font-size: 9px; font-weight: 600; line-height: 1.15;
  overflow-wrap: anywhere;
}
[data-feature="audioLessons"] img { transform: scaleX(-1); }

.apptabs {
  display: flex; align-items: center; justify-content: space-around;
  padding: 7px 0 4px;
  border-top: 1px solid #26353a;
  background: #0b1419;
}
.apptabs button {
  flex: 1;
  display: grid; place-items: center; gap: 2px;
  min-width: 0; min-height: 32px; padding: 1px 2px;
  background: none; color: #819298;
  font-size: 8px; line-height: 1.2;
}
.apptabs svg { width: 15px; height: 15px; }
.apptabs .selected { color: #70e6c8; }
.homebar { width: 64px; height: 3px; margin: 4px auto 6px; border-radius: 4px; background: #d5dedf; }

.listitem {
  display: flex; align-items: center; gap: 9px;
  width: 100%; margin: 5px 0; padding: 6px;
  border-radius: 10px;
  background: #1a2a31;
  font-size: 12px; text-align: start;
}
.listitem:hover { background: #22363e; }
/* экран телефона — только показ: карточки не нажимаются, прокрутка экрана остаётся (владелец 2026-12-04) */
.apppage .featured, .apppage .mini, .apppage .listitem { pointer-events: none; }
.listitem img { flex-shrink: 0; width: 33px; height: 33px; border-radius: 8px; background: var(--card); object-fit: cover; }
.listitem small { display: block; font-size: 9px; color: #adbec3; }
.phone-feature {
  position: relative;
  display: block;
  width: 100%; margin: 10px 0;
  overflow: hidden;
  border-radius: 15px;
  background: #14272b;
}
.phone-feature img { display: block; width: 100%; height: 150px; object-fit: cover; }
.phone-cta {
  display: block;
  width: 100%; margin: 7px 0; padding: 8px 7px;
  border: 1px solid #38504d; border-radius: 10px;
  background: #1a302d; color: #a0f0d8;
  font-size: 12px; text-align: center;
}
.phone-cta:hover { background: #23423d; }
.phone-cta:focus-visible, .mini:focus-visible, .listitem:focus-visible, .featured:focus-visible { outline-offset: -2px; }

@media (min-width: 1500px) { :root { --phone-scale: 1.08; } .stage { height: 660px; } }
@media (max-width: 980px)  { .stage { height: 590px; } }
@media (max-width: 700px)  { :root { --phone-scale: .84; } .stage { height: 520px; } }
@media (max-width: 440px)  { :root { --phone-scale: .81; } .stage { height: 504px; } }
/* низкое окно (ноутбук, телефон боком): телефон уменьшается, чтобы первый экран помещался целиком */
@media (min-width: 701px) and (max-height: 760px) { :root { --phone-scale: .9; }  .stage { height: 540px; } .intro { padding-block: 36px; } }
@media (min-width: 701px) and (max-height: 660px) { :root { --phone-scale: .78; } .stage { height: 468px; } .intro { padding-block: 24px; } }
@media (min-width: 701px) and (max-height: 560px) { :root { --phone-scale: .66; } .stage { height: 400px; } }

/* ---------- 6. Слайды и заголовки ---------- */
main > section {
  display: flex; flex-direction: column; justify-content: center;
  min-height: var(--slide);
}
.hero { display: block; }
@media (min-width: 900px) and (min-height: 620px) {
  html { scroll-snap-type: y proximity; }
  main > section { scroll-snap-align: start; }
}
.kicker { font-size: 10px; letter-spacing: .19em; text-transform: uppercase; }
.kicker b { flex-shrink: 0; width: 22px; height: 1px; background: #74eace; }
h2 { margin-top: 11px; font-size: clamp(33px, 3.45vw, 53px); font-weight: 640; line-height: 1.1; letter-spacing: -.055em; }
.sectiontop { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.section-intro { max-width: 620px; margin-top: 14px; font-size: 17px; line-height: 1.6; color: #a9b8bc; text-wrap: pretty; }
.carousel-controls { display: flex; flex-shrink: 0; gap: 8px; }
.carousel-controls button, .close {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid #35454b; border-radius: 50%;
  background: #111d23; color: #d8e1e1;
}
.carousel-controls button:hover:not(:disabled), .close:hover { background: #1b2c33; border-color: #4d6468; }
.carousel-controls button:disabled { opacity: .35; cursor: default; }
[dir=rtl] .carousel-controls svg { transform: scaleX(-1); }
.next-slide { align-self: center; margin-top: clamp(18px, 3.4vh, 36px); }
.next-slide i { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

@media (max-width: 700px) {
  .sectiontop { margin-bottom: 18px; }
}

/* ---------- 7. Как это работает: постеры приветственных баннеров приложения (владелец 2026-12-05) ---------- */
.how { padding-block: 48px 60px; border-top: 1px solid #233036; }
.how > .primary { align-self: flex-start; }
.posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 30px 0 28px; }
.poster {
  position: relative; margin: 0;
  aspect-ratio: 3 / 5;
  overflow: hidden;
  border: 1px solid #33454a; border-radius: 22px;
  background: #111e24;
  box-shadow: 0 24px 50px #0008;
}
.poster-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.poster figcaption {
  position: absolute; inset: auto 0 0;
  padding: 60px 16px 16px;
  background: linear-gradient(180deg, #07111400 0, #071114c7 40%, #071114f5 100%);
}
.poster strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; color: #f6fffc; }
.poster figcaption span { display: block; margin-top: 5px; font-size: 14px; line-height: 1.4; color: #c3d1d3; text-wrap: pretty; }
/* невысокий экран ноутбука: постеры ниже (кадр обрезается снизу — там подпись) */
@media (min-width: 901px) and (max-height: 820px) { .poster { aspect-ratio: 3 / 4; } }
/* планшет и телефон: постеры листаются пальцем */
@media (max-width: 900px) {
  .posters {
    display: flex; gap: 12px;
    margin: 20px -5vw 22px; padding-inline: 5vw;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 5vw;
    scrollbar-width: none;
  }
  .posters::-webkit-scrollbar { display: none; }
  .poster { flex: 0 0 min(66%, 300px); scroll-snap-align: start; }
}
@media (max-width: 700px) {
  .how { padding-block: 28px 32px; }
  .posters { margin-block: 16px 18px; }
}
@media (max-width: 700px) and (max-height: 700px) {   /* невысокий экран: раздел с кнопкой — целиком */
  .how h2 { font-size: 29px; }
  .poster { flex-basis: 58%; }
}
@media (max-width: 700px) and (max-height: 600px) {   /* самые маленькие телефоны (iPhone SE первого поколения) */
  .how { padding-block: 14px 18px; }
  .how h2 { margin-top: 6px; font-size: 26px; }
  .posters { margin-block: 12px 14px; }
  .poster { flex-basis: 50%; border-radius: 18px; }
  .poster figcaption { padding: 44px 12px 12px; }
  .poster strong { font-size: 16px; }
  .poster figcaption span { font-size: 12.5px; }
}

/* ---------- 7а. Для кого (владелец 2026-12-05) — карточки как у механик ---------- */
.audience .path-grid { margin-top: 26px; }
.audience .next-slide { margin-top: 26px; }
.audience .path-card img { background: var(--portrait-bg, #476565); }   /* подложка лица героя */
@media (max-width: 700px) {
  .audience .path-grid { margin-top: 18px; }
  .audience .path-card img { width: 64px; }
  .audience .path-card strong { font-size: 17px; }
}

/* ---------- 8. Курсы ---------- */
.courses { position: relative; padding-block: clamp(28px, 5vh, 56px) clamp(32px, 5.6vh, 64px); border-top: 1px solid #233036; }
.courses .sectiontop { margin-bottom: 0; }
.course-order { margin-top: 8px; font-size: 15px; color: #8cebd4; }   /* «Не нашли нужный курс? Закажите…» */

/* карусель: горизонтальная прокрутка с привязкой к карточкам.
   Высота карточки подстраивается под окно, от неё считается панель ролика. */
.course-grid {
  --card-h: clamp(320px, calc(var(--slide) - 450px), 520px);
  --card-pad: 26px;                              /* поля карточки */
  --video-h: calc(var(--card-h) - 44px);
  --video-w: calc(var(--video-h) * 9 / 16);
  --video-side: calc(5% + var(--video-w) + 18px - .9 * var(--card-pad));   /* сколько места справа занимает ролик вместе с зазором */
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 1060px); gap: 18px;
  margin: clamp(14px, 2.4vh, 22px) -6px 0; padding: 10px 6px 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 6px;
  scrollbar-width: none;
}
.course-grid::-webkit-scrollbar { display: none; }
.course-grid:focus-visible { outline: 0; }
.course-dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.course-dots button { position: relative; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: none; }
.course-dots button::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px;
  border-radius: 9px;
  background: #33494b;
  transition: width .25s, background .25s;
}
.course-dots button:hover::before { background: #56767a; }
.course-dots button[aria-current=true]::before { width: 22px; background: #80f0d6; }
.course-dots button:focus-visible { outline: 2px solid #80f0d6; outline-offset: -2px; }

/* карточка: две стороны, наклон за курсором (--rx, --ry) и блик (--gx, --gy) */
.course-card {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 30%;
  position: relative;
  min-height: var(--card-h);
  border-radius: 24px;
  perspective: 1600px;
  scroll-snap-align: start;
}
.course-inner {
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.course-card:hover .course-inner { transition: transform .15s ease-out; }
.course-card.flipped .course-inner {
  transform: rotateX(var(--rx)) rotateY(calc(180deg + var(--ry)));
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.course-face {
  position: relative; grid-area: 1 / 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #3a5a57; border-radius: 24px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}

/* лицевая сторона */
.course-front {
  isolation: isolate;
  display: flex; flex-direction: column;
  min-height: var(--card-h); padding: var(--card-pad);
  background: radial-gradient(ellipse at 78% 35%, #2b8f84 0%, var(--course) 48%, #0b171c 100%);
}
[dir=rtl] .course-front { background: radial-gradient(ellipse at 22% 35%, #2b8f84 0%, var(--course) 48%, #0b171c 100%); }
.course-front::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-radial-gradient(circle at 80% 40%, transparent 0 26px, #a1ffdd12 27px, transparent 28px 44px);
}
[dir=rtl] .course-front::before { transform: scaleX(-1); }
.course-glow {
  position: absolute; inset: 0; z-index: 3;
  background: radial-gradient(circle at var(--gx) var(--gy), #ffffff1f, transparent 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.course-card:hover .course-glow { opacity: 1; }
.course-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.course-tag {
  display: inline-flex;
  width: max-content; max-width: 100%; padding: 5px 11px;
  border-radius: 30px;
  background: #80f0d6; color: #062721;
  font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
}
.course-flip {
  position: relative; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid #9be9d466; border-radius: 30px;
  background: #0b1f22cc; color: #eafff8;
  font-size: 13px; font-weight: 650;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.course-flip:hover { background: #16353a; }
.course-flip svg, .course-back-actions svg { width: 16px; height: 16px; }
.course-copy { position: relative; max-width: 56%; margin-top: auto; padding-top: 18px; }
.course-copy h3 {
  font-size: clamp(28px, min(3.3vw, 5.4vh), 46px); font-weight: 720; line-height: 1.04; letter-spacing: -.045em;
  text-align: start; overflow-wrap: break-word;
}
.course-copy p { margin-top: 10px; font-size: 17px; line-height: 1.4; color: #d4e7e3; }
[dir=rtl] .course-face h3[dir=ltr] { text-align: right; }
.course-marquee {
  position: relative;
  margin: 18px calc(-1 * var(--card-pad)) 0;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.course-track { display: flex; gap: 8px; width: max-content; animation: marquee 32s linear infinite; }
.course-card:hover .course-track { animation-play-state: paused; }
.course-track span {
  padding: 7px 13px;
  border: 1px solid #7fe7cf40; border-radius: 30px;
  background: #0a1d21b8; color: #e4fbf4;
  font-size: 13px; white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* картинка курса: иллюстрация (art) или ролик (video).
   Ролик на широком экране — вертикальная панель сбоку, на телефоне — фон всей карточки. */
.course-art {
  position: absolute; z-index: -1; inset-block: 74px 0; inset-inline-end: 9%;
  width: auto; max-width: 48%; height: calc(100% - 74px);
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 18px 24px #031a1890);
  animation: course-float 6s ease-in-out infinite;
}
@keyframes course-float { 50% { transform: translateY(-8px); } }
video.course-art {
  inset-block: 0; inset-inline-end: 5%; z-index: 0;
  width: var(--video-w); max-width: none; height: var(--video-h); margin-block: auto;
  border: 4px solid #0b1418; border-radius: 20px;
  background: #0b1418;
  box-shadow: 0 0 0 1px #ffffff26, 0 24px 50px #000a;
  object-fit: cover;
  filter: none;
  animation: none;
}
.has-video .course-front { background: radial-gradient(ellipse at 78% 35%, #2b6f84 0%, var(--course) 50%, #0b171c 100%); }
[dir=rtl] .has-video .course-front { background: radial-gradient(ellipse at 22% 35%, #2b6f84 0%, var(--course) 50%, #0b171c 100%); }
.has-video .course-top { margin-inline-end: var(--video-side); }
.has-video .course-copy { max-width: calc(100% - var(--video-side) - 14px); }
.has-video .course-marquee { margin-right: var(--video-side); }
[dir=rtl] .has-video .course-marquee { margin-right: calc(-1 * var(--card-pad)); margin-left: var(--video-side); }

/* обратная сторона */
.course-back {
  display: flex; flex-direction: column;
  padding: var(--card-pad);
  background: linear-gradient(160deg, #13282d, #0b171c);
  transform: rotateY(180deg);
}
.back-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.course-back h3 { margin-top: 8px; font-size: 30px; line-height: 1.1; letter-spacing: -.04em; text-align: start; }
.course-module { font-size: 14px; font-weight: 600; color: #8cebd4; }
.course-desc { max-width: 620px; margin-top: 4px; font-size: 15px; line-height: 1.55; color: #c3d1d3; text-wrap: pretty; }
.back-inside { margin-top: 18px; }
.course-inside { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #76eed8; }
.course-features {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px;
  margin: 10px 0 0; padding: 0;
  list-style: none;
}
.course-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border: 1px solid #2c4246; border-radius: 13px;
  background: #17292e;
  font-size: 14px; line-height: 1.25;
}
.course-features img { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; background: #23403f; object-fit: cover; }
.course-features span { min-width: 0; overflow-wrap: anywhere; }
.course-back-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.course-back-actions .primary, .course-back-actions .secondary { min-height: 44px; font-size: 14px; }

/* широкая карточка: на обороте текст слева, «Что внутри» справа */
@media (min-width: 1000px) {
  .course-back { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 34px; }
  .back-text { grid-area: 1 / 1; }
  .back-inside { grid-area: 1 / 2 / 3 / 3; align-self: center; margin-top: 0; }
  .course-back-actions { grid-area: 2 / 1; }
}
/* низкое окно ноутбука: описание встаёт рядом с заголовком, отступы меньше — слайд с курсами помещается в окно целиком */
@media (min-width: 1000px) and (max-height: 800px) {
  .courses .sectiontop > div:first-child {
    flex: 1; min-width: 0;
    display: grid; grid-template-columns: fit-content(56%) minmax(0, 1fr); align-items: end; column-gap: clamp(24px, 4vw, 56px);
  }
  .courses .kicker { grid-column: 1 / -1; }
  .courses .section-intro { max-width: 560px; margin-top: 0; padding-bottom: 5px; font-size: 15px; line-height: 1.5; }
  .courses .course-order { grid-column: 2; padding-bottom: 0; color: #8cebd4; }
}
@media (min-width: 1000px) and (max-height: 700px) {
  .courses { padding-block: 18px 20px; }
  .course-dots { display: none; }                          /* на низком экране хватает стрелок */
  .courses .next-slide { margin-top: 14px; }
}
/* планшет и телефон: кнопка «Подробнее» уходит под темы, оборот — в одну колонку */
@media (max-width: 999px) {
  .course-grid { --card-h: clamp(440px, calc(var(--slide) - 450px), 520px); }
  .course-top { display: contents; }
  .course-tag { order: 0; align-self: flex-start; }
  .course-copy { order: 1; }
  .course-marquee { order: 2; }
  .course-flip { order: 3; align-self: flex-start; margin-top: 14px; }
  .has-video .course-tag, .has-video .course-flip { max-width: calc(100% - var(--video-side) - 14px); }
}
@media (max-width: 700px) {
  .courses { padding-block: 36px 40px; }
  .courses .carousel-controls { display: none; }          /* на телефоне листают пальцем и точками */
  .course-grid {
    --card-h: clamp(460px, calc(var(--slide) - 150px), 640px);
    --card-pad: 20px;
    grid-auto-columns: 92%; gap: 12px;
    margin-top: 22px;
  }
  .course-copy { max-width: none; }
  .course-copy::before {                                   /* затемнение под текстом: тянется от заголовка до низа карточки */
    content: ""; position: absolute; z-index: -1; inset: -110px calc(-1 * var(--card-pad)) -280px;
    background: linear-gradient(0deg, #071114 0, #071114f2 calc(100% - 130px), #07111400 100%);
    pointer-events: none;
  }
  .course-copy h3 { font-size: clamp(27px, 8.4vw, 34px); }
  .course-copy p { font-size: 15px; }
  .course-copy h3, .course-copy p { text-shadow: 0 2px 12px #06201ecc; }
  .course-art { inset-block: 56px auto; inset-inline-end: 4%; max-width: 78%; height: 58%; }
  video.course-art {
    inset: 0; z-index: -2;
    width: 100%; height: 100%; margin: 0;
    border: 0; border-radius: 0; box-shadow: none;
    object-position: 50% 30%;                              /* при обрезке сохраняем верх кадра: там обычно лица и главное действие */
  }
  .has-video .course-front::before, [dir=rtl] .has-video .course-front::before {
    transform: none;
    background: linear-gradient(180deg, #07111480, transparent 24%), linear-gradient(0deg, #07111466, transparent 60%);
  }
  .has-video .course-copy, .has-video .course-tag, .has-video .course-flip { max-width: 100%; }
  .has-video .course-marquee, [dir=rtl] .has-video .course-marquee { margin-inline: calc(-1 * var(--card-pad)); }
  .course-back h3 { font-size: 26px; }
  .course-desc { font-size: 14px; line-height: 1.5; }
  .back-inside { margin-top: 14px; }
  .course-features li { font-size: 13px; }
  .course-features img { width: 38px; height: 38px; }
}
/* узкий телефон: оборот карточки компактнее, чтобы она не вырастала выше экрана */
@media (max-width: 440px) {
  .back-text > .course-tag { display: none; }              /* тема уже указана на лицевой стороне */
  .course-back h3 { margin-top: 0; font-size: 24px; }
  .course-features { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .course-features li { padding: 5px 8px; border-radius: 11px; }
  .course-features img { width: 30px; height: 30px; border-radius: 8px; }
}

/* ---------- 9. Механики ---------- */
.lab { padding-block: clamp(24px, 5vh, 48px); border-top: 1px solid #233036; }
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.path-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px;
  border: 1px solid #33454a; border-radius: 18px;
  background: #111e24;
  text-align: start;
  transition: border-color .2s, background .2s, transform .2s;
}
.path-card:hover, .activity-choice:hover:not(:disabled) { border-color: #78d8c5; background: #17292e; }
.path-card:hover { transform: translateY(-2px); }
.path-static, .path-static:hover { cursor: default; transform: none; }
.path-static:hover { border-color: #33454a; background: #111e24; }
.path-grid > .path-card:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* пятая карточка — на всю ширину */
.path-card img { flex-shrink: 0; width: clamp(64px, 20%, 92px); height: auto; aspect-ratio: 1; border-radius: 13px; object-fit: cover; }
.path-card > span { min-width: 0; }
.path-card strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.path-card small { display: block; margin-top: 5px; font-size: 14px; line-height: 1.45; color: #b4c2c3; }

@media (min-width: 1100px) and (min-height: 700px) {
  .path-grid { gap: 16px; }
  .path-card { gap: 20px; padding: 18px; border-radius: 20px; }
  .path-card img { width: 104px; border-radius: 15px; }
  .path-card strong { font-size: 21px; }
  .path-card small { font-size: 15px; }
}
@media (max-width: 800px) {
  .path-grid { gap: 9px; }
  .path-card { gap: 12px; padding: 12px; }
  .path-card strong { font-size: 17px; }
}
@media (max-width: 700px) {
  .lab { padding-block: 32px; }
  .path-grid { grid-template-columns: minmax(0, 1fr); }
  .path-card { gap: 16px; padding: 14px; }
  .path-card strong { font-size: 19px; }
}

/* ---------- 10. Скачивание ---------- */
.download {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; align-content: center; gap: 30px;
  padding-block: 60px;
  border-top: 1px solid #233036;
}
.download-price { margin-top: 10px; color: #8cebd4; font-weight: 600; }   /* демо-доступ и цены */
.download .actions { margin-top: 26px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 49px; padding: 0 22px;
  border-radius: 100px;
  font-size: 15px; font-weight: 650; white-space: nowrap;
}
.store svg { width: 20px; height: 20px; }
.soon-store { border: 1px dashed #4f6a6a; background: #0f1b20; color: #a9bcbc; cursor: default; }
.download-art { --orbit: 300px; position: relative; display: grid; place-items: center; min-width: 0; height: 340px; }
.download-art img {
  position: relative;
  width: auto; max-width: 100%; height: 100%; max-height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px #0009);
  animation: course-float 5s ease-in-out infinite;
}
.orbit {
  position: absolute;
  width: var(--orbit); max-width: 100%; aspect-ratio: 1;
  border: 1px dashed #80f0d640; border-radius: 50%;
  background: radial-gradient(circle, #26e4c133, transparent 65%);
}
.orbit::after {                                  /* огонёк бежит по кольцу: вращается узкая полоска с точкой на конце, а не весь квадрат — страница не растягивается вбок */
  content: ""; position: absolute; inset-block: -10px; left: calc(50% - 10px);
  width: 20px;
  background: radial-gradient(circle at 50% 10px, #80f0d6 0 4.5px, #80f0d666 5.5px, transparent 10px) no-repeat;
  animation: orbit 30s linear infinite;
}
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .download { grid-template-columns: minmax(0, 1fr); padding-block: 40px; }
  .download-art { --orbit: 220px; order: -1; height: 240px; }
  .download-art img { max-height: 240px; }
}
@media (max-width: 440px) {
  .store { padding-block: 8px; line-height: 1.25; white-space: normal; text-align: start; }
}

/* ---------- 11. Подвал ---------- */
footer {
  display: flex; align-items: center; gap: 22px;
  padding-block: 19px;
  border-top: 1px solid #27383c;
  font-size: 13px; color: #9aaeb4;
}
footer .brand img { width: 57px; }
footer a { padding-block: 6px; }
footer > a:last-child { margin-inline-start: auto; }
footer .legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-inline-start: auto; }
footer .legal:empty { display: none; }
footer .legal:not(:empty) + a { margin-inline-start: 0; }
footer .legal a:hover, footer > a:last-child:hover { color: #f5faf9; }

@media (max-width: 700px) { footer { flex-wrap: wrap; } }
@media (max-width: 440px) { footer { gap: 12px; font-size: 12px; } }

/* ---------- 12. Диалог и демозадания ---------- */
dialog {
  width: min(440px, calc(100% - 28px)); max-height: 90vh; max-height: 90dvh; padding: 0;
  overscroll-behavior: contain;
  border: 1px solid #426059; border-radius: 23px;
  background: #132227; color: #f2fbf9;
  box-shadow: 0 20px 90px #000a;
}
dialog::backdrop { background: #02090dcf; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.dialogtop { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px 0; }
.close { width: 36px; height: 36px; }
.dialogcontent { padding: 8px 25px 25px; }
.dialogcontent h2 { margin: 0 0 5px; font-size: 33px; }
.dialogcontent .role { font-size: 13px; color: #8cebd4; }
.profilepic { display: block; width: 84px; height: 84px; margin: 6px 0 17px; border-radius: 22px; background: var(--card); }
.bio { margin: 12px 0 18px; font-size: 15px; color: #bbc9cb; }
.bubble { margin: 12px 0; padding: 13px 16px; border-radius: 15px; border-end-start-radius: 3px; background: #25383d; font-size: 15px; }
.bubble.reply { margin-inline-start: 38px; border-radius: 14px; border-end-end-radius: 3px; background: #174b42; }
.choices { display: grid; gap: 8px; margin-top: 15px; }
.choices button, .replay {
  padding: 10px 14px;
  border: 1px solid #43665c; border-radius: 13px;
  background: #132d28; color: #9af6dd;
  font-size: 14px; text-align: start;
}
.choices button:hover, .replay:hover { background: #21463d; }
.replay { margin-top: 8px; }
.chat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; }
.chat-actions .replay { margin-top: 0; }
.choosebtn { padding: 10px 6px; background: none; color: #b9ceca; font-size: 13px; }
.choosebtn:hover { color: #eafff8; }
.friend-choices { display: grid; gap: 6px; margin-top: 16px; }
.friend-choices .listitem { gap: 12px; margin: 0; padding: 9px; border-radius: 13px; font-size: 15px; }
.friend-choices .listitem img { width: 44px; height: 44px; border-radius: 11px; }
.friend-choices .listitem small { margin-top: 1px; font-size: 13px; }

.activity-pic { width: 70px; height: 70px; margin: 4px 0 14px; border-radius: 14px; }
.pattern, .sequence {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  min-height: 41px; margin: 16px 0;
  font-size: 28px; line-height: 1.25; color: #96f5d9;
}
.pattern span, .sequence span, .tile {
  display: inline-grid; place-items: center;
  min-width: 41px; min-height: 41px;
  border: 1px solid #41605d; border-radius: 9px;
  background: #102323;
  font-weight: 600;
}
.pattern .missing { border-style: dashed; color: #aebbbf; }
[dir=rtl] .pattern, [dir=rtl] .sequence { justify-content: flex-end; }   /* ряд читается слева направо, но стоит у правого края, как остальной текст */
.lab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; }
.activity-choice, .tile {
  min-height: 41px; padding: 7px 13px;
  border: 1px solid #49625f; border-radius: 11px;
  background: #162e2c; color: #bcffe9;
  font-size: 15px;
}
.tile { font-size: 21px; }
.tile:hover:not(:disabled) { border-color: #78d8c5; }
.tile.circle, .pattern .circle { color: #81ebcf; }
.tile.diamond, .pattern .diamond { color: #d6b5fe; }
.activity-choice:disabled, .tile:disabled { opacity: .45; cursor: default; }
.activity-choice:focus-visible, .tile:focus-visible { outline-offset: -2px; }
.feedback { min-height: 22px; margin-top: 14px; font-size: 15px; color: #a2eed9; }
.cubeStage { display: grid; place-items: center; height: 150px; perspective: 500px; }
.demoCube { position: relative; width: 74px; height: 74px; transform-style: preserve-3d; transform: rotateX(-18deg) rotateY(25deg); }
.demoCube span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 2px solid #a0efd4;
  background: #17685f;
  font-size: 27px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.rotate-control { display: grid; gap: 8px; margin-top: 6px; font-size: 14px; color: #bbc9cb; }
.rotate-control input { width: 100%; height: 26px; margin: 0; accent-color: #7ae8c9; cursor: pointer; }

@media (max-width: 440px) { .dialogcontent { padding-inline: 18px; } }

/* ---------- 13. Полоса прогресса ---------- */
.progress { position: fixed; inset: 0 0 auto; z-index: 30; height: 3px; background: #ffffff0d; pointer-events: none; }
.progress b {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #53cddc, #80f0d6 70%, #c9fff0);
  box-shadow: 0 0 10px #80f0d6aa;
  transform: scaleX(var(--p, 0)); transform-origin: left center;
}
[dir=rtl] .progress b { background: linear-gradient(270deg, #53cddc, #80f0d6 70%, #c9fff0); transform-origin: right center; }
.progress .ticks i { position: absolute; top: 0; width: 3px; height: 100%; background: #060e13; }

/* ---------- 14. Появление и движение ---------- */
/* сдвиг задан свойством translate, а не transform, чтобы не спорить с наклоном карточек */
html.js .reveal {
  opacity: 0; translate: 0 28px;
  transition: opacity .7s ease var(--delay, 0ms), translate .7s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms);
}
html.js .reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.js .reveal { opacity: 1; translate: none; }
  /* бегущая строка тем становится обычным списком из первых тем */
  .course-marquee { -webkit-mask-image: none; mask-image: none; }
  .course-track { flex-wrap: wrap; width: auto; padding-inline: var(--card-pad); }
  .course-track span:nth-child(n+9) { display: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 700px) {
  .course-track span:nth-child(n+5) { display: none; }
}

/* ---------- 15. Большие экраны ---------- */
@media (min-width: 1800px) and (min-height: 880px) {
  :root { --phone-scale: 1.24; }
  .navwrap, .herowrap, .content, footer { max-width: 1600px; }
  .stage { height: 740px; }
  h1 { font-size: 108px; }
  .intro > p { max-width: 540px; font-size: 21px; }
  .castnote { margin-top: 28px; font-size: 14px; }
  h2 { font-size: 60px; }
  .section-intro { max-width: 740px; font-size: 19px; }
  .posters { gap: 20px; margin-block: 40px 36px; }
  .poster strong { font-size: 22px; }
  .poster figcaption span { font-size: 16px; }
  .course-grid { --card-h: clamp(320px, calc(var(--slide) - 480px), 580px); grid-auto-columns: min(86%, 1180px); }
  .course-copy h3 { font-size: 54px; }
  .course-copy p { font-size: 19px; }
  .course-back h3 { font-size: 36px; }
  .course-desc { font-size: 17px; }
  .course-features li { font-size: 15px; }
  .path-grid { gap: 18px; }
  .path-card { gap: 22px; padding: 20px; border-radius: 22px; }
  .path-card img { width: 112px; border-radius: 16px; }
  .path-card strong { font-size: 24px; }
  .path-card small { font-size: 17px; }
  .download-art { --orbit: 380px; height: 440px; }
  .download-art img { max-height: 440px; }
}
/* очень большой монитор (2560×1440 и крупнее): всё ещё на ступень больше, чтобы страница не терялась на экране */
@media (min-width: 2300px) and (min-height: 1200px) {
  :root { --phone-scale: 1.5; --hh: 92px; }
  .navwrap, .herowrap, .content, footer { max-width: 1960px; }
  .brand img { width: 104px; }
  .navwrap nav a, .language select { font-size: 16px; }
  .navcta { padding: 11px 21px; font-size: 17px; }
  .primary, .secondary, .store { min-height: 58px; padding: 0 28px; font-size: 17px; }
  .stage { height: 890px; }
  .eyebrow { padding: 8px 15px; font-size: 13px; }
  h1 { font-size: 132px; }
  .intro > p { max-width: 660px; font-size: 25px; }
  .castnote { font-size: 16px; }
  .friend-stack li { width: 29px; height: 40px; }
  .friend-stack li:last-child { width: 40px; }
  .friend-stack img { width: 40px; height: 40px; }
  .kicker { font-size: 12px; }
  h2 { font-size: 74px; }
  .section-intro { max-width: 900px; font-size: 23px; }
  .posters { gap: 26px; margin-block: 52px 44px; }
  .poster figcaption { padding: 80px 22px 22px; }
  .poster strong { font-size: 27px; }
  .poster figcaption span { font-size: 19px; }
  .course-grid { --card-h: clamp(320px, calc(var(--slide) - 590px), 720px); --card-pad: 34px; grid-auto-columns: min(86%, 1440px); gap: 24px; }
  .course-tag { padding: 7px 14px; font-size: 13px; }
  .course-flip { padding: 10px 18px; font-size: 15px; }
  .course-copy h3 { font-size: 68px; }
  .course-copy p { font-size: 23px; }
  .course-track span { padding: 9px 16px; font-size: 15px; }
  .course-back h3 { font-size: 44px; }
  .course-module { font-size: 17px; }
  .course-desc { max-width: 780px; font-size: 20px; }
  .course-inside { font-size: 13px; }
  .course-features { gap: 12px; }
  .course-features li { gap: 14px; padding: 11px; font-size: 18px; }
  .course-features img { width: 58px; height: 58px; border-radius: 12px; }
  .course-back-actions .primary, .course-back-actions .secondary { min-height: 54px; font-size: 16px; }
  .course-dots { margin-top: 10px; }
  .path-grid { gap: 22px; }
  .path-card { gap: 28px; padding: 26px; border-radius: 26px; }
  .path-card img { width: 140px; border-radius: 20px; }
  .path-card strong { font-size: 30px; }
  .path-card small { font-size: 20px; }
  .download-art { --orbit: 470px; height: 550px; }
  .download-art img { max-height: 550px; }
  footer { font-size: 15px; }
  footer .brand img { width: 70px; }
}
