/* Пульс · общий каркас лендингов.
   Структура и сетка — здесь; цвета, шрифты и характер — в токенах темы (light / dark / warm).
   Всё строится на токенах: тема переопределяет только :root. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (max-width: 420px) { .wrap { padding-inline: 16px; } }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-tracking); line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: 20px; line-height: 1.2; letter-spacing: var(--h3-tracking); text-transform: none; font-family: var(--font-h3); font-weight: 700; }
p { margin: 0; }

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: var(--radius-btn); border: 2px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- шапка ---------- */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--header-bg); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; flex-shrink: 0; }
.logo b { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--logo-case); font-size: 22px; letter-spacing: var(--display-tracking); }
.logo small { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
.logo img { max-height: 44px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--ink); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.head-contact { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.head-contact a { white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.head-contact span { font-size: 12.5px; color: var(--muted); }
.messengers { display: flex; gap: 8px; }
.msg { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background-color .15s; }
.msg:hover { background: var(--accent); color: var(--accent-ink); }
.msg svg { width: 19px; height: 19px; }
.msg.text { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.head-call { display: none; }
@media (max-width: 1240px) { .nav { display: none; } }
@media (max-width: 1100px) { .head-contact span { display: none; } }
@media (max-width: 899px) {
  .head-contact, .head-right .btn, .head-right .messengers { display: none; }
  .head-call { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); }
  .head-call svg { width: 20px; height: 20px; }
  .header .wrap { min-height: 64px; }
}

/* ---------- первый экран ---------- */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(48px, 7vw, 88px); }
.hero-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); font-weight: 700; font-size: 15px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: var(--h1-size, clamp(38px, 6.4vw, 78px)); }
.hero h1 .hl { display: inline-block; color: var(--hl-ink); background: var(--hl-bg); padding: var(--hl-pad); border-radius: var(--radius-sm); }
.hero-sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 46ch; }
.anchor-row { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15.5px; }
.anchor-row div { display: flex; flex-direction: column; }
.anchor-row b { font-size: 21px; font-variant-numeric: tabular-nums; }
.anchor-row span { color: var(--muted); font-size: 14px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .cta-row .btn { flex: 1 1 100%; } }

.timer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.timer-label { font-size: 14px; color: var(--muted); }
.timer-cells { display: flex; gap: 6px; }
.timer-cell { min-width: 58px; padding: 8px 6px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; display: flex; flex-direction: column; }
.timer-cell b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; font-family: var(--font-display); font-weight: var(--display-weight); }
.timer-cell span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.hero-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* вариант split: текст слева, фото справа */
.hero--split .hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero--split .hero-media { aspect-ratio: 4 / 4.4; }
@media (max-width: 899px) { .hero--split .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero--split .hero-media { aspect-ratio: 4 / 3; order: -1; } }

/* вариант overlay: фото на весь блок, текст поверх */
.hero--overlay { position: relative; padding-block: 0; }
.hero--overlay .hero-shell { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 620px; display: flex; align-items: flex-end; }
.hero--overlay .hero-media { position: absolute; inset: 0; border-radius: 0; }
.hero--overlay .hero-shell::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
.hero--overlay .hero-text { position: relative; z-index: 1; padding: clamp(28px, 5vw, 64px); max-width: 760px; color: var(--overlay-ink); }
.hero--overlay .hero-sub, .hero--overlay .anchor-row span, .hero--overlay .timer-label, .hero--overlay .timer-cell span { color: var(--overlay-muted); }
.hero--overlay .timer-cell { background: var(--overlay-cell); }
.hero--overlay .btn-ghost { color: var(--overlay-ink); border-color: var(--overlay-line); }
.hero--overlay-wrap { padding-block: 16px clamp(48px, 7vw, 88px); }
@media (max-width: 640px) { .hero--overlay .hero-shell { min-height: 0; padding-top: 240px; } .hero--overlay .hero-shell::after { background: var(--overlay-mobile, var(--overlay)); } }

