/* ==========================================================================
   santasells.fun — лендинг «Система продаж»
   Палитра и радиусы намеренно те же, что в Mini App (webapp/frontend/style.css),
   чтобы лендинг и магазин выглядели одним продуктом.
   ========================================================================== */

:root {
  --bg: #121214;
  --bg-2: #0d0d0f;
  --surface: #1d1d20;
  --surface-2: #2a2a2e;
  --text: #ffffff;
  --hint: #9e9ea8;
  --accent: #47b31d;
  --accent-hi: #56cc26;
  --accent-bg: rgba(71, 179, 29, 0.14);
  --accent-border: rgba(71, 179, 29, 0.35);
  --blue: #306bde;
  --blue-bg: rgba(48, 107, 222, 0.16);
  --divider: rgba(255, 255, 255, 0.1);
  --hairline: rgba(255, 255, 255, 0.06);
  --outline: rgba(255, 255, 255, 0.16);
  --glass-bg: rgba(18, 18, 20, 0.72);
  --nav-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 48px rgba(0, 0, 0, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --pad: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Мягкое зелёное свечение за первым экраном — единственный «декор» страницы. */
body::before {
  content: "";
  position: fixed;
  top: -30vh; left: 50%;
  width: min(1200px, 140vw); height: min(900px, 90vh);
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(71, 179, 29, 0.14) 0%, rgba(71, 179, 29, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; font-weight: 800; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 10px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  position: relative;
  z-index: 1;
}
.wrap--narrow { max-width: 780px; }

/* ---------------------------------------------------------------- шапка -- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}
.header-row {
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  text-decoration: none; flex: none;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff; font-size: 16px; font-weight: 800;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--hint); text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  transition: color 0.18s ease, background-color 0.18s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.header-cta { flex: none; }

/* ---------------------------------------------------------------- кнопки -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius);
  font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 14px 22px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s var(--ease-out), background-color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hi); }
.btn--secondary {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--outline);
}
.btn--secondary:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); }
.btn--sm { padding: 10px 16px; font-size: 14px; border-radius: 12px; }
.btn--lg { padding: 17px 30px; font-size: 16.5px; border-radius: 18px; }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------------------------------------------------------------- секции -- */
section { position: relative; z-index: 1; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  color: var(--accent-hi);
  font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
  padding: 7px 14px; border-radius: 999px;
  margin-bottom: 20px;
}
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title { font-size: clamp(26px, 4.2vw, 40px); }
.section-sub {
  color: var(--hint); font-size: clamp(15px, 1.6vw, 17px);
  margin-top: 14px; line-height: 1.65;
}

/* ------------------------------------------------------------------ hero -- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 60px);
  line-height: 1.05;
}
.hero h1 .accent { color: var(--accent); }
.hero-lead {
  color: var(--hint);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.6;
  margin-top: 22px;
  max-width: 56ch;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 32px;
}
.hero-note { color: var(--hint); font-size: 13.5px; margin-top: 16px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}
.stat {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat b { display: block; font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; letter-spacing: -0.02em; }
.stat span { display: block; color: var(--hint); font-size: 13px; line-height: 1.4; margin-top: 4px; }

/* карточка цены в hero */
.price-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-strong);
  position: sticky; top: 88px;
}
.price-card h3 { font-size: 19px; }
.price-card .pc-desc { color: var(--hint); font-size: 14px; margin-top: 8px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 4px; flex-wrap: wrap; }
.price-now { font-size: clamp(34px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.price-old { color: var(--hint); font-size: 18px; text-decoration: line-through; }
.price-badge {
  background: var(--accent-bg); color: var(--accent-hi);
  border: 1px solid var(--accent-border);
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.price-hint { color: var(--hint); font-size: 13px; margin-bottom: 20px; }
.pc-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.pc-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14.5px; color: var(--text);
}
.pc-list li::before {
  content: ""; flex: none;
  width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356cc26' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.pc-secure {
  display: flex; align-items: center; gap: 8px;
  color: var(--hint); font-size: 12.5px; margin-top: 18px; justify-content: center;
}

/* --------------------------------------------------------------- карточки -- */
.grid { display: grid; gap: clamp(14px, 1.6vw, 20px); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 28px);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.card:hover { border-color: var(--divider); transform: translateY(-2px); }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--hint); font-size: 14.5px; line-height: 1.6; }
.card-ico {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  display: grid; place-items: center;
  margin-bottom: 16px; color: var(--accent-hi);
}
.card-ico svg { width: 22px; height: 22px; }
.card-ico--blue { background: var(--blue-bg); border-color: rgba(48, 107, 222, 0.32); color: #6f9bff; }

.card-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.card-list li {
  color: var(--hint); font-size: 14px; line-height: 1.5;
  padding-left: 18px; position: relative;
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* --------------------------------------------------------- «что внутри» -- */
.pack-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px 20px;
}
.pack-num {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  background: var(--surface-2); color: var(--hint);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}
.pack-item h4 { font-size: 16px; margin-bottom: 6px; }
.pack-item p { color: var(--hint); font-size: 14px; }

/* ------------------------------------------------------------------ шаги -- */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 20px clamp(18px, 2vw, 24px);
}
.step-n {
  counter-increment: step; flex: none;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.step-n::before { content: counter(step); }
.step h4 { font-size: 16.5px; margin-bottom: 6px; }
.step p { color: var(--hint); font-size: 14.5px; }

/* ----------------------------------------------------------------- автор -- */
.author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: center;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px);
}
.author-avatar {
  width: clamp(84px, 12vw, 120px); height: clamp(84px, 12vw, 120px);
  border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--accent) 0%, #1f7a0a 100%);
  display: grid; place-items: center;
  font-size: clamp(32px, 5vw, 44px); font-weight: 800; color: #fff;
}
.author h3 { font-size: clamp(20px, 2.6vw, 26px); }
.author .role { color: var(--accent-hi); font-size: 14px; font-weight: 700; margin-top: 6px; }
.author p.bio { color: var(--hint); font-size: 15px; margin-top: 14px; line-height: 1.65; }

