/* ============================================================
   OpenGate — styles.css
   Дизайн-язык снят с linea.build: кремовый фон, тёмно-синие
   «плиты» с точечной графикой, заголовки капсом без жирности,
   фиолетовые пилюли-кнопки, маркеры-кружки в навигации.
   ============================================================ */

:root {
  --cream: #f8f7f2;
  --ink: #121212;
  --navy: #190066;
  --navy-deep: #120047;
  --violet: #6119ef;
  --violet-hover: #5010d6;
  --cyan: #61dfff;
  --grey: #525252;
  --grey-light: #c0c0c0;
  --line: rgba(18, 18, 18, 0.12);
  --line-on-navy: rgba(248, 247, 242, 0.16);
  --lilac: #f4effe;
  --pink: #fcd6ff;
  --yellow: #fff068;
  --orange: #ff8d4c;
  --white: #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;

  --font: "Manrope", "Onest", "Inter", system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 2.2vw, 30px);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--violet); color: var(--cream);
  padding: 8px 14px; border-radius: var(--pill); z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ── Типографика ─────────────────────────────────────────────── */
.display {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
}
.display--xl { font-size: clamp(52px, 9.4vw, 132px); }
.display--lg { font-size: clamp(38px, 6.6vw, 92px); line-height: 1.06; }
.display--md { font-size: clamp(30px, 4.4vw, 60px); line-height: 1.06; }

.h3 {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.h4 { font-size: 20px; font-weight: 600; line-height: 1.25; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid currentColor;
}
.eyebrow--cyan { color: var(--cyan); }
.eyebrow--violet { color: var(--violet); }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--grey);
  max-width: 62ch;
}
.muted { color: var(--grey); }
.on-navy { color: var(--cream); }
.on-navy .muted { color: rgba(248, 247, 242, 0.72); }

/* ── Кнопки ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px 12px;
  border-radius: var(--pill);
  font-size: 14px; font-weight: 500; line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease,
    border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--violet); color: var(--cream); }
.btn--primary:hover { background: var(--violet-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--ghost-light { background: transparent; color: var(--cream); border-color: rgba(248,247,242,.5); }
.btn--ghost-light:hover { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn--link {
  padding: 13px 0 11px; border-radius: 0; color: var(--cream);
  border-bottom: 1px solid var(--cream); background: none;
}
.btn--link:hover { border-bottom-color: var(--cyan); color: var(--cyan); }
.btn--lg { padding: 16px 26px 15px; font-size: 15px; }

/* ── Навигация ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0 0;
  background: linear-gradient(var(--cream) 70%, rgba(248,247,242,0));
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 52px;
  padding: 0 14px 0 20px;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 17px; }
.brand svg { width: 26px; height: 26px; }
.brand sup { font-size: 9px; color: var(--cyan); margin-left: 2px; }

.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a {
  font-size: 14px; display: inline-flex; align-items: center; gap: 7px;
  opacity: .92;
}
.nav__links a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid currentColor; transition: background .18s;
}
.nav__links a:hover::before, .nav__links a.active::before { background: var(--cyan); border-color: var(--cyan); }
.nav__links a:hover { opacity: 1; }

.nav__right { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line-on-navy); border-radius: var(--pill); overflow: hidden; }
.lang button {
  background: none; border: 0; color: var(--cream); opacity: .6;
  padding: 6px 9px; font-size: 12px; font-weight: 600; cursor: pointer; letter-spacing: .04em;
}
.lang button.active { opacity: 1; background: rgba(248,247,242,.12); }
.lang button:hover { opacity: 1; }
.nav .btn { padding: 9px 14px 8px; font-size: 13px; }

.nav__burger {
  display: none; background: none; border: 0; color: var(--cream);
  width: 40px; height: 40px; cursor: pointer; border-radius: 10px;
}
.nav__burger span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; border-radius: 2px; }

/* мобильное меню */
.mobile-menu {
  display: none;
  margin-top: 8px; padding: 14px 18px 18px;
  background: var(--navy); color: var(--cream); border-radius: var(--radius);
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 11px 0; font-size: 17px; border-bottom: 1px solid var(--line-on-navy); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 12px; width: 100%; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero { padding: 10px 0 0; }
.hero__card {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--cream);
  border-radius: var(--radius);
  min-height: min(78vh, 720px);
  padding: clamp(28px, 4vw, 56px) clamp(22px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}
.hero__dots {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero__title {
  position: relative; z-index: 2;
  display: grid; gap: 0;
}
.hero__title span { display: block; }
.hero__title .l2 { padding-left: clamp(10%, 22vw, 30%); }
.hero__title .l3 { padding-left: clamp(4%, 9vw, 12%); }
.hero__foot {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end; align-items: flex-end;
}
.hero__blurb { max-width: 340px; display: grid; gap: 18px; }
.hero__blurb p { font-size: 15px; line-height: 1.5; color: rgba(248,247,242,.92); }
.hero__actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ── Полоса доверия ──────────────────────────────────────────── */
.trust { padding: clamp(36px, 5vw, 64px) 0 0; text-align: center; }
.trust__logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 18px clamp(24px, 4vw, 56px);
  margin-bottom: 18px;
}
.trust__logos .logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink);
  opacity: .88;
}
.trust__logos .logo small { font-weight: 500; font-size: 12px; color: var(--grey); letter-spacing: .04em; }
.trust__logos .logo svg { width: 22px; height: 22px; }
.trust__caption { font-size: 14px; color: var(--grey); }

