/* Лендинг code — бруталистская типографика: белый лист, чёрный гротеск Onest, один кислотно-лаймовый акцент.
   Лайм — только фон (кнопки, плашки) и всегда с чёрным текстом. */
:root {
  --ink: #0a0a0a;
  --paper: #fff;
  --lime: #c8ff1a;
  --grey: #5c5c5c;
  --rule: 3px solid var(--ink);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --gut: clamp(16px, 4.2vw, 80px);
  /* размер фразы первого экрана: по ширине и по высоте окна (весь экран — в 1920×950) */
  --fs: clamp(46px, min(6.75vw, 13.4vh), 132px);

  /* форма записи (core.css) */
  --lf-fg: var(--ink);
  --lf-muted: #555;
  --lf-field: #fff;
  --lf-field-fg: var(--ink);
  --lf-border: var(--ink);
  --lf-accent: var(--lime);
  --lf-accent-fg: var(--ink);
  --lf-chip: #fff;
  --lf-chip-active: var(--ink);
  --lf-chip-active-fg: #fff;
  --lf-radius: 0px;
  --lf-font: var(--font);
  --lf-focus: rgba(10, 10, 10, .22);
  --cta-glow: #9dd400;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1920px; margin: 0 auto; padding: 0 var(--gut); }
h1, h2, h3, p { margin: 0; }

/* ── шапка ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: var(--rule); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; line-height: 1.05; }
.logo svg { width: 30px; height: 30px; flex: 0 0 auto; }
.logo small { display: block; font-size: 12px; font-weight: 500; color: var(--grey); letter-spacing: 0; }
.role { display: flex; border: 2px solid var(--ink); }
.role button { font: 600 14px/1 var(--font); padding: 9px 14px; background: var(--paper); color: var(--ink); border: 0; cursor: pointer; }
.role button + button { border-left: 2px solid var(--ink); }
.role button.is-active { background: var(--ink); color: #fff; }
.role button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* ── метка раздела ──────────────────────────────────────── */
.lbl { font: 600 14px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 12px; }
.lbl .n { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 6px; background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ── первый экран ───────────────────────────────────────── */
.hero { padding: clamp(18px, 3vh, 40px) 0 clamp(22px, 3.6vh, 44px); }
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: clamp(18px, 3vh, 34px); }
.phrase { font-size: var(--fs); font-weight: 800; line-height: .94; letter-spacing: -.045em; max-width: 15.5em; hyphens: none; overflow-wrap: normal; }
.hero-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: clamp(24px, 3vw, 56px); row-gap: 24px; align-items: end; }
.hero-row > .strip { grid-row: 1 / 3; }

