/* Лендинг (spec §4). Токены и компоненты — tokens.css / base.css (из сабки).
   Иерархия: запоминается одна вещь — светлая карточка подписки в hero; всё вокруг тихое.
   Радиусы по роли: 30 — секции и крупные карточки, 24 — карточки внутри, 18 — мелкие плашки.
   Движение: одна автоматическая анимация (карточка «подключается»), одно проявление по скроллу (фото кабинета). */

html{scroll-padding-top:84px}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
:root{interpolate-size:allow-keywords}

main:focus{outline:none}
.wrap{max-width:1120px;margin:0 auto;padding:0 20px}
.lp{transform-origin:50% var(--recede-y,0px);transition:transform .34s var(--ease-drawer),opacity .34s var(--ease-drawer)}

/* ── шапка: прозрачная, после прокрутки — тёмная с blur ── */
.hdr{position:fixed;top:0;left:0;right:0;z-index:10;padding-top:var(--safe-top);
  border-bottom:1px solid transparent;transition:background-color .2s var(--ease-out),border-color .2s var(--ease-out)}
.hdr.is-scrolled{background:rgba(10,11,9,.72);border-bottom-color:var(--line);
  -webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%)}
.hdr-in{display:flex;align-items:center;gap:12px;min-height:64px}
.brand{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-weight:700;font-size:17px;letter-spacing:-.02em;white-space:nowrap}
.logo{width:28px;height:28px;fill:var(--text)}
.nav{display:none}
.hdr-act{display:flex;align-items:center;gap:8px;margin-left:auto}
.hdr-login{display:none}
.btn-sm{width:auto;min-height:40px;padding:0 18px;font-size:14px}
.hdr .circle{width:40px;height:40px}
.hdr .circle .i{width:20px;height:20px}

/* ── заголовки и текст ── */
.h2:focus{outline:none}
.h2{margin:0;font-size:clamp(30px,7.4vw,46px);font-weight:700;letter-spacing:-.035em;line-height:1.05;text-wrap:balance}
.lead{margin:16px 0 0;max-width:52ch;font-size:16px;line-height:1.55;color:var(--muted);text-wrap:pretty}
.light .lead{color:var(--ink-muted)}
.lead+.lead{margin-top:10px}

/* ── 1. hero ── */
.hero{padding:calc(84px + var(--safe-top)) 0 64px;overflow:clip}
.hero-in{display:grid;gap:36px}
.hero-stage{order:-1}
.hero-title{margin:0;font-size:clamp(38px,10.4vw,72px);font-weight:700;letter-spacing:-.045em;line-height:1;text-wrap:balance}
.hero-title span{display:block}
.hero-sub{margin:20px 0 0;max-width:46ch;font-size:17px;line-height:1.5;color:var(--muted);text-wrap:pretty}
.hero-actions{display:grid;gap:10px;margin-top:28px}
.hero-note{margin:14px 0 0;font-size:14px;color:var(--muted)}
/* главная кнопка на тёмном: лаймовая пилюля, круг — тёмный со лаймовой стрелкой */
.dark .btn-cta.btn-primary .cta-dot{background:var(--ink);color:var(--lime)}
.dark .light .btn-cta.btn-primary .cta-dot{background:var(--lime);color:var(--ink)}

/* карточка подписки — paper сабки (.hero/.status/.days), в лёгком 3D-наклоне */
.hero-stage{position:relative;display:grid;place-items:center;padding:6px 0 0}
.hero-stage::before{content:"";position:absolute;inset:-10% -6%;z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side,rgba(198,244,63,.13),transparent)}
.tilt{--bx:5deg;--by:-8deg;--tx:0deg;--ty:0deg;width:min(100%,360px);
  transform:perspective(1200px) rotateX(calc(var(--bx) + var(--tx))) rotateY(calc(var(--by) + var(--ty)));transform-style:preserve-3d}
.hcard{position:relative;padding:18px 20px 20px;border-radius:var(--r-xl);background:var(--paper);color:var(--ink);overflow:hidden;isolation:isolate;user-select:none}
.status{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 12px 0 10px;border-radius:99px;background:rgba(11,12,10,.06);
  font-size:13px;font-weight:600;color:var(--ink)}
