/* Фестивальный вариант лендинга «Чёрная пятница» МИР КПТ.
   Тёплая слоновая кость + золото, винный акцент для скидки, чёрная «лента» как символ Чёрной пятницы.
   3D: сцена Three.js в хиро, наклон карточек за курсором, переворот карточек ведущих. */
:root {
  color-scheme: light;
  --bg: #fbf5ea;
  --bg-2: #f4ead6;
  --paper: #ffffff;
  --ink: #18120e;
  --ink-2: #2a211b;
  --muted: #6f655b;
  --line: #eadfca;
  --gold: #c8973a;
  --gold-hi: #f4d98f;
  --gold-lo: #9e7323;
  --gold-text: #87601a;
  --gold-tint: #f8edd2;
  --wine: #8b1e2d;
  --wine-tint: #f7e3e3;
  --blue: #3f6296;
  --blue-text: #2c4f80;
  --blue-tint: #e6edf8;
  --font-head: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  /* имена из первого варианта, чтобы карточка курса переносилась без правок */
  --panel: var(--paper); --fg: var(--ink);
  --shadow: 0 1px 2px rgba(24, 18, 14, .05), 0 18px 40px -22px rgba(24, 18, 14, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font-body); overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); }
html.is-locked, html.is-locked body { overflow: hidden; }

