/* ============================================================
   Reviro PitStop — лендинг. Токены и правила: дизайн-спека
   (роли цветов: navy — бренд, оранжевый — только конверсия).
   ============================================================ */

:root {
  /* Бренд */
  --brand: #1c3a5c;
  --brand-deep: #16304d;
  --brand-footer: #12233a;
  --brand-hi: #284a70;

  /* Акцент / CTA */
  --cta: #e8632a;
  --cta-hover: #c9521e;
  --accent-ink: #b8490f;
  --accent-bright: #f25e1e;
  --accent-on-dark: #ff9a62;
  --accent-soft: #fcece3;

  /* Нейтральные (= продукт) */
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e7e9ed;
  --text: #1f2733;
  --muted: #5b6573;
  --faint: #8b94a3;
  --chrome: #eef0f3;

  /* Текст на тёмном */
  --ink-inverse: #ffffff;
  --ink-inverse-muted: #b7c4d4;
  --border-inverse: rgba(255, 255, 255, .14);

  /* Геометрия */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Тени */
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 16px -6px rgba(16,24,40,.1);
  --shadow-lg: 0 24px 48px -16px rgba(16,24,40,.22);
  --shadow-frame: 0 32px 64px -24px rgba(16,24,40,.35);
  --shadow-cta: 0 8px 24px -8px rgba(232,99,42,.5);

  /* Сетка и отступы */
  --container: 1160px;
  --gutter: 24px;
  --section-y: clamp(48px, 8vw, 96px);
  --header-h: 68px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--card);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; line-height: 1.12; }
h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cta-hover); }

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.hero :focus-visible,
.section-cta :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent-on-dark); outline-offset: 3px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 760px; }

.section { padding-block: var(--section-y); scroll-margin-top: calc(var(--header-h) + 16px); }
.section-alt { background: var(--bg); }
.section > .container > h2 { text-align: center; margin-bottom: 12px; }