/* вариант stacked: карточка с текстом, под ней широкое фото */
.hero--stacked .hero-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px); background: var(--surface); border-radius: var(--radius-lg); }
.hero--stacked .hero-text { align-items: center; }
.hero--stacked .pill, .hero--stacked .anchor-row, .hero--stacked .cta-row, .hero--stacked .timer { align-self: center; justify-content: center; }
.hero--stacked .hero-sub { margin-inline: auto; }
.hero--stacked .hero-media { margin-top: 14px; aspect-ratio: 21 / 9; }
@media (max-width: 640px) { .hero--stacked .hero-media { aspect-ratio: 4 / 3; } }

/* ---------- усилитель ---------- */
.booster { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--booster-bg); color: var(--booster-ink); }
.booster-icon { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--booster-chip); display: flex; align-items: center; justify-content: center; }
.booster-icon svg { width: 32px; height: 32px; }
.booster-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.booster h3 { font-size: clamp(20px, 2.4vw, 28px); margin-top: 4px; }
.booster p { margin-top: 6px; opacity: .85; }
.booster .btn { background: var(--booster-btn); color: var(--booster-btn-ink); }
@media (max-width: 760px) { .booster { grid-template-columns: minmax(0, 1fr); } .booster .btn { width: 100%; } }

/* ---------- преимущества ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
@media (max-width: 899px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .benefits { grid-template-columns: minmax(0, 1fr); } }
.benefit { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border-radius: var(--radius); border: var(--card-border); min-width: 0; }
.benefit-num { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 15px; color: var(--accent-text); }
.benefit p { color: var(--muted); font-size: 16px; }

/* ---------- фото ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 18vw, 230px); gap: var(--grid-gap); }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); min-width: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery[data-count="1"] figure { grid-column: span 6; grid-row: span 2; }
.gallery[data-count="2"] figure { grid-column: span 3; grid-row: span 2; }
.gallery[data-count="3"] figure:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.gallery[data-count="3"] figure:nth-child(n+2) { grid-column: span 2; }
.gallery[data-count="4"] figure:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery[data-count="4"] figure:nth-child(2) { grid-column: span 3; }
.gallery[data-count="4"] figure:nth-child(n+3) { grid-column: span 3; grid-row: auto; }
.gallery[data-count="4"] figure:nth-child(3) { grid-column: 4 / span 3; }
.gallery[data-count="4"] figure:nth-child(4) { grid-column: 1 / span 6; }
.gallery[data-count="5"] figure:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery[data-count="5"] figure:nth-child(n+2) { grid-column: span 3; }
.gallery[data-count="5"] figure:nth-child(4), .gallery[data-count="5"] figure:nth-child(5) { grid-column: span 3; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .gallery figure, .gallery[data-count] figure:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery figure:first-child { grid-column: span 2 !important; grid-row: span 2 !important; }
  .gallery[data-count="2"] figure:nth-child(2), .gallery[data-count="4"] figure:nth-child(4) { grid-column: span 2 !important; }
}

/* ---------- доверие ---------- */
.trust-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--grid-gap); margin-bottom: var(--grid-gap); }
@media (max-width: 899px) { .trust-top { grid-template-columns: minmax(0, 1fr); } }
.rating { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius); background: var(--rating-bg); color: var(--rating-ink); }
.rating-score { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.stars { display: flex; gap: 3px; color: var(--star); }
.stars svg { width: 20px; height: 20px; }
.rating small { opacity: .8; font-size: 14.5px; }
.award { align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: var(--rating-chip); font-size: 13.5px; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
@media (max-width: 560px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.fact { padding: 26px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; }
.fact b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(34px, 4vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.fact span { color: var(--muted); font-size: 15px; }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
@media (max-width: 899px) { .reviews { grid-template-columns: minmax(0, 1fr); } }
.review { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: var(--card-border); min-width: 0; }
.review p { font-size: 16px; }
.review footer { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.review footer b { color: var(--ink); }

/* ---------- квиз ---------- */
.quiz { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--grid-gap); align-items: stretch; }
@media (max-width: 899px) { .quiz { grid-template-columns: minmax(0, 1fr); } }
.quiz-side { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--booster-bg); color: var(--booster-ink); display: flex; flex-direction: column; gap: 14px; }
.quiz-side h2 { font-size: clamp(26px, 3vw, 36px); }
.quiz-gift { margin-top: auto; padding: 16px; border-radius: var(--radius-sm); background: var(--booster-chip); font-weight: 600; }
.quiz-box { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--surface); border: var(--card-border); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.quiz-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.quiz-step-label { font-size: 14px; color: var(--muted); }
.quiz-q { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; font-family: var(--font-h3); }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .quiz-options { grid-template-columns: minmax(0, 1fr); } }
.quiz-opt { text-align: left; padding: 16px 18px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 600; transition: border-color .15s; }
.quiz-opt:hover, .quiz-opt[aria-pressed="true"] { border-color: var(--accent); }
.quiz-nav { display: flex; justify-content: space-between; gap: 10px; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px 0; font-weight: 600; }

/* ---------- формы ---------- */
.offer-repeat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--grid-gap); align-items: stretch; padding: clamp(24px, 4vw, 56px); border-radius: var(--radius-lg); background: var(--repeat-bg); color: var(--repeat-ink); }
@media (max-width: 899px) { .offer-repeat { grid-template-columns: minmax(0, 1fr); } }
.offer-repeat .hero-text { justify-content: center; }
.offer-repeat h2 { font-size: var(--h2-repeat, clamp(30px, 4.4vw, 54px)); }
.offer-repeat h2 .hl { color: var(--hl-ink); background: var(--hl-bg); padding: var(--hl-pad); border-radius: var(--radius-sm); display: inline-block; }
.offer-repeat .hero-sub, .offer-repeat .timer-label, .offer-repeat .timer-cell span { color: var(--repeat-muted); }
.offer-repeat .timer-cell { background: var(--repeat-cell); }
.form-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--form-bg, var(--surface)); color: var(--ink); min-width: 0; }
.form-card h3 { font-size: 22px; }
.form-card .hint { color: var(--muted); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { height: 54px; padding: 0 16px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--bg); color: var(--ink); font-size: 17px; }
.field input:focus { outline: none; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field .err { color: var(--error); font-size: 13.5px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.consent a { color: var(--ink); }
.form-success { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 8px 0; }
.form-success b { font-size: 22px; font-family: var(--font-h3); }
.form-success p { color: var(--muted); }
.check { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.check svg { width: 26px; height: 26px; }

.questions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--grid-gap); align-items: center; }
@media (max-width: 899px) { .questions { grid-template-columns: minmax(0, 1fr); } }
.questions .form-card { border: var(--card-border); }
.questions-text { display: flex; flex-direction: column; gap: 16px; }
.contact-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.contact-list div { display: flex; flex-direction: column; }
.contact-list span { font-size: 13.5px; color: var(--muted); }
.contact-list b, .contact-list a { font-size: 18px; font-weight: 700; text-decoration: none; }

/* ---------- модальное окно ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); }
.modal[hidden] { display: none; }
.modal .form-card { width: 100%; max-width: 460px; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); max-height: calc(100vh - 32px); overflow: auto; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close svg { width: 18px; height: 18px; }

/* ---------- подвал ---------- */
.footer { padding-block: 48px; background: var(--footer-bg); color: var(--footer-ink); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid div { display: flex; flex-direction: column; gap: 6px; }
.footer .muted { opacity: .65; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--footer-line); display: flex; flex-wrap: wrap; gap: 8px 24px; opacity: .7; font-size: 13px; }

/* ---------- нижняя кнопка на телефоне ---------- */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.mobile-bar .btn { flex: 1; min-height: 52px; }
.mobile-bar .msg { width: 52px; height: 52px; flex-shrink: 0; }
@media (min-width: 900px) { .mobile-bar { display: none; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- проявление при прокрутке (landing.js добавляет .rv и .in) ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