/* ---------- Общие элементы ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
.eyebrow::before { content: ""; width: 8px; height: 8px; rotate: 45deg; background: var(--gold); }
h2 { margin-top: 14px; font: 700 clamp(2rem, 7vw, 3.6rem)/1 var(--font-head); letter-spacing: -.01em; text-wrap: balance; }
.lead { margin-top: 16px; max-width: 34em; font-size: 17px; color: var(--muted); }
.gold-text { background: linear-gradient(100deg, #b98a2e, #e3b95c 45%, #9e7323); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s, background-color .2s, border-color .2s; }
.btn-gold { overflow: hidden; color: #1e1505; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)) border-box; box-shadow: 0 12px 26px -12px rgba(158, 115, 35, .85), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .7) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat; animation: sheen 4s ease-in-out 2s infinite; }
.btn-gold:hover { box-shadow: 0 18px 34px -12px rgba(158, 115, 35, .9), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-ghost { border-color: rgba(24, 18, 14, .18); background: rgba(255, 255, 255, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--gold); background: #fff; }
.btn-xl { min-height: 60px; padding: 0 36px; font-size: 17px; }
@keyframes sheen { 0%, 62% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* Появление блоков при прокрутке (только если работает скрипт) */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- Хиро ---------- */
.hero { position: relative; isolation: isolate; min-height: max(640px, 100svh); display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 46%, #fffdf7 0, rgba(255, 253, 247, 0) 70%), radial-gradient(90% 80% at 50% 0, #fbf1dc, var(--bg) 70%); }
#stage { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-fallback { position: absolute; inset: 0; z-index: -2; background: url("../img/sphere-gold.png") 8% 22% / 110px no-repeat, url("../img/spring-gold.png") 88% 18% / 90px no-repeat, url("../img/sphere-gold.png") 84% 76% / 70px no-repeat, url("../img/spring-gold.png") 12% 78% / 70px no-repeat; opacity: 0; transition: opacity .6s; }
.no-webgl .hero-fallback { opacity: 1; }
.topbar { width: 100%; position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 16px; }
.tel { padding: 10px 0; font-size: 14px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 500 17px/1 var(--font-head); color: var(--ink); }
.logo i { --s: 50px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; background: url("../img/emblem.png") center / cover no-repeat; }
.logo-t { display: grid; gap: .2em; }
.logo-t b { font-weight: 500; letter-spacing: .03em; }
.logo-t small { font: 500 .36em/1.17 var(--font-head); letter-spacing: .04em; text-transform: uppercase; }

.hero-in { width: 100%; position: relative; z-index: 1; flex: 1; display: grid; align-content: center; justify-items: center; gap: 0; padding-block: 24px 96px; text-align: center; pointer-events: none; }
.hero-in a, .hero-in button { pointer-events: auto; }
.kicker { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 13px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; animation: up .8s var(--ease) .1s both; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 0 0 rgba(255, 90, 90, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(255, 90, 90, 0); } }
h1 { margin-top: clamp(26px, 4.5vw, 52px); display: grid; justify-items: center; font: 800 clamp(3rem, 15vw, 9.6rem)/.9 var(--font-head); letter-spacing: -.02em; text-transform: uppercase; }
.w { display: block; animation: drop 1s var(--ease) both; }
.w1 { color: var(--ink); animation-delay: .15s; }
.w2 { animation-delay: .3s, 1.8s; animation-name: drop, shine; animation-duration: 1s, 5s; animation-iteration-count: 1, infinite; animation-timing-function: var(--ease), ease-in-out;
  background: linear-gradient(90deg, #e1bd63 0, #9e7323 33.333%, #c99a3c 45%, #fff3c2 50%, #f0d68a 54%, #e1bd63 66.667%, #9e7323 100%) 100% 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 18px rgba(158, 115, 35, .25)); }
/* Текст хиро виден с первого кадра: анимация двигает его, но не прячет */
@keyframes drop { from { transform: translateY(40px) scale(.96); } }
@keyframes up { from { transform: translateY(16px); } }
@keyframes shine { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.offer { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; font: 600 clamp(1.05rem, 3.6vw, 1.35rem)/1.15 var(--font-head); text-align: left; animation: up .8s var(--ease) .6s both; }
.n3 { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--gold-hi); font: 800 38px/1 var(--font-head); box-shadow: 0 10px 24px -10px rgba(24, 18, 14, .6); }
.eq { font-size: 1.6em; color: var(--gold); }
.price { padding: 10px 18px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font: 800 clamp(1.8rem, 6vw, 2.6rem)/1 var(--font-head); font-variant-numeric: tabular-nums; }
.was { margin-top: 12px; color: var(--muted); font-size: 16px; animation: up .8s var(--ease) .7s both; }
.was s { text-decoration-thickness: 2px; text-decoration-color: var(--wine); }
.was mark { margin-left: 6px; padding: 3px 9px; border-radius: 999px; background: var(--wine); color: #fff; font: 700 14px/1.2 var(--font-head); }

.timer { margin-top: 40px; display: flex; align-items: flex-end; gap: 4px; animation: up .8s var(--ease) 1s both; }
.timer-cap { align-self: center; margin-right: 10px; font-size: 13px; color: var(--muted); }
.timer div { display: grid; justify-items: center; gap: 4px; min-width: 64px; padding: 6px 8px; }
.timer div + div { border-left: 1px solid rgba(24, 18, 14, .14); }
.timer b { display: block; height: 1em; overflow: hidden; font: 600 32px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.timer b.roll { animation: roll .45s var(--ease); }
@keyframes roll { from { transform: translateY(-60%); opacity: 0; } }
.timer small { font-size: 12px; color: var(--muted); }

.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 2; translate: -50% 0; width: 28px; height: 44px; border: 2px solid rgba(24, 18, 14, .25); border-radius: 999px; }
.scroll-hint i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; translate: 0 0; } 30% { opacity: 1; } 100% { opacity: 0; translate: 0 14px; } }

/* ---------- Бегущая строка: две ленты крест-накрест ---------- */
.ticker { position: relative; z-index: 2; margin-block: -36px 40px; padding-block: 30px; overflow: hidden; }
.ticker-row { position: relative; padding-block: 14px; background: var(--ink); color: #fff; rotate: -2deg; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .55); }
.ticker-row.alt { margin-top: -12px; background: linear-gradient(90deg, var(--gold-lo), var(--gold) 30%, var(--gold-hi) 50%, var(--gold) 70%, var(--gold-lo)); color: #1e1505; rotate: 1.6deg; }
.ticker-track { display: flex; width: max-content; gap: 34px; font: 700 18px/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; animation: marquee 60s linear infinite; }
.ticker-row.alt .ticker-track { animation-direction: reverse; animation-duration: 75s; }
.ticker-track span { display: inline-flex; align-items: center; gap: 34px; }
.ticker-track span::after { content: "✦"; color: var(--gold-hi); }
.ticker-row.alt .ticker-track span::after { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Математика выгоды ---------- */
.math { display: grid; gap: 40px; align-items: center; padding-block: 56px; }
.pick { margin-top: 26px; display: inline-flex; padding: 5px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.pick button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-weight: 600; color: var(--muted); transition: background-color .25s, color .25s; }
.pick button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.receipt { position: relative; justify-self: center; width: min(100%, 420px); perspective: 900px; }
.receipt-in { position: relative; padding: 26px 26px 28px; border-radius: 22px; background: var(--paper); box-shadow: 0 40px 60px -36px rgba(24, 18, 14, .45), inset 0 0 0 1px var(--line); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease); transform-style: preserve-3d;
  -webkit-mask: radial-gradient(10px at 50% 100%, transparent 98%, #000) 50% 100% / 26px 100% repeat-x; mask: radial-gradient(10px at 50% 100%, transparent 98%, #000) 50% 100% / 26px 100% repeat-x; }
.r-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px dashed var(--line); font-size: 13px; color: var(--muted); }
.r-head span:first-child { font: 700 15px/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.receipt dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.receipt dt { color: var(--muted); }
.receipt dd { font-weight: 600; }
.receipt s { color: var(--muted); text-decoration-color: var(--wine); text-decoration-thickness: 2px; }
.r-save dd { color: var(--wine); }
.r-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 20px; font: 600 16px/1 var(--font-head); }
.r-total b { font: 800 40px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.receipt .btn { width: 100%; }
.stamp { position: absolute; top: -18px; right: -10px; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--wine); color: #fff; font: normal 800 24px/1 var(--font-head); rotate: 12deg; box-shadow: 0 14px 28px -12px rgba(139, 30, 45, .7), inset 0 0 0 4px rgba(255, 255, 255, .25); animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 50% { rotate: 4deg; scale: 1.05; } }

/* ---------- Шаги ---------- */
.steps { padding-block: 40px 56px; }
.steps ol { list-style: none; margin-top: 30px; padding: 0; display: grid; gap: 16px; }
.steps li { position: relative; padding: 26px 24px 24px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); overflow: hidden; }
.steps li b { position: absolute; right: 14px; top: -14px; font: 800 120px/1 var(--font-head); color: transparent; -webkit-text-stroke: 2px var(--gold-tint); }
.steps h3 { position: relative; font: 700 22px/1.2 var(--font-head); }
.steps li p { position: relative; margin-top: 8px; color: var(--muted); }

/* ---------- Каталог ---------- */
.catalog { padding-block: 40px 64px; }
.cat-head { display: grid; gap: 20px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-weight: 600; color: var(--muted); transition: background-color .2s, color .2s, border-color .2s; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips small { padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 12px; font-variant-numeric: tabular-nums; }
.chips button[aria-pressed="true"] small { background: rgba(255, 255, 255, .18); }
.mk { width: 8px; height: 8px; }
.mk.tr { rotate: 45deg; background: var(--gold); }
.mk.sm { border-radius: 50%; background: var(--blue); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
/* Карточка курса — как в первом варианте лендинга. Верх — цветная плашка с типом, потоком и названием; в её правом нижнем углу вырез,
   в котором наполовину сидит кнопка «Купить». Ниже ведущий, начало описания и «Подробнее».
   Тренинг и семинар различаются цветом плашки, метки и аватара. */
.card { --tone: var(--gold); --tone-text: var(--gold-text); --tone-bg: var(--gold-tint); --plate: linear-gradient(145deg, #fcf5e3, #f2e2ba);
  --btn-h: 46px; --notch-pad: 9px; --r-btn: 14px;
  /* Выпуклый угол выреза повторяет скругление кнопки, вогнутый занимает остаток высоты — так дуги стыкуются без зазора */
  --r-out: calc(var(--r-btn) + var(--notch-pad)); --r-in: calc(var(--btn-h) / 2 - var(--r-btn));
  display: flex; flex-direction: column; min-width: 0; padding: 10px 10px 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel);
  box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s, transform .25s; }
.card.sem { --tone: #4a6ea0; --tone-text: #2f5183; --tone-bg: #e8eef7; --plate: linear-gradient(145deg, #f3f7fc, #dbe6f4); }
.card:hover { border-color: color-mix(in srgb, var(--tone) 45%, var(--line)); box-shadow: 0 1px 2px rgba(23, 23, 27, .04), 0 22px 40px -18px rgba(23, 23, 27, .22); transform: translateY(-3px); }
.top { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 212px; padding: 16px 18px calc(var(--btn-h) / 2 + var(--notch-pad) + 18px); border-radius: 16px; background: var(--plate); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 4px; }
/* Иллюстрация курса: белая «наклейка» в углу плашки, слегка повёрнута и выпрямляется при наведении */
.art { flex: none; width: 68px; height: 68px; margin: -2px -4px 0 0; border-radius: 20px; object-fit: cover; background: #fff; box-shadow: 0 10px 20px -12px rgba(23, 23, 27, .35), 0 0 0 1px rgba(255, 255, 255, .7); rotate: 4deg; transition: rotate .3s, scale .3s; }
.card:hover .art { rotate: 0deg; scale: 1.05; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .78); font: 600 12px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--tone-text); }
.chip::before { content: ""; width: 6px; height: 6px; rotate: 45deg; background: var(--tone); }
.card.sem .chip::before { rotate: none; border-radius: 50%; }
.stream { font-size: 13px; color: var(--tone-text); opacity: .8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card h3 { font: 600 21px/1.22 var(--font-head); letter-spacing: .005em; text-wrap: balance; }
/* Вырез: блок цвета карточки в углу плашки, выступает вниз на половину кнопки; два вогнутых скругления по краям */
.notch { position: absolute; right: 0; bottom: calc(var(--btn-h) / -2); padding: var(--notch-pad) 0 0 var(--notch-pad); border-top-left-radius: var(--r-out); background: var(--panel); }
.notch::before, .notch::after { content: ""; position: absolute; width: var(--r-in); height: var(--r-in); background: radial-gradient(circle at 0 0, transparent calc(var(--r-in) - .5px), var(--panel) var(--r-in)); }
.notch::before { left: calc(var(--r-in) * -1); top: calc(var(--btn-h) / 2 + var(--notch-pad) - var(--r-in)); }
.notch::after { right: 0; top: calc(var(--r-in) * -1); }
.buy { display: flex; min-height: var(--btn-h); padding: 0 28px; border-radius: var(--r-btn); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; margin: calc(var(--btn-h) / 2 + 12px) 10px 0; }
.who i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tone-bg); font: normal 600 13px/1 var(--font-head); letter-spacing: .04em; color: var(--tone-text); }
.who .ava { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--tone-bg); }
.who p { min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.who small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.desc { margin: 14px 10px 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.who + .desc { margin-top: 14px; }
/* Ключевая фраза описания: тёмный текст на мягком маркере цвета типа курса */
.desc em { font-style: normal; font-weight: 500; color: var(--fg); background: linear-gradient(transparent 12%, var(--tone-bg) 12%, var(--tone-bg) 94%, transparent 94%); border-radius: 3px; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.top + .desc, .top + .more { margin-top: calc(var(--btn-h) / 2 + 12px); }
.more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: auto 10px 0; padding: 8px 0 0; border: 0; background: none; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--fg); }
.more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate .2s; }
.more:hover { color: var(--tone-text); }
.more:hover svg { translate: 4px 0; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Ведущие: 3D-переворот ---------- */
.people { padding-block: 40px 56px; }
.people-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.flip { container-type: inline-size; position: relative; min-height: 380px; perspective: 1200px; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; }
.flip-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.flip:hover .flip-in, .flip:focus-visible .flip-in, .flip.on .flip-in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.front { justify-content: flex-end; padding: 22px; background: var(--ink); color: #fff; }
.face.front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.face.front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(24, 18, 14, .92)); }
.face.front > * { position: relative; z-index: 1; }
.face b { font: 700 21px/1.15 var(--font-head); }
.face small { margin-top: 4px; font-size: 13px; opacity: .8; }
.face.back { transform: rotateY(180deg); padding: 22px; background: linear-gradient(160deg, #fffaf0, var(--gold-tint)); box-shadow: inset 0 0 0 1px var(--line); }
.face.back .reg { position: relative; display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2, var(--ink)); }
.face.back .reg::before { content: ""; position: absolute; top: 0; left: 0; width: 34px; height: 2px; border-radius: 2px; background: var(--gold); }
/* узкая карточка: самый длинный текст регалий должен поместиться без прокрутки */
@container (max-width: 330px) { .face.back { padding: 18px; } .face.back .reg { font-size: 12.5px; line-height: 1.4; } }

/* ---------- Вопросы ---------- */
.faq { padding-block: 40px 56px; }
.faq-list { margin-top: 26px; display: grid; gap: 10px; max-width: 860px; }
.faq details { border-radius: 20px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.faq summary { position: relative; padding: 20px 56px 20px 22px; cursor: pointer; list-style: none; font: 600 18px/1.3 var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-tint); color: var(--gold-text); font: 600 20px/1 var(--font-body); transition: rotate .3s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* Пересечения по времени: пары курсов «лоб в лоб», под ними даты, когда занятия совпадают */
.clash-body { display: grid; gap: 12px; padding: 0 22px 22px; }
.faq .clash-body > p { padding: 0; }
.clash-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; padding: 12px; border-radius: 18px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.clash-c { --tone: var(--gold); --tone-text: var(--gold-text); display: grid; align-content: start; gap: 8px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(145deg, #fcf5e3, #f2e2ba); }
.clash-c.sem { --tone: #4a6ea0; --tone-text: #2f5183; background: linear-gradient(145deg, #f3f7fc, #dbe6f4); }
.clash-c .chip { justify-self: start; }
.clash-c.sem .chip::before { rotate: none; border-radius: 50%; }
.clash-c b { font: 600 17px/1.25 var(--font-head); color: var(--ink); }
.clash-c small { font-size: 13px; color: var(--tone-text); font-variant-numeric: tabular-nums; }
.clash-x { align-self: center; position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--wine); box-shadow: 0 6px 14px -6px rgba(139, 30, 45, .6); }
.clash-x::before, .clash-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; border-radius: 2px; background: #fff; translate: -50% -50%; rotate: 45deg; }
.clash-x::after { rotate: -45deg; }
.faq .clash-when { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 4px 0; color: var(--ink-2); }
.clash-when span { font: 600 12px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--wine); margin-right: 2px; }
.clash-when time { padding: 6px 11px; border-radius: 999px; background: var(--wine-tint); font: 600 14px/1 var(--font-body); color: var(--wine); }
.clash-when em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) {
  .clash-body { padding: 0 14px 18px; }
  .clash-pair { grid-template-columns: 1fr; gap: 0; }
  .clash-x { justify-self: center; margin: -9px 0; z-index: 1; width: 30px; height: 30px; border: 3px solid var(--bg); }
  .faq .clash-when { margin-top: 12px; }
}

/* ---------- Заявка ---------- */
.apply { padding-block: 40px 72px; scroll-margin-top: 20px; }
.apply-box { margin-top: 28px; border-radius: 26px; background: var(--paper); box-shadow: 0 40px 70px -40px rgba(24, 18, 14, .45), inset 0 0 0 1px var(--line); overflow: hidden; }
.apply-box iframe { display: block; width: 100%; min-height: 720px; border: 0; }
.notice { margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: var(--wine-tint); color: var(--muted); font-size: 15px; }
.notice b { color: var(--wine); font-weight: 600; }

/* ---------- Нижняя панель на телефоне ---------- */
.dock { position: fixed; z-index: 40; left: var(--gl); right: var(--gr); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6); transform: translateY(150%); transition: transform .4s var(--ease); }
.dock.show { transform: none; }
.dock span { display: grid; line-height: 1.2; }
.dock b { font: 700 16px/1.2 var(--font-head); }
.dock small { font-size: 12px; opacity: .7; text-decoration: line-through; }
.dock i { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1e1505; font: normal 600 15px/1 var(--font-body); }

/* ---------- Окно «Подробнее» ---------- */
dialog.info { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 90px -20px rgba(24, 18, 14, .5); overflow: hidden; }
dialog.info[open] { display: flex; flex-direction: column; animation: pop-in .45s var(--ease); }
dialog.info::backdrop { background: rgba(24, 18, 14, .55); backdrop-filter: blur(4px); }
@keyframes pop-in { from { opacity: 0; transform: translateY(24px) rotateX(8deg) scale(.97); } }
.info .x { position: absolute; top: 12px; right: 12px; z-index: 1; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--bg); cursor: pointer; font-size: 24px; line-height: 1; color: var(--muted); }
.info .x:hover { color: var(--ink); }
.info-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px 22px 8px; }
.info-body .kind { font: 600 12px/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); padding-right: 48px; }
.info-body h2 { margin-top: 12px; padding-right: 48px; font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.15; }
.facts { margin: 20px 0 0; border-radius: 18px; background: var(--bg); }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.info-body .lead { margin-top: 18px; font-size: 16px; }
.info-body h3 { margin: 24px 0 12px; font: 600 14px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.skills li { position: relative; padding-left: 22px; font-size: 15px; }
.skills li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; rotate: 45deg; background: var(--gold); }
.sched { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sched li { display: grid; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sched b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched span { color: var(--muted); }
.info-body .note { margin: 22px 0 12px; font-size: 13px; color: var(--muted); }
.info-foot { padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* ---------- Подвал ---------- */
footer { background: var(--ink); color: rgba(255, 255, 255, .7); }
footer .wrap { padding-block: 40px calc(96px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 26px; font-size: 14px; }
footer .logo { margin-bottom: 14px; color: #fff; }
footer h3 { margin-bottom: 8px; font: 600 13px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
footer a { text-decoration: none; }
footer a:hover { color: #fff; }
footer .docs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer .docs a { text-decoration: underline; text-underline-offset: 3px; }

#burst { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 599px) {
  .tel { font-size: 13px; }
  .hero-in { padding-block: 12px 80px; }
  .btn-xl { min-height: 56px; padding: 0 28px; }
  .timer-cap { display: none; }
  .timer div { min-width: 0; flex: 1; }
  .timer b { font-size: 26px; }
  .scroll-hint { display: none; }
  .n3 { width: 54px; height: 54px; font-size: 32px; }
  .eq { display: none; }
  .offer { row-gap: 14px; }
  .stamp { width: 78px; height: 78px; font-size: 20px; right: -4px; }
  .pick { display: flex; }
  .pick button { flex: 1; padding: 0 10px; }
  .ticker-track { font-size: 15px; }
}
@media (min-width: 600px) {
  .steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; }
  .info-body { padding: 36px 36px 8px; }
  .info-foot { padding-inline: 36px; }
  .sched li { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .logo { font-size: 20px; gap: 11px; }
  .logo i { --s: 60px; }
  .math { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); padding-block: 80px; }
  .cat-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .catalog, .people, .faq, .steps { padding-block: 56px 72px; }
  .dock { display: none; }
  footer .wrap { padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