/* главы ролика справа от ленты: активная — на лайме */
.chapters { list-style: none; margin: 0; padding: 0; align-self: start; border-top: var(--rule); }
.chapters li { border-bottom: 1px solid var(--ink); }
.chapters button { width: 100%; display: flex; align-items: baseline; gap: 18px; padding: 14px 12px; font: 700 clamp(18px, 1.35vw, 26px)/1.15 var(--font); letter-spacing: -.015em; color: var(--ink); background: transparent; border: 0; text-align: left; cursor: pointer; transition: background .2s; }
.chapters button:hover { background: #f1f1f1; }
.chapters button.is-on { background: var(--ink); color: #fff; }
.chapters button:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.ch-tc { font: 500 15px/1 var(--mono); flex: 0 0 auto; }

/* лента-видео: до выбора варианта не показываем, в B её нет совсем */
.strip { display: none; margin: 0; }
html[data-code-v="A"] .strip { display: block; }
.strip-frame {
  position: relative; overflow: hidden; border: var(--rule); background: #fff;
  /* кадр без бокового меню школы: видимая часть ролика 1590×822 из 1920×822 */
  aspect-ratio: 1590 / 822;
  height: clamp(220px, calc(100svh - var(--hdr, 65px) - 1.88 * var(--fs) - 170px), 560px);
}
.strip-frame video { position: absolute; top: 0; left: -20.75%; width: 120.75%; max-width: none; height: 100%; display: block; object-fit: cover; cursor: pointer; }
.strip-play { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; font: 700 16px/1 var(--font); background: var(--lime); color: var(--ink); border: 2px solid var(--ink); cursor: pointer; }
.strip-play svg { width: 18px; height: 18px; fill: currentColor; }
.strip-play[hidden] { display: none; }
.strip-cap { display: flex; align-items: center; gap: 12px; margin-top: 10px; font: 600 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .07em; }
.strip-cap .rec { width: 10px; height: 10px; background: var(--ink); flex: 0 0 auto; }
.strip.is-playing .strip-cap .rec { background: #ff2a2a; }
.strip-cap .cap-k { color: var(--grey); }
.strip-cap .cap-t { flex: 1; visibility: hidden; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700; }
.strip-cap .cap-tc { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.hero-act { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 34px; }
.btn-lime {
  display: inline-flex; align-items: center; gap: 18px; padding: 0 34px; height: 88px;
  font: 800 30px/1 var(--font); letter-spacing: -.02em; color: var(--ink); background: var(--lime);
  border: var(--rule); cursor: pointer; box-shadow: 8px 8px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn-lime svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; flex: 0 0 auto; }
.btn-lime:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.btn-lime:active { transform: translate(6px, 6px); box-shadow: 2px 2px 0 var(--ink); }
.btn-lime:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.micro { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }

/* вариант B: без видео — фраза крупнее, кнопка под ней */
html[data-code-v="B"] .phrase { font-size: clamp(48px, min(7.4vw, 16vh), 140px); max-width: 12em; }
html[data-code-v="B"] .hero-row { grid-template-columns: 1fr; }
html[data-code-v="B"] .hero-act { flex-direction: row; align-items: center; gap: 32px; padding-bottom: 0; }

/* раскрывающаяся форма */
.reveal { border: var(--rule); background: var(--paper); scroll-margin-top: calc(var(--hdr, 65px) + 16px); opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[hidden] { display: none; }
.reveal-in { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.1fr); }
.reveal-h { position: relative; padding: 32px; border-right: var(--rule); background: var(--lime); display: flex; flex-direction: column; gap: 16px; }
.reveal-t { font-size: clamp(28px, 2.4vw, 44px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.reveal-gift { font-size: 16px; font-weight: 600; margin-top: auto; }
.reveal-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 2px solid var(--ink); cursor: pointer; color: var(--ink); }
.reveal-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.form-card { padding: 28px 32px 30px; min-width: 0; }
/* сначала время, потом контакт: блок слотов поднимаем над полями (разметка общей формы не меняется) */
#zapis .lf-step[data-step="form"]:not([hidden]) { display: flex; flex-direction: column; }
#zapis .lf-field--slots { order: -1; margin: 0 0 22px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.lf-label { font-size: 14px; }
.lf-input { border-width: 2px; }
.lf-seg { border-width: 2px; }
.lf-day, .lf-time { border-width: 2px; }
.lf-submit { font-weight: 800 !important; font-size: 19px !important; border: var(--rule) !important; }
.lf-ghost { border: 2px solid var(--ink); }
.lf-done-title { font-weight: 800; letter-spacing: -.02em; }

/* ── три мысли ─────────────────────────────────────────── */
.idea { border-top: var(--rule); padding: clamp(64px, 9vw, 140px) 0; }
.idea-in { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 56px); }
.idea-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.idea-grid--code { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
.mega { font-size: clamp(170px, 24vw, 420px); font-weight: 900; line-height: .78; letter-spacing: -.07em; }
.mega-lime { display: inline-block; justify-self: start; background: var(--lime); padding: .04em .12em .02em .06em; }
.idea-body { display: flex; flex-direction: column; gap: 22px; }
.idea h2 { font-size: clamp(38px, 4.6vw, 88px); font-weight: 800; line-height: .98; letter-spacing: -.04em; }
.idea-body > p { font-size: clamp(18px, 1.35vw, 24px); max-width: 34em; }

.plan { list-style: none; margin: 10px 0 0; padding: 0; border-top: var(--rule); }
.plan li { display: grid; grid-template-columns: 70px 1fr 1.3fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.plan .t { font-family: var(--mono); font-size: 16px; }
.plan b { font-size: 20px; font-weight: 700; }
.plan li > span:last-child { color: var(--grey); font-size: 17px; }

.idea-ink { background: var(--ink); color: #fff; border-top-color: var(--ink); }
.idea-ink .lbl .n { background: var(--lime); color: var(--ink); }
.run { border: 3px solid #fff; background: var(--ink); font-family: var(--mono); }
.run-h { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 3px solid #fff; font: 600 14px/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.run-code { margin: 0; padding: 26px 18px; font: 500 clamp(24px, 2.6vw, 44px)/1.2 var(--mono); white-space: pre; overflow-x: auto; }
.run-code .ln { color: #8a8a8a; margin-right: 22px; }
.run-out { display: flex; align-items: baseline; gap: 18px; padding: 18px; border-top: 1px solid #555; font: 500 clamp(22px, 2.2vw, 36px)/1.2 var(--mono); }
.lbl-s { font: 600 13px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: #a8a8a8; }
.run-ok { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--lime); color: var(--ink); font: 800 clamp(18px, 1.5vw, 26px)/1.2 var(--font); }
.run-ok svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3; flex: 0 0 auto; }

.nums { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--rule); }
.nums li { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.nums li + li { padding-left: 16px; border-left: 1px solid var(--ink); }
.nums b { font-size: clamp(30px, 2.7vw, 50px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.nums span { font-size: 16px; color: var(--grey); }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-sec { border-top: var(--rule); padding: clamp(64px, 8vw, 120px) 0; }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 96px); }
.faq-wrap h2 { margin-top: 22px; font-size: clamp(38px, 4.6vw, 88px); font-weight: 800; line-height: .98; letter-spacing: -.04em; }
.faq { border-top: var(--rule); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-size: clamp(19px, 1.5vw, 26px); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 500; font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; background: var(--lime); }
.faq summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.faq details p { padding: 0 60px 24px 0; font-size: 18px; max-width: 46em; }

/* ── финальная кнопка ──────────────────────────────────── */
.final { border-top: var(--rule); padding: clamp(56px, 7vw, 110px) 0; }
.final-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.final-t { font-size: clamp(40px, 5.4vw, 104px); font-weight: 800; line-height: .96; letter-spacing: -.045em; max-width: 11em; }

/* ── подвал ────────────────────────────────────────────── */
.foot { border-top: var(--rule); padding: 28px 0 36px; font-size: 14px; }
.foot-in { display: flex; flex-direction: column; gap: 10px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── планшет ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-row { grid-template-columns: 1fr; }
  .strip-frame { height: auto; width: 100%; }
  .hero-act { padding-bottom: 0; }
  .chapters { display: none; }
  .hero-row { grid-template-rows: auto; }
  .hero-row > .strip { grid-row: auto; }
  .strip-cap .cap-t { visibility: visible; }
  .idea-grid, .idea-grid--code, .faq-wrap { grid-template-columns: 1fr; }
  .reveal-in { grid-template-columns: minmax(0, 1fr); }
  .reveal-h { border-right: 0; border-bottom: var(--rule); }
}

/* ── телефон ───────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top-in { height: 56px; }
  .logo { font-size: 16px; }
  .logo small { display: none; }
  .logo svg { width: 26px; height: 26px; }
  .role button { padding: 8px 9px; font-size: 13px; }
  :root { --fs: clamp(40px, 13.6vw, 60px); }
  html[data-code-v="B"] .phrase { font-size: clamp(44px, 15.4vw, 66px); }
  .phrase { letter-spacing: -.05em; }
  .hero-row { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .hero-act { order: -1; gap: 12px; }
  html[data-code-v="B"] .hero-act { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-lime { height: 68px; padding: 0 22px; font-size: 22px; gap: 12px; box-shadow: 6px 6px 0 var(--ink); width: calc(100% - 6px); justify-content: space-between; }
  .btn-lime svg { width: 24px; height: 24px; }
  .micro { font-size: 16px; }
  /* на телефоне кадр уже: видна задача, вывод и «Верно» */
  .strip-frame { aspect-ratio: 1000 / 822; }
  .strip-frame video { left: -33%; width: 192%; }
  .strip-cap { font-size: 11px; gap: 8px; }
  .strip-cap .cap-t { font-size: 13px; }
  .reveal-h { padding: 22px 18px; }
  .form-card { padding: 20px 16px 22px; }
  .reveal-t { font-size: 28px; padding-right: 44px; }
  .mega { font-size: 44vw; }
  .plan li { grid-template-columns: 44px 1fr; }
  .plan li > span:last-child { grid-column: 2; margin-top: -10px; }
  .nums { grid-template-columns: 1fr 1fr; }
  .nums li:nth-child(3) { padding-left: 0; border-left: 0; }
  .nums li { padding-bottom: 16px; }
  .run-code { padding: 20px 14px; }
  .faq details p { padding-right: 0; }
  .final-in .btn-lime { width: calc(100% - 6px); }
}