section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.hidden { display: none !important; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus-visible { top: 8px; color: #fff; }

/* Eyebrow над заголовками секций */
.eyebrow {
  display: block; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 10px;
}

.section-lead { text-align: center; color: var(--muted); font-size: 18px; max-width: 720px; margin: 0 auto 40px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1.2;
  padding: 13px 22px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

/* Оранжевый CTA — только крупная подпись (19px/700), см. контраст-таблицу */
.btn-cta {
  background: var(--cta); color: #fff;
  font-size: 19px; font-weight: 700; padding: 16px 28px;
  box-shadow: var(--shadow);
}
.btn-cta:hover { background: var(--cta-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-cta); }
.btn-cta:active { transform: translateY(0); box-shadow: none; }

.btn-nav { background: var(--brand); color: #fff; font-size: 15px; padding: 12px 18px; }
.btn-nav:hover { background: var(--brand-hi); color: #fff; }

.btn-ghost-dark { background: transparent; color: #fff; border: 1.5px solid var(--border-inverse); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: #fff; }

.btn-ghost { background: var(--card); color: var(--brand); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--brand); box-shadow: var(--shadow); }

.btn-block { width: 100%; }

/* ---------- Хедер ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card); border-bottom: 1px solid var(--border);
  transition: box-shadow .15s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 36px; width: auto; }

.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a {
  font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none;
}
.site-nav a:hover { color: var(--accent-ink); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer; border-radius: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--brand); border-radius: 2px; transition: transform .15s ease, opacity .15s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--brand-deep), var(--brand));
  background-color: var(--brand);
  color: var(--ink-inverse);
  padding-top: var(--section-y);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 78% 12%, rgba(242,94,30,.16), transparent 70%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-bottom: var(--section-y);
}

.hero-kicker {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-on-dark);
  background: rgba(255,255,255,.08); border: 1px solid var(--border-inverse);
  border-radius: var(--radius-pill); padding: 7px 14px; margin: 0 0 20px;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero-sub { font-size: 19px; color: var(--ink-inverse-muted); max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }

.hero-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hero-trust li {
  position: relative; padding-left: 28px;
  font-size: 14px; color: var(--ink-inverse-muted);
}
.hero-trust li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px;
  background-color: var(--accent-on-dark);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
}

/* Скриншот hero заходит на следующую секцию (шов) */
.hero-shot { align-self: end; }
.hero-shot .browser-frame { margin-bottom: calc(-1 * var(--section-y) - 64px); }
.section-pains { padding-top: calc(var(--section-y) + 64px); }
@media (min-width: 1081px) {
  .hero-shot .browser-frame { margin-right: -64px; }
}

/* Браузерная рамка для скриншотов */
.browser-frame {
  margin: 0; background: var(--card);
  border: 1px solid rgba(16,24,40,.08); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-frame); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding-left: 14px; background: var(--chrome); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd6de; }

/* ---------- Боли ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); } /* боли — 2×2 */

.pains-grid, .pillars-grid, .integr-grid, .pricing-grid, .shots-grid { margin-top: 40px; }

.pain-card, .pillar-card, .integr-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: box-shadow .15s ease, transform .15s ease;
}
.pain-card:hover, .pillar-card:hover, .integr-card:hover { box-shadow: var(--shadow); }

.pain-card h3, .pillar-card h3, .integr-card h3 { color: var(--brand); }
.pain-card p, .pillar-proof { color: var(--muted); font-size: 16px; }

.card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 16px;
  background: var(--accent-soft); border-radius: 10px; color: var(--accent-ink);
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Шаги ---------- */
.steps {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  counter-reset: step;
}
.step { position: relative; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 18px;
  background: var(--brand); color: #fff; border-radius: 50%;
  font-size: 20px; font-weight: 800;
}
.step-cta .step-num { background: var(--cta); }
.step h3 { color: var(--brand); }
.step p { color: var(--muted); font-size: 16px; }

@media (min-width: 821px) {
  .step:not(:last-child)::before {
    content: ""; position: absolute; top: 23px; left: 64px; right: -16px;
    border-top: 2px dashed var(--border);
  }
}

/* ---------- Роли ---------- */
.roles { list-style: none; margin: 40px auto 0; padding: 0; max-width: 800px; display: grid; gap: 12px; }
.roles li {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--cta);
  border-radius: var(--radius); padding: 18px 24px; font-size: 16px; color: var(--muted);
}
.roles li strong { color: var(--brand); font-weight: 700; }

/* ---------- Скриншоты ---------- */
.shots-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
.shot { margin: 0; }
.shot .frame {
  background: var(--card); border: 1px solid rgba(16,24,40,.08); border-radius: var(--radius);
  box-shadow: var(--shadow-frame); overflow: hidden; margin-bottom: 14px;
}
.shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; padding-inline: 8px; }
.shot figcaption strong { color: var(--brand); }

/* ---------- Интеграции ---------- */
.integr-card p { color: var(--muted); font-size: 16px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.pill {
  display: inline-block; padding: 8px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; color: var(--brand);
}
.pill-accent { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Тарифы ---------- */
.pricing-grid { align-items: start; }
.price-card {
  position: relative; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow);
}
.price-card-main { border: 2px solid var(--cta); box-shadow: var(--shadow-lg); }

.price-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--cta); color: #fff; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; padding: 5px 14px; margin: 0; white-space: nowrap;
}
.price-card h3 { color: var(--brand); font-size: 22px; }
.price-value { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1.15; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.price-unit { display: block; font-size: 15px; font-weight: 400; color: var(--muted); }
.price-value-sm { font-size: 28px; }

.price-features { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.price-features li { position: relative; padding-left: 30px; font-size: 16px; }
.price-features li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px;
  background-color: var(--accent-ink);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
}
.price-features .no-check { padding-left: 0; font-weight: 600; color: var(--brand); }
.price-features .no-check::before { display: none; }

.price-note { font-size: 14px; color: var(--muted); margin-bottom: 22px; }

.implementation-note {
  margin-top: 32px; padding: 28px 32px;
  background: var(--card); border: 1px dashed var(--faint); border-radius: var(--radius-lg);
}
.implementation-note h3 { color: var(--brand); margin-bottom: 8px; }
.impl-once { font-weight: 400; color: var(--muted); font-size: 16px; }
.implementation-note p { color: var(--muted); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 40px; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px;
}
.faq-item[open] { border-color: var(--faint); }
.faq-item summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 18px 56px 18px 20px; min-height: 44px;
  font-size: 17px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 20px; height: 20px;
  transform: translateY(-50%);
  background-color: var(--faint);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>') center / contain no-repeat;
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); background-color: var(--accent-ink); }
.faq-item p { padding: 0 20px 20px; margin: 0; font-size: 16px; color: var(--muted); }

