/* ============================================================
   Лендинг — наставничество по вайб-кодингу (Матвей про вайбкодинг)
   Светлый редакторский стиль. Сильный приём: издательская сетка
   (индексы 01–, хайрлайны) + чёрная типографика на бумаге.
   Акцент — мятный спот. Display+body: Manrope · лейблы/цифры: JetBrains Mono
   ============================================================ */

:root {
  --paper:    #FBFBF8;
  --paper-2:  #F0EFEA;
  --card:     #FFFFFF;
  --ink:      #16171B;
  --ink-2:    #565A63;
  --ink-3:    #8A8E96;
  --line:     #E4E2DA;

  --accent:      #12CF93;
  --accent-deep: #0A8A65;
  --accent-press:#0FB985;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1240px;
  --gutter: 24px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: .22s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* якорные переходы не прячут заголовок под липкий хедер */
section[id] { scroll-margin-top: 84px; }

/* — издательский индекс-лейбл (mono) — */
.index {
  font-family: var(--mono); font-size: .82rem; font-weight: 500;
  letter-spacing: .02em; color: var(--ink-3);
  display: flex; align-items: baseline; gap: .75rem;
}
.index b { color: var(--ink); font-weight: 500; }
.index .num { color: var(--accent-deep); }

/* — кнопки — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 700; font-size: 1rem; padding: 1rem 1.7rem;
  border-radius: var(--r-pill);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #06241A; }
.btn--accent:hover { background: var(--accent-press); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: #000; }
.btn--sm { padding: .6rem 1.1rem; font-size: .9rem; }

.link-cta {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 700; font-size: 1rem; color: var(--ink);
  border-bottom: 2px solid var(--ink); padding-bottom: 2px;
  transition: gap var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-cta:hover { gap: .7em; border-color: var(--accent-deep); }

/* ============================================================
   ХЕДЕР
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.brand__pic { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav__link { color: var(--ink-2); font-weight: 600; font-size: .94rem; transition: color var(--dur) var(--ease); }
.nav__link:hover { color: var(--ink); }
.burger { display: none; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s var(--ease), opacity .22s var(--ease); }
.burger span + span { margin-top: 5px; }

/* ============================================================
   СЕКЦИИ — общий ритм
   ============================================================ */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .index { color: var(--ink-3); }
.section--dark .index b { color: var(--paper); }

.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head .index { padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.section--dark .section__head .index { border-color: rgba(255,255,255,.12); }
.h2 {
  font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.02; letter-spacing: -.03em; max-width: 20ch;
}
.h2 .mark {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: 0 92%; background-size: 100% .14em;
}
.lead { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 52ch; margin-top: 1.2rem; }
.section--dark .lead { color: var(--on-dark-dim, #9AA0AB); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem); text-align: center; }
.hero__index { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.hero h1 {
  font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: .98; letter-spacing: -.035em; max-width: 17ch; margin: 0 auto 1.6rem;
}
.hero h1 .mark {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: 0 92%; background-size: 100% .14em; padding-bottom: .02em;
}
.hero__sub { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--ink-2); max-width: 46ch; margin: 0 auto 2.4rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem; }

/* появление hero — стаггер fade-up (desktop + mobile) */
@media (prefers-reduced-motion: no-preference) {
  .hero__index, .hero h1, .hero__sub, .hero__cta { animation: heroIn .7s var(--ease) both; }
  .hero__index { animation-delay: .04s; }
  .hero h1     { animation-delay: .12s; }
  .hero__sub   { animation-delay: .26s; }
  .hero__cta   { animation-delay: .38s; }
}
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ============================================================
   НИША (03) — нумерованные пункты, без иконок-клише
   ============================================================ */
.niche { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.niche__item { background: var(--paper); padding: clamp(1.5rem, 3vw, 2.4rem); }
.niche__num { font-family: var(--mono); font-size: .82rem; color: var(--accent-deep); margin-bottom: 1rem; }
.niche__title { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.niche__text { color: var(--ink-2); margin-top: .6rem; font-size: .98rem; }

/* ============================================================
   ПРОБЛЕМА → РЕШЕНИЕ (04)
   ============================================================ */
.problem__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.problem__list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.problem__list li { display: flex; gap: .8rem; color: var(--ink-2); font-size: 1.02rem; }
.problem__list li::before { content: "—"; color: var(--accent); font-weight: 700; }
.solution { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.6rem, 3vw, 2.4rem); }
.solution h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 1rem; }
.solution p { color: var(--ink-2); }
.solution .btn { margin-top: 1.6rem; }

/* ============================================================
   ДЛЯ КОГО (05) — редакторский список
   ============================================================ */
.audience { display: flex; flex-direction: column; }
.audience__row {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2rem) 0; border-top: 1px solid var(--line); align-items: baseline;
}
.audience__row:last-child { border-bottom: 1px solid var(--line); }
.audience__num { font-family: var(--mono); font-size: .9rem; color: var(--accent-deep); }
.audience__title { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.audience__text { color: var(--ink-2); margin-top: .5rem; max-width: 60ch; }
.audience__note { margin-top: 2rem; font-family: var(--mono); font-size: .9rem; color: var(--ink-2); }

/* ============================================================
   ПРОГРАММА (06) — аккордеон на <details>
   ============================================================ */
.program__meta { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.tag { font-family: var(--mono); font-size: .82rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: .4rem .85rem; background: var(--paper); }

.modules { border-top: 1px solid var(--line); }
.module { border-bottom: 1px solid var(--line); }
.module > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 1rem;
  padding: 1.3rem 0; transition: color var(--dur) var(--ease);
}
.module > summary::-webkit-details-marker { display: none; }
.module__num { font-family: var(--mono); font-size: .9rem; color: var(--accent-deep); flex: none; width: 56px; }
.module__title { font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 700; letter-spacing: -.01em; flex: 1; }
.module__plus { font-family: var(--mono); color: var(--ink-3); transition: transform var(--dur) var(--ease); }
.module[open] .module__plus { transform: rotate(45deg); }
.module__body { padding: 0 0 1.6rem 72px; }
.module__body ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.module__body li { color: var(--ink-2); display: flex; gap: .7rem; }
.module__body li::before { content: "·"; color: var(--accent-deep); font-weight: 700; }
@media (max-width: 560px) { .module__body { padding-left: 0; } }

/* плавное раскрытие аккордеона */
details[open] .module__body,
details[open] .faq__a { animation: reveal .28s var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* честная анимация высоты на поддерживающих браузерах */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .module::details-content,
  .faq__item::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .3s var(--ease), content-visibility .3s allow-discrete;
  }
  .module[open]::details-content,
  .faq__item[open]::details-content { block-size: auto; }
}

.perks { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.perk { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem; }
.perk__k { font-family: var(--mono); font-size: .78rem; color: var(--accent-deep); margin-bottom: .6rem; }
.perk__t { font-weight: 700; line-height: 1.2; }
.perk__d { color: var(--ink-2); font-size: .92rem; margin-top: .5rem; }

/* ============================================================
   ЦЕНА (07)
   ============================================================ */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.price__tag { font-size: clamp(3rem, 9vw, 6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price__cur { color: var(--accent-deep); }
.price__sub { font-family: var(--mono); color: var(--ink-2); margin-top: 1rem; }
.price__list { list-style: none; display: flex; flex-direction: column; gap: .8rem; margin: 1.6rem 0; }
.price__list li { display: flex; gap: .7rem; color: var(--ink-2); }
.price__list li::before { content: "✓"; color: var(--accent-deep); font-weight: 700; }

/* ============================================================
   ЭКСПЕРТ (08)
   ============================================================ */
.expert__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 2.5rem; }
.expert__cell { background: var(--ink); color: var(--paper); padding: clamp(1.5rem, 3vw, 2.2rem); }
.expert__cell .k { font-family: var(--mono); font-size: .8rem; color: var(--accent); margin-bottom: .8rem; }
.expert__cell .v { font-size: 1.05rem; line-height: 1.35; }
.expert__cell .big { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }

/* ============================================================
   FAQ (09)
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 1rem; padding: 1.3rem 0; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item .module__plus { margin-left: auto; }
.faq__a { padding: 0 0 1.5rem 0; color: var(--ink-2); max-width: 70ch; }

/* ============================================================
   CTA-полоса (повтор)
   ============================================================ */
.cta-band { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.cta-band__note { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); }

/* ============================================================
   АНКЕТА (10)
   ============================================================ */
.anketa__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.6rem, 3vw, 2.4rem); }
.field { margin-bottom: 1.5rem; }
.field > label { display: block; font-weight: 700; margin-bottom: .7rem; }
.field input[type=text] {
  width: 100%; font-family: var(--font); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem;
}
.field input[type=text]:focus { outline: none; border-color: var(--accent-deep); }
.opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.opts label {
  font-size: .92rem; color: var(--ink-2); border: 1px solid var(--line); background: var(--paper);
  border-radius: var(--r-pill); padding: .55rem 1rem; cursor: pointer; transition: all var(--dur) var(--ease);
}
.opts input { position: absolute; opacity: 0; }
.opts label:has(input:checked) { border-color: var(--ink); color: var(--ink); background: var(--paper-2); font-weight: 600; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin: 1.2rem 0; }
.consent a { color: var(--accent-deep); text-decoration: underline; }
.form .btn { width: 100%; }
.form__status { margin-top: 1rem; font-size: .92rem; text-align: center; }
.form__status:empty { display: none; }
.form__status--ok { color: var(--accent-deep); font-weight: 600; }
.form__status--err { color: #b3261e; }
.form__status--err a { color: #b3261e; text-decoration: underline; }

/* ============================================================
   ФУТЕР — обязательные реквизиты для модерации кассы
   ============================================================ */
.footer { background: var(--ink); color: var(--paper); padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; }
.footer__docs { display: flex; flex-wrap: wrap; gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__docs a { color: var(--paper); font-size: .92rem; font-weight: 600; }
.footer__docs a:hover { color: var(--accent); }
.footer__legal { padding-top: 1.5rem; color: #9AA0AB; font-size: .85rem; line-height: 1.7; }
.footer__legal b { color: var(--paper); font-weight: 600; }

/* ============================================================
   ЮР-СТРАНИЦЫ
   ============================================================ */
.legal { max-width: 820px; padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: 4rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .8rem; }
.legal .muted { font-family: var(--mono); font-size: .85rem; color: var(--ink-3); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .8rem; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: .7rem; }
.legal ul, .legal ol { padding-left: 1.3rem; }
.legal .note { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.2rem; font-size: .9rem; color: var(--ink-2); margin-bottom: 2rem; }
.legal__back { display: inline-flex; gap: .4em; font-family: var(--mono); font-size: .85rem; color: var(--accent-deep); margin-bottom: 2rem; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 860px) {
  .problem__grid, .price, .anketa__grid { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .burger { display: block; }

  /* выпадающее меню (кроме юр-страниц, где только кнопка) */
  .nav:not(.nav--legal) {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(0,0,0,.07);
    padding: .25rem var(--gutter) 1.1rem;
    display: none;
  }
  .site-header.nav-open .nav:not(.nav--legal) { display: flex; }
  .nav:not(.nav--legal) .nav__link { padding: .9rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav:not(.nav--legal) .btn { margin-top: 1rem; }

  /* бургер → крестик */
  .site-header.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .burger span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero h1 { max-width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .niche, .expert__grid { grid-template-columns: 1fr; }
  .audience__row { grid-template-columns: 1fr; gap: .4rem; }
}