/* ── Секции ──────────────────────────────────────────────────── */
.section { padding: clamp(56px, 8vw, 120px) 0 0; }
.section--tight { padding-top: clamp(40px, 5vw, 72px); }
.section__head { display: grid; gap: 18px; }
.section__head .display { max-width: 16ch; }
.section__head .display.right { margin-left: auto; text-align: right; }
.center { text-align: center; }
.center .lead, .center .display { margin-left: auto; margin-right: auto; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  position: relative; overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
  display: grid; align-content: start; gap: 16px;
  min-height: 300px;
}
.card .h3 { max-width: 20ch; }
.card ul.bullets { display: grid; gap: 10px; margin-top: 4px; }
.bullets li { position: relative; padding-left: 18px; font-size: 15px; color: var(--grey); line-height: 1.45; }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--violet);
}
.on-navy .bullets li { color: rgba(248,247,242,.8); }
.on-navy .bullets li::before { background: var(--cyan); }

.card--navy { background: var(--navy); color: var(--cream); }
.card--lilac { background: var(--lilac); }
.card--wide { grid-column: 1 / -1; }
.card__art { position: absolute; inset: 0; pointer-events: none; }
.card__body { position: relative; z-index: 1; display: grid; gap: 16px; align-content: start; }

/* широкая навная плита с текстом слева */
.plate {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(36px, 5vw, 72px) clamp(24px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px;
  align-items: center;
}
.plate__text { display: grid; gap: 20px; position: relative; z-index: 1; }
.plate__text .display { max-width: 12ch; }
.plate__visual { position: relative; z-index: 1; }

/* ── Как это работает ────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--white); border-radius: var(--radius); padding: 26px 26px 30px;
  display: grid; gap: 12px; align-content: start; position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--violet);
  letter-spacing: .06em;
}
.step .h4 { font-size: 19px; }
.step p { font-size: 15px; color: var(--grey); }

/* ── Фича-ряды (чередование как у референса) ─────────────────── */
.feature {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 96px) 0 0;
}
.feature--flip .feature__text { order: 2; }
.feature__text { display: grid; gap: 18px; max-width: 520px; }
.feature__text .display { max-width: 12ch; }
.feature__text .bullets li { color: var(--grey); }
.feature__visual { position: relative; min-height: 320px; }