/* ------------------------------------------------------------------- FAQ -- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px clamp(18px, 2vw, 24px);
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--hint); border-bottom: 2px solid var(--hint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.22s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq .faq-body {
  padding: 0 clamp(18px, 2vw, 24px) 20px;
  color: var(--hint); font-size: 14.5px; line-height: 1.65;
}

/* ------------------------------------------------------------------- CTA -- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: clamp(20px, 3vw, 28px);
  padding: clamp(28px, 4vw, 52px);
  text-align: center;
  background-image: radial-gradient(60% 120% at 50% 0%, rgba(71, 179, 29, 0.16) 0%, rgba(71, 179, 29, 0) 70%);
}
.cta-band h2 { font-size: clamp(24px, 3.6vw, 36px); }
.cta-band p { color: var(--hint); margin-top: 14px; font-size: clamp(15px, 1.6vw, 17px); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* -------------------------------------------------------------- контакты -- */
.contact-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px 20px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.contact-row:hover { border-color: var(--divider); }
.contact-row .contact-ico {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--surface-2); display: grid; place-items: center; color: var(--accent-hi);
}
.contact-row .contact-ico svg { width: 20px; height: 20px; }
.contact-text b { display: block; font-size: 15px; }
.contact-text span { display: block; color: var(--hint); font-size: 13.5px; margin-top: 2px; word-break: break-word; }

/* --------------------------------------------------------- способы оплаты -- */
.pay-strip {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.pay-badge {
  height: 40px; min-width: 62px;
  padding: 0 12px;
  background: #ffffff;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
/* Логотипы приходят настоящими файлами с разными пропорциями, поэтому высота
   задаётся каждому отдельно через --h — иначе широкий вордмарк «МИР» и почти
   квадратный Mastercard при одной height выглядят разного оптического размера. */
.pay-badge img {
  height: var(--h, 20px);
  width: auto;
  max-width: 96px;
  display: block;
}

/* ------------------------------------------------------------------ футер -- */
.site-footer {
  border-top: 1px solid var(--nav-border);
  background: var(--bg-2);
  padding: clamp(40px, 5vw, 64px) 0 32px;
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.footer-col h4 {
  font-size: 13px; font-weight: 700; color: var(--hint);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a {
  color: var(--hint); text-decoration: none; font-size: 14.5px;
  transition: color 0.18s ease;
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-about { color: var(--hint); font-size: 14px; line-height: 1.65; margin-top: 14px; max-width: 46ch; }
.footer-pay-title { color: var(--hint); font-size: 13px; margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(28px, 4vw, 44px); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  color: var(--hint); font-size: 13px; line-height: 1.6;
}
.requisites { color: var(--hint); font-size: 13px; line-height: 1.7; margin-top: 16px; }
.requisites b { color: var(--text); font-weight: 600; }

/* ----------------------------------------------------- правовые документы -- */
.doc { padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 6vw, 80px); }
.doc h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px; }
.doc .doc-date { color: var(--hint); font-size: 14px; margin-bottom: 32px; }
.doc h2 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 36px 0 12px;
}
.doc h3 { font-size: 16.5px; margin: 24px 0 8px; }
.doc p, .doc li { color: #d4d4d9; font-size: 15px; line-height: 1.75; }
.doc p { margin-bottom: 12px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--accent-hi); }
.doc .callout {
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  border-radius: var(--radius); padding: 18px 20px; margin: 20px 0;
}
.doc .callout p { color: var(--text); margin: 0; font-size: 15px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--hint); text-decoration: none; font-size: 14.5px; font-weight: 600;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--text); }