.status i{position:relative;width:8px;height:8px;border-radius:50%;background:#4E9A0F;transition:background-color .3s var(--ease-out)}
.hcard .status i::after{content:"";position:absolute;inset:0;border-radius:50%;background:inherit;animation:pulse 2.4s var(--ease-out) infinite}
.st{display:grid}
.st>span{grid-area:1/1;transition:opacity .2s var(--ease-out),filter .2s var(--ease-out)}
.st-wait{opacity:0}
.days{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:10px;margin:18px 0 6px}
.days-n{font-family:var(--num);font-weight:600;font-size:clamp(64px,21vw,86px);line-height:.88;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
.days-u{font-size:20px;font-weight:600;letter-spacing:-.015em}
.hero-meta{margin:0;font-size:15px;font-weight:500;color:var(--ink-muted)}
.hero-meta b{font-weight:600;color:var(--ink)}
.hc-dev{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--ink-line);
  font-size:14px;font-weight:600}
.hc-slots{display:inline-flex;align-items:center;gap:10px;font-size:13px;font-weight:500;color:var(--ink-muted);font-variant-numeric:tabular-nums}
.pips{display:flex;gap:3px}
.pips span{width:6px;height:16px;border-radius:3px;background:rgba(11,12,10,.12)}
.pips span.on{background:var(--ink)}

/* «подключение» при загрузке: серая точка, «Подключение…», цифра не в фокусе → через 300 мс is-on:
   цифра наводится резкостью (focusIn), статус меняется, точка зеленеет и пульсирует. Всего ~0,8 с. */
@media (prefers-reduced-motion:no-preference){
  .js .hcard:not(.is-on) .status i{background:#9AA094}
  .js .hcard:not(.is-on) .status i::after{animation:none;opacity:0}
  .js .hcard:not(.is-on) .st-wait{opacity:1}
  .js .hcard:not(.is-on) .st-on{opacity:0;filter:blur(3px)}
  .js .hcard:not(.is-on) .days-n{filter:blur(10px);transform:scale(1.03)}
  .hcard.is-on .days-n{animation:focusIn .5s var(--ease-out) backwards}
  .hcard.is-on .status i{transition-delay:.3s}
  .hcard.is-on .status i::after{animation-delay:.5s}
  .hcard.is-on .st>span{transition-delay:.25s}
  .js .hcard:not(.is-on) .days-n{transform-origin:0 100%}
}

/* ── секции: светлые — крупные paper-полотна с радиусом 30, тёмные — сцена ── */
.band{margin:0 8px;padding:64px 0;border-radius:var(--r-xl);background:var(--paper);color:var(--ink)}
.band-dark{padding:80px 0 0}
.band-dark-2{padding-bottom:80px}

/* ── 2. кабинет: фото ── */
.cab{display:grid;gap:36px}
.cab-photo{overflow:hidden;border-radius:var(--r-xl);background:var(--bg)}
.cab-photo img,.lp-photo,.final-photo{display:block;width:100%;height:auto}
.lp-photo{border-radius:var(--r-xl)}
/* единственное проявление по скроллу: фото наводится резкостью, один раз. Без JS и при reduced motion — сразу фото */
@media (prefers-reduced-motion:no-preference){
  .cab-photo img{transition:filter .7s var(--ease-out),transform .7s var(--ease-out)}
  .js .cab-photo:not(.is-in) img{filter:blur(8px);transform:scale(1.02)}
}

/* ── 3. шаги: настоящая последовательность 1–3 ── */
.steps{margin:36px 0 0;padding:0;list-style:none;display:grid;gap:0}
.steps li{position:relative;display:grid;align-content:start;grid-template-columns:40px 1fr;column-gap:16px;padding-bottom:28px}
.steps li:last-child{padding-bottom:0}
.steps li:not(:last-child)::after{content:"";position:absolute;left:19.5px;top:46px;bottom:6px;width:1px;background:rgba(255,255,255,.14)}
.steps .num{grid-row:span 2;width:40px;height:40px;font-size:15px}
.steps h3{margin:8px 0 0;font-size:19px;font-weight:700;letter-spacing:-.02em}
.steps p{margin:6px 0 0;max-width:36ch;color:var(--muted);font-size:15px;line-height:1.5;text-wrap:pretty}

/* ── 4. что входит: строки с тонкими разделителями, без номеров ── */
.inc-side .lp-photo{aspect-ratio:4/5;object-fit:cover;object-position:50% 0;margin-top:28px}
.faq-side .lp-photo{display:none}
.feats{margin:28px 0 0;padding:0;list-style:none;border-top:1px solid var(--line)}
.feats li{padding:20px 0;border-bottom:1px solid var(--line)}
.feats h3{margin:0;font-size:18px;font-weight:600;letter-spacing:-.015em}
.feats p{margin:6px 0 0;max-width:52ch;color:var(--muted);font-size:15px;line-height:1.5;text-wrap:pretty}

/* ── 5. тарифы ── */
.band-last{padding-bottom:72px}
.tariffs{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:32px 0 0;padding:0;list-style:none}
.tariff{display:flex;flex-direction:column;padding:18px 20px 20px;border-radius:var(--r-lg);background:#fff;border:1px solid var(--ink-line)}
.t-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:28px}
.t-name{font-size:16px;font-weight:600}
.t-badge{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:99px;background:var(--lime);color:var(--ink);font-size:12.5px;font-weight:700}
.t-price{display:flex;align-items:baseline;gap:6px;padding-top:18px}
.t-num{font-family:var(--num);font-weight:600;font-size:40px;line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.t-cur{font-size:22px;font-weight:600}
.t-pm{margin-top:8px;font-size:14px;font-weight:500;color:var(--ink-muted);font-variant-numeric:tabular-nums}
.tariff.is-best{background:var(--ink);border-color:var(--ink);color:#fff}
.tariff.is-best .t-pm{color:rgba(255,255,255,.6)}
.t-foot{display:grid;gap:16px;margin-top:20px}
.t-note{margin:0;font-size:14px;color:var(--ink-muted)}
.t-btn{width:100%}

/* ── 6. вопросы: <details>, раскрытие — высота + проявление ── */
.faq{margin-top:72px}
.prices+.faq{padding-top:64px;margin-top:64px;border-top:1px solid var(--ink-line)}
.band-last>.faq:first-child{margin-top:0}
.qa-list{margin-top:24px;border-top:1px solid var(--ink-line)}
.qa{border-bottom:1px solid var(--ink-line)}
.qa summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:16px 0;cursor:pointer;list-style:none;
  font-size:17px;font-weight:600;letter-spacing:-.01em;border-radius:6px}
.qa summary::-webkit-details-marker{display:none}
.qa summary .i{width:22px;height:22px;color:var(--ink-muted);transition:transform .25s var(--ease-out)}
.qa[open] summary .i{transform:rotate(180deg)}
.qa-a p{margin:0;padding:0 40px 22px 0;max-width:62ch;color:var(--ink-muted);font-size:15.5px;line-height:1.55;text-wrap:pretty}
@media (prefers-reduced-motion:no-preference){
  .qa::details-content{block-size:0;overflow:hidden;transition:block-size .3s var(--ease-out),content-visibility .3s allow-discrete}
  .qa[open]::details-content{block-size:auto}
  .qa-a{opacity:0;transition:opacity .25s var(--ease-out)}
  .qa[open] .qa-a{opacity:1;transition-delay:.06s}
}

/* ── 7. финальный CTA и подвал ── */
.final{padding:96px 0 72px}
.final-in{display:grid;gap:12px}
.final-btn{margin-top:28px}
/* фото на телефоне: кадр внутри рамки крупнее рамки — читается карточка; края рамки уходят в фон маской */
.final-media{--fade:9%;position:relative;overflow:hidden;aspect-ratio:1/1;margin-top:8px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 var(--fade),#000 calc(100% - var(--fade)),transparent),linear-gradient(transparent,#000 var(--fade),#000 calc(100% - var(--fade)),transparent);
  mask-image:linear-gradient(90deg,transparent,#000 var(--fade),#000 calc(100% - var(--fade)),transparent),linear-gradient(transparent,#000 var(--fade),#000 calc(100% - var(--fade)),transparent);
  -webkit-mask-composite:source-in;mask-composite:intersect}
.final-media .final-photo{position:absolute;left:-36%;top:-26%;width:200%;max-width:none;height:auto}
.final .h2{font-size:clamp(34px,8.4vw,56px)}
.foot{border-top:1px solid var(--line);padding:40px 0 calc(32px + var(--safe-bottom))}
.foot-in{display:grid;grid-template-columns:1fr 1fr;gap:32px 20px}
.foot-brand{grid-column:1/-1}
.foot-brand p{margin:12px 0 0;color:var(--muted);font-size:14px}
.foot-col{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.foot-col h2{margin:0 0 6px;font-size:13px;font-weight:600;color:var(--muted)}
.foot-col a{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);font-size:14px;font-weight:500;transition:color .2s var(--ease-out)}
.copy{grid-column:1/-1;margin:8px 0 0;color:var(--muted);font-size:13px}

/* ── меню-шторка ── */
.menu-list{margin-bottom:16px;padding:6px 0}
.sheet .menu-list>li:not([hidden])~li>.row::before{left:20px}
.menu-list .row{min-height:56px}
.menu-btns{display:grid;gap:10px}
.sheet .menu-btns .btn+.btn{margin-top:0}

/* ── hover — только там, где он есть ── */
@media (hover:hover) and (pointer:fine){
  .nav a:hover,.hdr-login:hover,.foot-col a:hover{color:var(--text)}
  .qa summary:hover .i{color:var(--ink)}
}

/* ── планшет и ПК ── */
/* подпись главной кнопки — всегда в одну строку: базовые поля 64 px слева оставляли ей слишком мало места */
.btn-cta .cta-label{white-space:nowrap}
@media (max-width:599px){
  .btn-cta{padding:0 58px 0 18px}
}
/* цели касания 44 px: высота растёт, а вид шапки остаётся тем же */
@media (pointer:coarse),(max-width:899px){
  .btn-sm{min-height:44px}
  .hdr .circle{width:44px;height:44px}
  .hdr-in{gap:8px}
  .nav a,.hdr-login{min-height:44px}
}

@media (min-width:600px){
  .wrap{padding:0 32px}
  .band{margin:0 12px;padding:88px 0}
  .hero-actions{display:flex;flex-wrap:wrap}
  .hero-actions .btn{width:auto}
  .hero-actions .btn-cta{min-width:280px}
  .tariff{min-height:176px}
  .t-price{padding-top:28px}
  .t-foot{grid-template-columns:1fr auto;align-items:center}
  .t-btn{width:auto}
  .foot-in{grid-template-columns:2fr repeat(3,1fr)}
  .foot-brand{grid-column:auto}
  .final-btn{width:auto;min-width:300px}
  .final-media{--fade:5%;aspect-ratio:3/2;max-width:640px}
  .final-media .final-photo{left:-8%;top:-9%;width:116%}
  .cab-photo,.inc-side .lp-photo{max-width:400px}
  .cab-photo{justify-self:center;width:100%}
}
/* планшет: фото рядом с текстом, а не на всю ширину */
@media (min-width:720px){
  .cab{grid-template-columns:minmax(0,1fr) 320px;align-items:center;gap:40px}
  .inc{display:grid;grid-template-columns:260px minmax(0,1fr);gap:40px}
  .inc-side .lp-photo{aspect-ratio:2/3;margin-top:28px}
  .feats{display:grid;grid-auto-rows:1fr;margin-top:0}
  .feats li{align-content:center}
}
@media (min-width:900px){
  .nav{display:flex;gap:4px;margin-left:20px}
  .nav a{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;border-radius:999px;color:var(--muted);font-size:14px;font-weight:500;transition:color .2s var(--ease-out)}
  .hdr-login{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;color:var(--muted);font-size:14px;font-weight:600;transition:color .2s var(--ease-out)}
  .hdr-menu{display:none}
  .hero{padding:calc(140px + var(--safe-top)) 0 120px}
  .hero-title{font-size:clamp(50px,5.9vw,76px)}
  .hero-in{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);align-items:center;gap:48px}
  .hero-stage{order:0;padding:0}
  .tilt{--bx:7deg;--by:-13deg;width:min(100%,400px)}
  .hcard{padding:22px 24px 24px}
  .hcard .days-n{font-size:112px}
  .hcard .days{margin:24px 0 8px}
  .hero-sub{font-size:18px}
  .cab{grid-template-columns:minmax(0,1fr) 440px;align-items:center;gap:56px}
  .band-dark{padding-top:128px}
  .band-dark-2{padding-top:120px;padding-bottom:128px}
  /* шаги — в ряд: одна линия через номера */
  .steps{grid-template-columns:repeat(3,1fr);gap:32px;margin-top:48px}
  .steps li{grid-template-columns:1fr;padding:0}
  .steps li:not(:last-child)::after{left:56px;right:-24px;top:19.5px;bottom:auto;width:auto;height:1px}
  .steps .num{grid-row:auto;margin-bottom:18px}
  .steps h3{margin-top:0;font-size:21px}
  .inc,.faq{display:grid;grid-template-columns:340px minmax(0,1fr);gap:72px}
  .inc-side .lp-photo,.faq-side .lp-photo{display:block;aspect-ratio:2/3;margin-top:32px;max-width:none}
  .feats{display:grid;grid-auto-rows:1fr;margin-top:0}
  .feats li{align-content:center}
  .feats li{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:24px;padding:24px 0}
  .feats p{margin:0}
  .faq{align-items:start}
  .qa-list{margin-top:0}
  .band-last{padding-bottom:104px}
  .final{padding:120px 0 96px}
  .final-in{grid-template-columns:minmax(320px,1fr) minmax(0,680px);gap:32px;align-items:center}
  .final .h2{font-size:clamp(40px,4.4vw,56px)}
  .final-media{max-width:none;margin-top:0}
}
@media (max-width:360px){
  .hdr .btn-sm{padding:0 14px}
  .brand span{font-size:16px}
}

@media (prefers-reduced-motion:reduce){
  .tilt{--tx:0deg;--ty:0deg}
  .lp{transition:opacity .2s ease}
  body.sheet-open .lp{transform:none}
  .qa summary .i{transition:none}
  .hcard .status i::after{animation:none;display:none}
}

/* ── движение в духе референса: всё только при no-preference и с JS ── */
@media (prefers-reduced-motion:no-preference){
  /* первый экран собирается при загрузке */
  .js .hero-title span,.js .hero-sub,.js .hero-actions,.js .hero-note{animation:heroIn .9s var(--ease-out) backwards}
  .js .hero-title span:nth-child(2){animation-delay:.08s}
  .js .hero-sub{animation-delay:.18s}
  .js .hero-actions{animation-delay:.26s}
  .js .hero-note{animation-delay:.34s}
  .js .tilt{animation:cardIn 1.1s var(--ease-out) .1s backwards}
  .js .hcard{animation:cardFloat 7s ease-in-out 1.2s infinite alternate}
  .js .band{transform-origin:50% 0;will-change:transform}
  .hero-copy,.hero-stage{will-change:transform,opacity}
  /* проявление при скролле */
  .js [data-rv]{opacity:0;filter:blur(10px);transform:translate3d(0,22px,0);
    transition:opacity .8s var(--ease-out),filter .8s var(--ease-out),transform .9s var(--ease-out);transition-delay:var(--rvd,0s)}
  .js [data-rv].in{opacity:1;filter:none;transform:none}
  /* линия между шагами вырастает вслед за шагом */
  .js .steps li[data-rv]::after{transform:scaleY(0);transform-origin:50% 0;transition:transform .9s var(--ease-out) .25s}
  .js .steps li[data-rv].in::after{transform:none}
  @media (min-width:720px){
    .js .steps li[data-rv]::after{transform:scaleX(0);transform-origin:0 50%}
    .js .steps li[data-rv].in::after{transform:none}
  }
}
@keyframes heroIn{from{opacity:0;filter:blur(12px);transform:translate3d(0,18px,0)}}
@keyframes cardIn{from{opacity:0;filter:blur(14px);transform:perspective(1000px) rotateX(calc(var(--bx) + 10deg)) rotateY(calc(var(--by) - 12deg)) translate3d(0,30px,0) scale(.94)}}
@keyframes cardFloat{from{transform:translate3d(0,-5px,0)}to{transform:translate3d(0,7px,0)}}
