/* Токены: шрифт Manrope, шкала Tailwind, отступы 2/4/8/12/16/24/32/40/48/64/80/96 */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1a252d;
  --muted: #717c82;
  --line: #d2d2d7;
  --accent: #2196ff;
  --accent-ink: #ffffff;
  --danger: #e30000;
  --navy-1: #1b2a4a;
  --navy-2: #5b7a9e;
  --card-dark: #1f1f1f;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 24px;
  --max: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }


.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Текстовые стили ---------- */
.display   { font-size: 96px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.heading-1 { font-size: 60px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.heading-2 { font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.title-1   { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2   { font-size: 18px; line-height: 28px; font-weight: 500; }
.lede      { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--muted); }
.lede b    { color: var(--ink); font-weight: 600; }
.body-3    { font-size: 16px; line-height: 24px; }
.caption-2 { font-size: 14px; line-height: 20px; color: var(--muted); }
.eyebrow   { font-size: 24px; line-height: 32px; font-weight: 600; margin-bottom: 16px; }

/* Фирменный градиент заголовков (только на тексте) */
.grad {
  background: linear-gradient(90deg, var(--navy-1) 0%, var(--navy-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-hot {
  background: linear-gradient(90deg, #ff5f1f 0%, #e3006d 45%, #7a3cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Кнопки — общие из site.css (.btn, .btn-sm) */
.link-arrow { font-size: 20px; line-height: 28px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Навигация ---------- */
@media (max-width: 760px) {  }

/* ---------- Секции ---------- */
section { padding-block: 96px; }
.alt { background: var(--bg-alt); }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }

/* Hero */
.hero { padding-block: 64px 0; text-align: center; }
.hero .display { margin: 16px auto 24px; max-width: 980px; }
.hero .sub { max-width: 680px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.hero-media { max-width: 1440px; margin: 0 auto; }

/* Медиа: картинка + плоская заглушка, если картинки нет */
.media {
  position: relative; overflow: hidden; background: var(--card-dark);
  border-radius: var(--r-lg); aspect-ratio: 14 / 9;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.missing::before {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center;
  color: #9b9b9b; font-size: 14px; line-height: 20px; padding: 24px; text-align: center;
}
.media.wide { aspect-ratio: 16 / 8; }

/* ---------- Карусели ---------- */
.rail {
  display: grid; grid-auto-flow: column; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--rail-pad);
  padding-inline: var(--rail-pad); padding-bottom: 8px;
  scrollbar-width: none; overscroll-behavior-x: contain;
  --rail-pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-controls { display: flex; justify-content: flex-end; gap: 16px; margin-top: 32px; }
.arrow {
  width: 40px; height: 40px; border-radius: 9999px; border: 0; cursor: pointer;
  background: #e8e8ed; color: var(--ink); display: grid; place-items: center;
  transition: background-color .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease);
}
.arrow:hover { background: #dcdce1; }
.arrow:active { transform: scale(0.94); }
.arrow:disabled { opacity: .4; cursor: default; }
.arrow svg { width: 20px; height: 20px; }

/* Карточки «что случается» */
.hl-card {
  width: min(720px, 82vw); aspect-ratio: 720 / 470; border-radius: var(--r-lg); overflow: hidden;
  position: relative; background: var(--card-dark); color: #fff;
}
.hl-card .media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.hl-card .shade { position: absolute; inset: 0 0 auto 0; height: 50%; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0)); pointer-events: none; }
.hl-card p { position: absolute; top: 32px; left: 32px; right: 32px; font-size: 20px; line-height: 28px; font-weight: 500; }
.hl-card p b { color: #ffb340; font-weight: 600; }
.hl-card .tag {
  position: absolute; left: 24px; bottom: 24px; font-size: 18px; line-height: 28px; font-weight: 500;
  background: rgba(40, 40, 40, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 4px 12px; border-radius: var(--r-sm);
}

/* «Создан падать» */
.fall .display { margin-bottom: 64px; }

/* Переключатель катастроф */
.switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.switcher .stage { border-radius: var(--r-lg); background: var(--bg-alt); padding: 32px; display: flex; flex-direction: column; gap: 32px; }
.switcher .stage .media { border-radius: var(--r-md); transition: opacity .5s var(--ease); }
.swatches { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.swatch { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 500 14px/20px inherit; font-family: inherit; color: var(--muted); }
.swatch i { width: 40px; height: 40px; border-radius: 9999px; display: block; outline: 2px solid transparent; outline-offset: 4px; transition: outline-color .3s var(--ease), transform .3s var(--ease); }
.swatch:hover i { transform: scale(1.06); }
.swatch[aria-pressed="true"] { color: var(--ink); }
.swatch[aria-pressed="true"] i { outline-color: var(--accent); }
.dz-text { display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.dz-text .lede { transition: opacity .5s var(--ease); }
@media (max-width: 900px) { .switcher { grid-template-columns: 1fr; } }

/* Статистика «чип» */
.stats { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 48px; align-items: start; margin-top: 64px; }
.chipmark { width: 144px; height: 144px; border: 6px solid var(--ink); border-radius: var(--r-lg); display: grid; place-items: center; font-size: 30px; line-height: 36px; font-weight: 600; text-align: center; }
.stat .pre { font-size: 24px; line-height: 32px; font-weight: 500; color: var(--muted); }
.stat .val { font-size: 60px; line-height: 1; font-weight: 600; margin: 8px 0; white-space: nowrap; }
.stat .post { font-size: 24px; line-height: 32px; font-weight: 500; color: var(--muted); }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr; gap: 32px; } .stat .val { font-size: 48px; } }

/* Батарея */
.battery-row { display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: end; margin-top: 48px; }
.big-num .pre, .big-num .post { font-size: 18px; line-height: 28px; font-weight: 600; }
.big-num .val { font-size: 96px; line-height: 1; font-weight: 600; color: var(--danger); }
@media (max-width: 760px) { .battery-row { grid-template-columns: 1fr; gap: 32px; } }

/* Слоган с проявлением слов */
.tagline { padding-block: 160px; }
.tagline p { max-width: 980px; margin: 0 auto; text-align: center; }
.tagline .w { color: rgba(29, 29, 31, 0.28); transition: color .6s var(--ease); }
.tagline .w.on { color: var(--ink); }

/* Залили — две карточки */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.duo article { display: flex; flex-direction: column; gap: 24px; }
.duo .media { border-radius: var(--r-lg); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; font-size: 18px; line-height: 28px; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 9999px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.steps.no li::before { content: "×"; background: var(--danger); }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }

/* Центр «Диагностика» */
.center { text-align: center; }
.center .heading-1 { margin-bottom: 32px; }
.center .sub { max-width: 760px; margin: 0 auto 32px; }

/* Виды поломок */
.type-card {
  width: 300px; border-radius: var(--r-lg); background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease);
}
.type-card:hover { transform: translateY(-4px); }
.type-card .media { border-radius: 0; aspect-ratio: 3 / 2; }
.type-card .body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.type-card.plain .body { padding: 32px; justify-content: flex-end; min-height: 100%; }
.type-card .t { font-size: 24px; line-height: 32px; font-weight: 600; }
.type-card .s { color: var(--muted); font-size: 14px; line-height: 20px; flex: 1; }
.type-card a { font-size: 16px; line-height: 24px; font-weight: 600; }

/* Как чиним */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.how li { list-style: none; }
.how .n { font-size: 60px; line-height: 1; font-weight: 600; color: var(--line); margin-bottom: 16px; }
.how h3 { font-size: 24px; line-height: 32px; font-weight: 600; margin-bottom: 8px; }
.how p { color: var(--muted); }
ol.how { padding: 0; margin: 48px 0 0; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 48px auto 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 20px; line-height: 28px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 30px; line-height: 28px; font-weight: 400; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--muted); font-size: 18px; line-height: 28px; }

/* Форма */
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.form { background: #fff; border-radius: var(--r-lg); padding: 32px; display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; line-height: 20px; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color .3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,150,255,.2); }
.field .err { color: var(--danger); font-size: 12px; line-height: 16px; min-height: 16px; }
.field.bad input { border-color: var(--danger); }
.form-msg { font-size: 14px; line-height: 20px; min-height: 20px; }
.contacts { display: grid; gap: 24px; margin-top: 32px; }
.contacts div span { display: block; color: var(--muted); font-size: 14px; line-height: 20px; }
.contacts div strong { font-size: 24px; line-height: 32px; font-weight: 600; }
@media (max-width: 900px) { .book { grid-template-columns: 1fr; } }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Мобильная версия */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  section { padding-block: 64px; }
  .display { font-size: 48px; }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .lede, .eyebrow { font-size: 18px; line-height: 28px; }
  .hl-card { width: 86vw; aspect-ratio: 3 / 4; border-radius: var(--r-lg); }
  .hl-card p { top: 24px; left: 24px; right: 24px; font-size: 18px; line-height: 28px; }
  .big-num .val { font-size: 72px; }
  .tagline { padding-block: 96px; }
  .media.wide { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity .3s linear; }
  .tagline .w { color: var(--ink); transition: none; }
  * { transition-duration: .2s !important; }
}

/* Плашка премиум сервиса из рейтинга */
.prem-wide { background: linear-gradient(157.4deg, #f6d27a 15.96%, #c9973a 100%); border-radius: var(--r-lg); padding: 32px; color: #2a1d00; }
.prem-wide > h2 { font-size: 30px; line-height: 36px; font-weight: 600; margin-bottom: 24px; }
.prem-wide .in { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 32px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.prem-wide .tile { width: 96px; height: 96px; border-radius: var(--r-lg); background: #1a252d; color: #fff; display: grid; place-items: center; font-size: 30px; line-height: 36px; font-weight: 600; }
.prem-wide .nm { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 30px; line-height: 36px; font-weight: 600; }
.prem-wide .badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--r-sm); background: #f7f9f9; font-size: 12px; line-height: 16px; font-weight: 600; color: #32393d; }
.prem-wide .badge svg { width: 14px; height: 14px; color: #f5a623; }
.prem-wide .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.prem-wide .meta span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-sm); background: #f7f9f9; font-size: 14px; line-height: 20px; font-weight: 600; }
.prem-wide .meta svg { width: 14px; height: 14px; color: #2196ff; }
.prem-wide p { color: var(--muted); font-size: 16px; line-height: 24px; }
.prem-wide .acts { display: grid; gap: 12px; justify-items: stretch; min-width: 240px; }
.prem-wide .acts a.sec { text-align: center; font-weight: 600; }
.prem-note { color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 16px; text-align: center; }
@media (max-width: 900px) {
  .prem-wide { padding: 24px 16px; border-radius: var(--r-lg); }
  .prem-wide > h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
  .prem-wide .in { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; gap: 16px; }
  .prem-wide .tile { width: 64px; height: 64px; font-size: 24px; line-height: 32px; border-radius: var(--r-md); }
  .prem-wide .nm { font-size: 24px; line-height: 32px; }
  .prem-wide .acts { min-width: 0; }
}

.prem-wide .tile.has-logo { background: #fff; border: 1px solid var(--line); padding: 12px; }
