/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 13px;
  font: 600 16px/1.2 var(--f-body); white-space: nowrap;
  transition: transform .25s var(--ease-spring), box-shadow .25s ease, background-color .2s ease, border-color .2s ease;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.btn { max-width: 100%; }
.btn-cont { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding-top: 8px; padding-bottom: 8px; }
.btn-cont span { line-height: 1.2; }
.btn-cont small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px/1.3 var(--f-body); color: var(--text-2); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--accent-btn); color: var(--on-accent); box-shadow: 0 8px 22px rgba(196, 85, 46, .28); }
.btn-main:hover { box-shadow: 0 12px 28px rgba(196, 85, 46, .36); transform: translateY(-1px); }
.btn-sec { background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong); }
.btn-sec:hover { border-color: var(--accent); }
.link { color: var(--accent-text); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.link svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.link:hover svg { transform: translateX(3px); }

/* ---------- карточки ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-s); overflow: hidden;
  transition: transform .35s var(--ease-spring), box-shadow .3s ease, border-color .3s ease;
}
.card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: var(--line-strong); }
.card.hoverable::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(233, 162, 59, .14), transparent 60%);
}
.card.hoverable:hover::after { opacity: 1; }
.ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.ic svg { width: 22px; height: 22px; }

/* ---------- рамка-окно для картинок ---------- */
.frame { position: relative; border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-frame); background: var(--surface-2); isolation: isolate; }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--frame-edge); pointer-events: none; z-index: 3; }
.frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform .9s var(--ease-out); }
/* отдельный слой видеопамяти — только у картинок с параллаксом */
.frame.par img { transform: scale(1.06) translate3d(var(--px, 0), var(--py, 0), 0); }
/* медленное приближение идёт, только пока картинка на экране */
.frame.kb img { animation: kenburns 28s ease-in-out infinite alternate; animation-play-state: paused; }
.frame.kb.kb-run img { animation-play-state: running; }
.frame .cap {
  position: absolute; z-index: 4; left: 16px; bottom: 14px; padding: 7px 12px; border-radius: 10px;
  background: rgba(23, 18, 14, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #F8EFE4; font: 600 12.5px/1.3 var(--f-head);
}

/* ---------- главная: первый экран ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr); gap: 52px; align-items: center; min-height: min(680px, calc(100vh - 150px)); padding: 24px 0 12px; }
.hero::before { content: ""; position: absolute; inset: -10% 0 -10% 30%; background: radial-gradient(50% 55% at 60% 50%, var(--bg-glow), transparent 70%); z-index: -1; pointer-events: none; }
.hero h1 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.06; margin: 18px 0 18px; letter-spacing: -.025em; }
.hero h1 .grad { display: inline-block; }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 46ch; }
.hero .btns { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero .frame { aspect-ratio: 16 / 9; transform: rotate(1.1deg); }
.stats { display: flex; gap: 32px; margin-top: 38px; flex-wrap: wrap; }
.stats b { display: block; font: 800 28px/1.1 var(--f-head); letter-spacing: -.02em; }
.stats span { font-size: 13.5px; color: var(--text-2); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.feature .ic { margin-bottom: 8px; }
.feature h3 { font-size: 17px; }
.feature p { font-size: 14.5px; color: var(--text-2); flex: 1; }
.feature .link { margin-top: 8px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: st; }
.step { padding: 22px; }
.step::before {
  counter-increment: st; content: counter(st); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font: 800 15px var(--f-head); margin-bottom: 12px;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--text-2); }

/* ---------- модули и лекции ---------- */
.modules-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-tile { display: block; }
.module-tile .frame { aspect-ratio: 16 / 10; box-shadow: var(--shadow-m); border-radius: var(--r-m); }
.module-tile .over { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; background: linear-gradient(0deg, rgba(20, 13, 8, .9) 0%, rgba(20, 13, 8, .62) 45%, rgba(20, 13, 8, .18) 78%, transparent); text-shadow: 0 1px 10px rgba(0, 0, 0, .55); color: #F8EFE4; }
.module-tile .over small { font: 700 12px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #F2C46D; }
.module-tile .over b { font: 800 19px/1.2 var(--f-head); margin-top: 4px; }
.module-tile .over span { font-size: 13.5px; opacity: .85; margin-top: 2px; }
.module-tile:hover .frame img { transform: scale(1.1); }

.module-block { margin-top: 44px; }
.module-banner { aspect-ratio: 32 / 9; border-radius: var(--r-l); }
.module-banner .over { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 40px; color: #F8EFE4;
  background: linear-gradient(90deg, rgba(20, 13, 8, .88) 0%, rgba(20, 13, 8, .66) 40%, rgba(20, 13, 8, .22) 72%, rgba(20, 13, 8, .1) 100%);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.module-banner .over .label { color: #F2C46D; }
.module-banner .over h2 { font-size: clamp(24px, 2.6vw, 34px); max-width: 26ch; }
.module-banner .over p { font-size: 15px; opacity: .88; max-width: 44ch; }
.lect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.lect-card { display: flex; flex-direction: column; }
.lect-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.lect-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.lect-card:hover .thumb img { transform: scale(1.06); }
.lect-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lect-card .num { font: 800 12px var(--f-head); letter-spacing: .1em; color: var(--accent-text); text-transform: uppercase; }
.lect-card h3 { font-size: 17px; line-height: 1.25; }
.lect-card p { font-size: 14px; color: var(--text-2); flex: 1; }
.lect-card .meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font: 600 12.5px var(--f-head); color: var(--text-2); }
.bar { flex: 1; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s var(--ease-out); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12px var(--f-head); background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- страница лекции ---------- */
.banner { aspect-ratio: 21 / 8; }
.banner .shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(23, 15, 10, .86) 0%, rgba(23, 15, 10, .58) 34%, rgba(23, 15, 10, .12) 58%, transparent 72%); }
.banner .in { position: absolute; z-index: 3; left: 40px; right: 42%; bottom: 34px; color: #F8EFE4; display: grid; gap: 10px; text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.banner .in .label { color: #F2C46D; }
.banner h1 { font-size: clamp(30px, 3.6vw, 46px); }
.banner p { color: rgba(248, 239, 228, .88); font-size: 16px; max-width: 46ch; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .15); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 600 12.5px var(--f-head); color: #F8EFE4; }
.chip svg { width: 15px; height: 15px; }
.tabs { display: flex; gap: 8px; align-items: center; margin: 26px 0 22px; flex-wrap: wrap; }
.tab { min-height: 44px; padding: 10px 20px; border-radius: 13px; font: 700 15px var(--f-head); color: var(--text-2); border: 1.5px solid var(--line); background: var(--surface); transition: all .2s ease; }
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--on-accent); }
.tabs .grow { flex: 1; }
.tab-note { font: 600 13px var(--f-head); color: var(--text-2); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.pager a { flex: 1 1 260px; padding: 16px 18px; display: grid; gap: 4px; }
.pager a small { font: 700 12px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.pager a b { font: 800 16px var(--f-head); }
.pager a.next { text-align: right; }

/* ---------- пустое состояние «скоро» ---------- */
.soon { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.soon h2 { font-size: 22px; margin-bottom: 8px; }
.soon p { color: var(--text-2); font-size: 15.5px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics li { list-style: none; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }

/* ---------- аккордеон ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; gap: 14px; align-items: center; font: 700 16px/1.35 var(--f-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 36px; height: 36px; flex: none; }
.faq summary .plus { margin-left: auto; width: 26px; height: 26px; flex: none; color: var(--text-2); transition: transform .35s var(--ease-spring); }
.faq details[open] summary .plus { transform: rotate(45deg); color: var(--accent); }
.faq .ans { padding: 0 18px 18px 68px; color: var(--text-2); font-size: 15.5px; }

/* ---------- схемы ---------- */
.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.scheme-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.scheme-card .top { display: flex; align-items: center; gap: 12px; }
.scheme-card h3 { font-size: 17px; }
.scheme-card p { font-size: 14px; color: var(--text-2); flex: 1; }
.points { display: grid; gap: 10px; counter-reset: pt; }
.points li { list-style: none; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); font-size: 15.5px; }
.points li::before { counter-increment: pt; content: counter(pt); position: absolute; left: 16px; top: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 800 13px var(--f-head); }
.points li b { font-family: var(--f-head); }
.note { padding: 14px 16px; border-radius: var(--r-m); background: var(--warn-soft); color: var(--text); font-size: 15px; border-left: 4px solid var(--warn); }

/* ---------- прогресс ---------- */
.prog-list { display: grid; gap: 8px; }
.prog-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 160px 90px; gap: 14px; align-items: center; padding: 10px 14px; }
.prog-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.prog-row b { font: 700 15px var(--f-head); }
.prog-row .r { font: 600 13px var(--f-head); color: var(--text-2); text-align: right; }

/* ---------- лист «Ещё» (телефон) ---------- */
.sheet { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); display: grid; gap: 4px; transform: translateY(16px) scale(.98); opacity: 0; pointer-events: none; transition: transform .3s var(--ease-spring), opacity .2s ease; }
.sheet.open { transform: none; opacity: 1; pointer-events: auto; }
.sheet a, .sheet button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font: 600 15.5px var(--f-head); text-align: left; width: 100%; }
.sheet a:hover, .sheet button:hover { background: var(--surface-2); }
.sheet svg { width: 22px; height: 22px; color: var(--accent); }
.sheet .state { margin-left: auto; font-size: 13px; color: var(--text-2); }

/* ---------- заставка ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; transition: opacity .6s ease, visibility .6s; cursor: pointer; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash .word { font: 800 clamp(34px, 7vw, 76px)/1 var(--f-head); letter-spacing: -.02em; display: flex; }
.splash .word span { display: inline-block; opacity: 0; transform: translateY(26px) rotate(4deg); animation: letter .6s var(--ease-spring) forwards; }
.splash .word .m { transition: color .5s ease; }
.splash.morph .word .m1 { color: var(--accent); }
.splash.morph .word .m2 { color: var(--accent-2); }
.splash .sub { margin-top: 18px; text-align: center; font: 700 15px var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); opacity: 0; animation: fadein .6s ease 1s forwards; }
.splash .skip { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--text-2); }

/* ---------- уведомление ---------- */
.toast { position: fixed; z-index: 60; left: 50%; top: 18px; transform: translate(-50%, -20px); opacity: 0; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font: 600 14px var(--f-head); box-shadow: var(--shadow-m); transition: all .3s var(--ease-spring); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- адаптив ---------- */
@media screen and (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 28px; }
  .hero .frame { order: -1; transform: none; }
  .soon { grid-template-columns: minmax(0, 1fr); }
  .banner .in { right: 32%; }
}
@media screen and (max-width: 767px) {
  .hero { padding-top: 4px; gap: 20px; }
  .hero h1 { font-size: 32px; margin: 12px 0 12px; }
  .hero .lead { font-size: 16px; }
  .hero .btns { margin-top: 22px; }
  .hero .btns .btn { flex: 1 1 auto; min-width: 0; }
  .hero .btns .btn-main { white-space: nowrap; }
  .btn { white-space: normal; text-align: center; }
  .hero .frame { border-radius: 18px; }
  .stats { gap: 22px; margin-top: 24px; }
  .stats b { font-size: 23px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feature { padding: 14px; }
  .feature h3 { font-size: 15px; }
  .feature p { font-size: 13.5px; }
  .steps, .modules-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .module-banner { aspect-ratio: auto; min-height: 240px; display: flex; border-radius: 18px; }
  .module-banner img { position: absolute; inset: 0; }
  .module-banner .over { position: relative; inset: auto; flex: 1; justify-content: flex-end; padding: 72px 18px 18px;
    background: linear-gradient(0deg, rgba(20, 13, 8, .92) 0%, rgba(20, 13, 8, .76) 50%, rgba(20, 13, 8, .42) 100%); }
  .module-banner .over h2 { font-size: 23px; line-height: 1.15; max-width: none; }
  .module-banner .over p { font-size: 14.5px; }
  .lect-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lect-card { flex-direction: row; }
  .lect-card .thumb { width: 38%; flex: none; aspect-ratio: auto; }
  .lect-card .body { padding: 12px 14px; gap: 3px; }
  .lect-card h3 { font-size: 15.5px; }
  .lect-card p { display: none; }
  .banner { aspect-ratio: 4 / 5; border-radius: 18px; }
  .banner .shade { background: linear-gradient(0deg, rgba(23, 15, 10, .88) 0%, rgba(23, 15, 10, .5) 45%, transparent 75%); }
  .banner .in { left: 18px; right: 18px; bottom: 20px; }
  .banner h1 { font-size: 30px; }
  .banner p { font-size: 14.5px; }
  .tabs { margin: 16px 0 14px; }
  .tab { flex: 1 1 auto; text-align: center; padding: 10px 10px; font-size: 14px; }
  .tab .long { display: none; }
  .tabs .grow, .tab-note { display: none; }
  .soon { padding: 18px; gap: 18px; }
  .faq .ans { padding: 0 16px 16px 16px; }
  .points li { padding-left: 52px; font-size: 15px; }
  .prog-row { grid-template-columns: 40px minmax(0, 1fr) 70px; }
  .prog-row .bar { display: none; }
}