/* ------------------------------------------------------------------ чекаут -- */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.panel {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 30px);
}
.panel h2 { font-size: 20px; margin-bottom: 6px; }
.panel .panel-sub { color: var(--hint); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input {
  width: 100%; padding: 14px 16px;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--outline); border-radius: 14px;
  font-family: inherit; font-size: 15px;
  transition: border-color 0.18s ease;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field .field-hint { color: var(--hint); font-size: 12.5px; margin-top: 8px; }

.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.method {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--outline); border-radius: 14px;
  padding: 14px 16px; cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.method:hover { border-color: rgba(255, 255, 255, 0.3); }
.method input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.method span { font-size: 14.5px; font-weight: 600; }
.method:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }

.agree { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0; }
.agree input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin-top: 2px; }
.agree label { font-size: 13.5px; color: var(--hint); line-height: 1.6; }
.agree a { color: var(--accent-hi); }

.summary-line {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 14.5px; color: var(--hint); padding: 10px 0;
}
.summary-line b { color: var(--text); font-weight: 600; }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--divider); margin-top: 8px; padding-top: 18px;
}
.summary-total span { font-size: 15px; color: var(--hint); }
.summary-total b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }

.notice {
  display: none;
  background: var(--blue-bg); border: 1px solid rgba(48, 107, 222, 0.35);
  border-radius: var(--radius); padding: 18px 20px; margin-top: 20px;
}
.notice.show { display: block; animation: noticeIn 0.3s var(--ease-out); }
.notice b { display: block; font-size: 15px; margin-bottom: 6px; }
.notice p { color: var(--hint); font-size: 14px; line-height: 1.6; }
.notice a { color: #6f9bff; font-weight: 600; }
@keyframes noticeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

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

/* планшеты */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .price-card { position: static; }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* узкие планшеты / крупные телефоны: прячем навигацию, оставляем CTA */
@media (max-width: 780px) {
  html { scroll-padding-top: 72px; }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .author { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .author p.bio { text-align: left; }
}

/* телефоны */
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .header-row { height: 58px; }
  .hero-stats { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; }
  .pack-item { flex-direction: column; gap: 12px; }
  .step { gap: 14px; padding: 18px; }
}

/* очень узкие экраны (320px, старые iPhone SE / Android) */
@media (max-width: 380px) {
  :root { --pad: 14px; --radius-lg: 18px; }
  .logo span { display: none; }
  .btn { padding: 13px 18px; font-size: 14.5px; }
  .price-now { font-size: 32px; }
}

/* большие мониторы 2K/4K — контейнер шире, шрифт крупнее */
@media (min-width: 1600px) {
  :root { --maxw: 1280px; }
  body { font-size: 17px; }
}
@media (min-width: 2200px) {
  :root { --maxw: 1440px; }
}

/* альбомная ориентация на телефоне — не даём hero занять 3 экрана */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 32px 0; }
  .section { padding: 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* печать (модератору может понадобиться PDF документа) */
@media print {
  body { background: #fff; color: #000; }
  body::before, .site-header, .site-footer, .btn { display: none !important; }
  .doc p, .doc li { color: #000; }
}

/* ------------------------------------------------------ мобильное меню -- */
.nav-toggle {
  display: none;
  width: 42px; height: 42px; flex: none;
  border: 1.5px solid var(--outline); border-radius: 12px;
  background: transparent; color: var(--text);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .header-cta { order: 2; margin-left: auto; }
  /* выпадающая панель вместо горизонтального меню */
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: 10px var(--pad) 16px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav.open { display: flex; animation: navIn 0.22s var(--ease-out); }
  .nav a { padding: 13px 12px; font-size: 15.5px; border-radius: 12px; }
}
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 380px) {
  /* на самых узких экранах кнопка покупки в шапке ужимается до короткой надписи */
  .header-cta { font-size: 13.5px; padding: 10px 12px; }
}

/* ------------------------------------------------ инлайн-ошибки формы -- */
.field-error {
  display: none;
  color: var(--danger); font-size: 13px; margin-top: 8px; line-height: 1.45;
}
.field.has-error input { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.field.has-error .field-hint { display: none; }
.agree.has-error label { color: var(--danger); }