/* ---------- Финальный CTA + контакты ---------- */
.section-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--brand-deep), var(--brand));
  background-color: var(--brand);
  color: var(--ink-inverse);
}
.section-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.section-cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 20% 90%, rgba(242,94,30,.14), transparent 70%);
}
.cta-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.cta-copy h2 { color: #fff; }
.cta-copy p { color: var(--ink-inverse-muted); font-size: 18px; max-width: 520px; }
.cta-punch { font-weight: 700; color: #fff !important; }

/* Карточка контактов вместо формы: заявки идут в WhatsApp и на почту */
.contact-card {
  background: var(--card); color: var(--text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-frame);
  padding: 32px;
}
.contact-card h3 { color: var(--brand); margin-bottom: 10px; }
.contact-lead { font-size: 16px; color: var(--muted); margin-bottom: 20px; }
.contact-card .btn + .btn { margin-top: 12px; }

.contact-list {
  list-style: none; margin: 20px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--border);
  display: grid; gap: 8px; font-size: 15px; color: var(--muted);
}
.contact-list a { color: var(--brand); font-weight: 600; }
.contact-list a:hover { color: var(--accent-ink); }

/* WhatsApp — зелёный канала, затемнён до контраста 5.3:1 с белым текстом */
.btn-whatsapp { background: #127c3f; color: #fff; font-size: 18px; padding: 15px 24px; box-shadow: var(--shadow); }
.btn-whatsapp:hover { background: #0e6633; color: #fff; transform: translateY(-1px); }
.btn-whatsapp:active { transform: translateY(0); box-shadow: none; }
.ic-wa { flex: 0 0 auto; }

/* ---------- Футер ---------- */
.site-footer { background: var(--brand-footer); color: var(--ink-inverse-muted); padding-top: var(--section-y); }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 16px; }
.footer-brand svg { flex: none; }
.footer-brand .brand-name { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.footer-about p { font-size: 14px; }

.footer-col h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; font-size: 14px; color: var(--ink-inverse-muted); text-decoration: none; margin: 0 0 10px; }
.footer-col a:hover { color: #fff; }
/* Контакты в футере: ссылка остаётся в строке подписи и выделена акцентом */
.footer-col p a { display: inline; color: var(--accent-on-dark); font-weight: 600; margin: 0; }
.footer-col p a:hover { color: #fff; }

.footer-legal {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-inverse); padding-block: 20px;
  font-size: 13px;
}
.footer-legal a { color: var(--ink-inverse-muted); }
.footer-legal a:hover { color: #fff; }

/* ============================================================
   Адаптивность
   ============================================================ */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-shot .browser-frame { margin-right: 0; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: flex; }
  .header-actions .btn-nav { display: none; }

  .grid-2, .grid-3, .grid-4,
  .pains-grid, .pillars-grid, .integr-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  /* Галерея → горизонтальная карусель */
  .shots-grid {
    display: flex; grid-template-columns: none; gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 12px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  }
  .shot { flex: 0 0 86vw; scroll-snap-align: center; }

  .hero-shot .browser-frame { margin-bottom: calc(-1 * var(--section-y) - 32px); }
  .section-pains { padding-top: calc(var(--section-y) + 32px); }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .hero-cta .btn { width: 100%; }
  .pain-card, .pillar-card, .integr-card, .price-card, .contact-card { padding: 20px; }
  .implementation-note { padding: 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