/* ── Мок-билет ───────────────────────────────────────────────── */
.ticket {
  background: var(--white); color: var(--ink);
  border-radius: var(--radius); padding: 22px 24px;
  width: min(100%, 420px);
  display: grid; gap: 14px;
  box-shadow: 0 30px 60px -30px rgba(25, 0, 102, .45);
  font-size: 14px;
}
.ticket__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ticket__badge { font-family: var(--mono); font-size: 11px; padding: 5px 9px; border-radius: 8px; background: var(--lilac); color: var(--violet); letter-spacing: .04em; }
.ticket__badge--ok { background: #e6fbf0; color: #0a7a46; }
.ticket__title { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.ticket__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; color: var(--grey); font-size: 13px; }
.ticket__meta b { display: block; color: var(--ink); font-weight: 600; }
.ticket__row { display: flex; gap: 16px; align-items: center; border-top: 1px dashed var(--line); padding-top: 14px; }
.ticket__qr { width: 84px; height: 84px; flex: none; }
.ticket__hash { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: var(--grey); line-height: 1.5; }
.ticket__hash b { color: var(--ink); font-weight: 600; font-family: var(--font); font-size: 12px; display: block; margin-bottom: 2px; }
.ticket__powered { font-size: 11.5px; color: var(--grey); display: flex; align-items: center; gap: 6px; }
.ticket__powered svg { width: 14px; height: 14px; }

/* ── Мок-леджер (таблица поступлений) ────────────────────────── */
.ledger {
  background: var(--white); border-radius: var(--radius);
  padding: 18px 18px 8px; width: min(100%, 520px);
  box-shadow: 0 30px 60px -30px rgba(25, 0, 102, .45);
  font-size: 13px;
}
.ledger__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.ledger__head b { font-weight: 700; font-size: 15px; }
.ledger__total { font-family: var(--mono); font-size: 13px; color: var(--violet); }
.ledger table { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-weight: 500; font-size: 11px; color: var(--grey); letter-spacing: .06em; text-transform: uppercase; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 9px 6px; border-bottom: 1px solid rgba(18,18,18,.06); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.ledger td:first-child { font-family: var(--font); font-weight: 600; }
.ledger tr:last-child td { border-bottom: 0; }
.dot-ok { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #17b26a; margin-right: 6px; }
.dot-wait { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 6px; }

/* ── Мок-код (интеграция) ────────────────────────────────────── */
.code {
  background: var(--navy-deep); color: #e7e3ff; border-radius: var(--radius);
  padding: 20px 22px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  overflow-x: auto; white-space: pre; width: 100%;
}
.code .c { color: rgba(231,227,255,.45); }
.code .k { color: var(--cyan); }
.code .s { color: var(--yellow); }

/* ── Цифры ───────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { border-top: 1px solid var(--ink); padding-top: 16px; display: grid; gap: 6px; }
.stat b { font-size: clamp(34px, 4vw, 52px); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.stat span { font-size: 14px; color: var(--grey); }

/* ── Тарифы ──────────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price {
  background: var(--white); border-radius: var(--radius); padding: 30px 28px 28px;
  display: grid; gap: 16px; align-content: start;
}
.price--navy { background: var(--navy); color: var(--cream); }
.price__name { font-weight: 700; font-size: 18px; }
.price__value { font-size: 40px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.price__value small { font-size: 14px; color: var(--grey); letter-spacing: 0; margin-left: 4px; }
.price--navy .price__value small { color: rgba(248,247,242,.7); }
.price p { font-size: 14px; color: var(--grey); }
.price--navy p { color: rgba(248,247,242,.75); }
.price .btn { justify-self: start; margin-top: 6px; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0; font-size: clamp(17px, 1.6vw, 21px); font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 26px; color: var(--violet); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 22px; color: var(--grey); max-width: 70ch; font-size: 15.5px; }

/* ── CTA-плита с формой ──────────────────────────────────────── */
.cta {
  background: var(--navy); color: var(--cream); border-radius: var(--radius);
  padding: clamp(36px, 5vw, 72px) clamp(24px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start;
  position: relative; overflow: hidden;
}
.cta__text { display: grid; gap: 18px; position: relative; z-index: 1; }
.cta__text .display { max-width: 12ch; }
.cta__contacts { display: grid; gap: 8px; font-size: 14px; color: rgba(248,247,242,.8); }
.cta__contacts a { color: var(--cream); border-bottom: 1px solid rgba(248,247,242,.3); }
.cta__contacts a:hover { border-bottom-color: var(--cyan); }

.form { display: grid; gap: 12px; position: relative; z-index: 1; }
.form label { display: grid; gap: 6px; font-size: 13px; color: rgba(248,247,242,.75); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--cream);
  background: rgba(248,247,242,.06); border: 1px solid var(--line-on-navy);
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none;
  transition: border-color .18s, background .18s;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(248,247,242,.4); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--cyan); background: rgba(248,247,242,.1); }
.form select option { color: var(--ink); }
.form textarea { min-height: 90px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; margin-top: 4px; }
.form__note { font-size: 12px; color: rgba(248,247,242,.55); }
.form__note a { border-bottom: 1px solid rgba(248,247,242,.3); }
.form__status { font-size: 14px; min-height: 20px; }
.form__status.ok { color: var(--cyan); }
.form__status.err { color: var(--orange); }

/* ── Футер ───────────────────────────────────────────────────── */
.site-footer { padding: clamp(48px, 7vw, 96px) 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer__col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 14px; }
.footer__col a { display: block; font-size: 14px; color: var(--grey); padding: 4px 0; }
.footer__col a:hover { color: var(--ink); }
.footer__brand { display: grid; gap: 12px; align-content: start; }
.footer__brand .brand { color: var(--ink); }
.footer__brand p { font-size: 14px; color: var(--grey); max-width: 34ch; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 20px; font-size: 12.5px; color: var(--grey); }
.footer__bottom .status { display: inline-flex; align-items: center; gap: 8px; }
.footer__bottom .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #17b26a; }

/* ── Юридические страницы ────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) 80px; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 400; text-transform: uppercase; margin-bottom: 8px; }
.legal .updated { color: var(--grey); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 22px; font-weight: 600; margin: 32px 0 10px; }
.legal p, .legal li { color: #333; font-size: 15.5px; margin-bottom: 10px; }
.legal ul { padding-left: 20px; list-style: disc; }
.legal a { color: var(--violet); border-bottom: 1px solid rgba(97,25,239,.3); }

/* ── Появление ───────────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav__links { gap: 16px; }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__links, .nav .btn--primary { display: none; }
  .nav__burger { display: block; }
  .hero__card { min-height: 0; padding-bottom: 28px; gap: 28px; }
  .hero__title .l2 { padding-left: 8%; }
  .hero__title .l3 { padding-left: 0; }
  .hero__foot { justify-content: flex-start; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .plate, .feature, .cta { grid-template-columns: 1fr; }
  .feature--flip .feature__text { order: 0; }
  .feature__visual { min-height: 0; }
  .card { min-height: 0; }
  .section__head .display.right { margin-left: 0; text-align: left; }
}
@media (max-width: 560px) {
  .steps, .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .hero__actions { gap: 12px; }
  .btn { padding-inline: 18px; }
}
