/* SalesWhisper — дизайн-система.
   Светлая деловая тема под B2B-покупателя: РОП и собственник, которые
   сравнивают нас с Calltouch в соседней вкладке. Никаких внешних CDN,
   никаких декоративных эффектов поверх контента. */

:root {
  /* Поверхности. Палитра снята с сайта Apple: почти белый фон,
     графитовый текст вместо чёрного, тёплый серый для подложек. */
  --sw-bg: #ffffff;
  --sw-bg-soft: #fbfbfd;
  --sw-bg-sunken: #f5f5f7;
  --sw-surface: #ffffff;
  --sw-ink: #1d1d1f;
  --sw-ink-muted: #6e6e73;
  --sw-ink-subtle: #86868b;

  /* Акценты */
  --sw-accent: #0071e3;
  --sw-accent-hover: #0077ed;
  --sw-accent-soft: #eaf3fd;
  --sw-positive: #008009;
  --sw-positive-soft: #e8f5e9;
  --sw-warning: #9a6600;
  --sw-warning-soft: #fdf5e6;
  --sw-danger: #bf4800;
  --sw-danger-soft: #fdeeea;

  /* Границы и тени: у Apple тени почти не видно, работает граница */
  --sw-line: #d2d2d7;
  --sw-line-strong: #c7c7cc;
  --sw-shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --sw-shadow: 0 4px 20px rgba(0, 0, 0, .06);
  --sw-shadow-lg: 0 12px 40px rgba(0, 0, 0, .10);

  /* Типографика */
  --sw-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
             'Helvetica Neue', 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  --sw-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* Ритм: шаг 4px, крупные интервалы кратны 8 */
  --sw-gap-xs: 8px;
  --sw-gap-sm: 12px;
  --sw-gap: 16px;
  --sw-gap-md: 24px;
  --sw-gap-lg: 40px;
  --sw-gap-xl: 64px;
  --sw-gap-2xl: 96px;

  --sw-radius-sm: 8px;
  --sw-radius: 12px;
  --sw-radius-lg: 18px;
  --sw-radius-pill: 980px;

  --sw-container: 1160px;
  --sw-container-narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sw-bg);
  color: var(--sw-ink);
  font-family: var(--sw-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* --- Типографика --- */

h1, h2, h3, h4 {
  margin: 0 0 var(--sw-gap) 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--sw-ink);
  text-wrap: balance;
}

h1 { font-size: clamp(36px, 5.2vw, 60px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.8vw, 44px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.01em; }
h4 { font-size: 18px; letter-spacing: -0.01em; }

p { margin: 0 0 var(--sw-gap) 0; }
p:last-child { margin-bottom: 0; }

a { color: var(--sw-accent); text-decoration: none; }
a:hover { color: var(--sw-accent-hover); text-decoration: underline; }

.sw-lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--sw-ink-muted);
  max-width: 62ch;
}

.sw-muted { color: var(--sw-ink-muted); }
.sw-subtle { color: var(--sw-ink-subtle); font-size: 15px; }
.sw-mono { font-family: var(--sw-font-mono); font-variant-numeric: tabular-nums; }

.sw-eyebrow {
  display: inline-block;
  margin-bottom: var(--sw-gap-xs);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sw-accent);
}

/* --- Раскладка --- */

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

.sw-container--narrow { max-width: var(--sw-container-narrow); }

.sw-section { padding: var(--sw-gap-2xl) 0; }
.sw-section--tight { padding: var(--sw-gap-xl) 0; }
.sw-section--soft { background: var(--sw-bg-soft); }
.sw-section--sunken { background: var(--sw-bg-sunken); }

.sw-section-head {
  max-width: 68ch;
  margin-bottom: var(--sw-gap-lg);
}

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

@media (max-width: 900px) {
  .sw-grid--3, .sw-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .sw-grid--2, .sw-grid--3, .sw-grid--4 { grid-template-columns: 1fr; }
  .sw-section { padding: var(--sw-gap-xl) 0; }
}

.sw-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sw-gap-xl);
  align-items: center;
}
@media (max-width: 900px) {
  .sw-split { grid-template-columns: 1fr; gap: var(--sw-gap-lg); }
}

.sw-stack { display: flex; flex-direction: column; gap: var(--sw-gap); }
.sw-row { display: flex; flex-wrap: wrap; gap: var(--sw-gap-sm); align-items: center; }

/* --- Кнопки --- */

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sw-gap-xs);
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--sw-radius-pill);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.sw-btn:hover { text-decoration: none; }
.sw-btn:active { opacity: .85; }

.sw-btn:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .5);
  outline-offset: 2px;
}

.sw-btn--primary {
  background: var(--sw-accent);
  color: #fff;
}
.sw-btn--primary:hover { background: var(--sw-accent-hover); color: #fff; }

.sw-btn--secondary {
  background: transparent;
  color: var(--sw-accent);
  border-color: var(--sw-accent);
}
.sw-btn--secondary:hover { background: var(--sw-accent); color: #fff; }

.sw-btn--ghost {
  background: transparent;
  color: var(--sw-accent);
  padding-left: 4px;
  padding-right: 4px;
}
.sw-btn--ghost:hover { color: var(--sw-accent-hover); text-decoration: underline; }

.sw-btn--lg { padding: 15px 30px; font-size: 17px; }
.sw-btn--block { width: 100%; }

/* --- Карточки --- */

/* У Apple карточка — это плитка на тёплом сером фоне, без обводки и тени.
   Границу оставляем только там, где плитка лежит на такой же серой подложке. */
.sw-card {
  background: var(--sw-bg-sunken);
  border: 1px solid transparent;
  border-radius: var(--sw-radius-lg);
  padding: var(--sw-gap-md);
}

.sw-card--flat { background: transparent; border-color: var(--sw-line); }
.sw-card--raised { background: var(--sw-surface); border-color: var(--sw-line); box-shadow: var(--sw-shadow); }
.sw-card--accent { background: var(--sw-surface); border-color: var(--sw-accent); }

.sw-section--soft .sw-card,
.sw-section--sunken .sw-card { background: var(--sw-surface); }

.sw-card h3 { margin-bottom: var(--sw-gap-xs); }
.sw-card p:last-child { margin-bottom: 0; }

/* --- Бейджи и плашки --- */

.sw-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--sw-radius-pill);
  background: var(--sw-bg-sunken);
  color: var(--sw-ink-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sw-badge--accent { background: var(--sw-accent-soft); color: var(--sw-accent); }
.sw-badge--positive { background: var(--sw-positive-soft); color: var(--sw-positive); }
.sw-badge--warning { background: var(--sw-warning-soft); color: var(--sw-warning); }
.sw-badge--danger { background: var(--sw-danger-soft); color: var(--sw-danger); }

/* --- Числовые показатели --- */

.sw-stat { display: flex; flex-direction: column; gap: 4px; }

.sw-stat__value {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.sw-stat__label { font-size: 15px; color: var(--sw-ink-muted); }

/* --- Списки --- */

.sw-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sw-gap-sm); }

.sw-list li {
  position: relative;
  padding-left: 30px;
  color: var(--sw-ink-muted);
}

.sw-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sw-accent);
}

.sw-list--check li::before {
  left: 2px;
  top: .3em;
  width: 14px;
  height: 8px;
  border: 2px solid var(--sw-positive);
  border-top: 0;
  border-right: 0;
  border-radius: 0;
  background: none;
  transform: rotate(-45deg);
}

/* --- Формы --- */

.sw-field { display: flex; flex-direction: column; gap: 6px; }

.sw-label { font-size: 15px; font-weight: 600; color: var(--sw-ink); }

.sw-input,
.sw-select,
.sw-textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--sw-line-strong);
  border-radius: var(--sw-radius-sm);
  background: var(--sw-surface);
  color: var(--sw-ink);
  font: inherit;
  font-size: 16px; /* меньше 16px вызывает зум на iOS */
  transition: border-color .16s ease, box-shadow .16s ease;
}

.sw-input:focus,
.sw-select:focus,
.sw-textarea:focus {
  outline: none;
  border-color: var(--sw-accent);
  box-shadow: 0 0 0 3px var(--sw-accent-soft);
}

.sw-input::placeholder { color: var(--sw-ink-subtle); }

.sw-textarea { min-height: 110px; resize: vertical; }

.sw-checkbox {
  display: flex;
  gap: var(--sw-gap-xs);
  align-items: flex-start;
  font-size: 14px;
  color: var(--sw-ink-muted);
  cursor: pointer;
}

.sw-checkbox input { margin-top: 3px; flex-shrink: 0; }

.sw-field-error { font-size: 14px; color: var(--sw-danger); }

/* --- Шапка --- */

.sw-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sw-line);
}

.sw-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-gap-md);
  min-height: 68px;
}

.sw-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--sw-ink);
  flex-shrink: 0;
}
.sw-header__brand:hover { text-decoration: none; color: var(--sw-ink); }
.sw-header__brand img { height: 26px; width: auto; }

.sw-nav { display: flex; gap: var(--sw-gap-md); align-items: center; flex-wrap: nowrap; }

.sw-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--sw-ink);
  white-space: nowrap;
  opacity: .8;
}
.sw-nav a:hover { opacity: 1; text-decoration: none; }
.sw-nav a[aria-current="page"] { opacity: 1; font-weight: 500; }

.sw-header__actions { display: flex; align-items: center; gap: var(--sw-gap); }

/* В шапке кнопка должна весить не больше пункта меню: у Apple верхняя панель
   состоит из одинаково лёгких элементов, крупная заливка её ломает. */
.sw-header__actions .sw-btn {
  padding: 7px 16px;
  font-size: 14px;
}

.sw-header__phone {
  font-size: 14px;
  font-weight: 500;
  color: var(--sw-ink);
  white-space: nowrap;
}
.sw-header__phone:hover { color: var(--sw-accent); text-decoration: none; }

.sw-burger {
  display: none;
  padding: 10px;
  background: none;
  border: 1px solid var(--sw-line-strong);
  border-radius: var(--sw-radius-sm);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .sw-nav { display: none; }
  .sw-burger { display: inline-flex; }
}

/* На узких экранах в шапке остаётся только телефон: кнопка заявки там
   налезала на логотип, а сам призыв повторяется в первом экране. */
@media (max-width: 700px) {
  .sw-header__actions .sw-btn { display: none; }
  .sw-header__phone { font-size: 15px; }
  .sw-header__brand { font-size: 17px; }
}

.sw-nav--open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sw-gap);
  padding: var(--sw-gap-md);
  background: var(--sw-surface);
  border-bottom: 1px solid var(--sw-line);
  box-shadow: var(--sw-shadow);
}

/* --- Первый экран --- */

.sw-hero { padding: var(--sw-gap-xl) 0 var(--sw-gap-2xl); }

.sw-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-gap-sm);
  margin-top: var(--sw-gap-md);
}

/* --- Таблица сравнения --- */

.sw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  min-width: 560px;
}

.sw-table th,
.sw-table td {
  padding: 14px var(--sw-gap);
  text-align: left;
  border-bottom: 1px solid var(--sw-line);
  vertical-align: top;
}

.sw-table th {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sw-ink-subtle);
  border-bottom-color: var(--sw-line-strong);
}

.sw-table tbody tr:hover { background: var(--sw-bg-soft); }
.sw-table td:first-child { font-weight: 600; color: var(--sw-ink); }

/* --- Тарифы --- */

.sw-plan { display: flex; flex-direction: column; height: 100%; }

.sw-plan__price {
  margin: var(--sw-gap-sm) 0 var(--sw-gap);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.sw-plan__price span { font-size: 16px; font-weight: 500; color: var(--sw-ink-muted); }
.sw-plan .sw-list { flex: 1; margin-bottom: var(--sw-gap-md); }

/* --- Подвал --- */

.sw-footer {
  padding: var(--sw-gap-xl) 0 var(--sw-gap-md);
  background: var(--sw-bg-sunken);
  border-top: 1px solid var(--sw-line);
  font-size: 15px;
  color: var(--sw-ink-muted);
}

.sw-footer h4 { font-size: 15px; margin-bottom: var(--sw-gap-sm); color: var(--sw-ink); }
.sw-footer a { color: var(--sw-ink-muted); }
.sw-footer a:hover { color: var(--sw-accent); }

.sw-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--sw-gap-lg);
  margin-bottom: var(--sw-gap-lg);
}

@media (max-width: 900px) {
  .sw-footer__cols { grid-template-columns: repeat(2, 1fr); gap: var(--sw-gap-md); }
}
@media (max-width: 520px) {
  .sw-footer__cols { grid-template-columns: 1fr; }
}

.sw-footer__legal {
  padding-top: var(--sw-gap);
  border-top: 1px solid var(--sw-line-strong);
  font-size: 13px;
  color: var(--sw-ink-subtle);
}

/* --- Служебное --- */

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

.sw-divider { height: 1px; background: var(--sw-line); border: 0; margin: var(--sw-gap-lg) 0; }

img, video, svg { max-width: 100%; height: auto; }

/* --- Страницы входа и регистрации ---
   Разметка этих страниц осталась от прежней темы: классы auth-* и h-forge
   переопределяем здесь, чтобы не переписывать формы целиком. */

.auth-card {
  max-width: 420px;
  margin: var(--sw-gap-2xl) auto;
  padding: var(--sw-gap-lg);
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius-lg);
  box-shadow: var(--sw-shadow);
}

.auth-card h1,
.auth-card .h-forge { font-size: 30px; margin-bottom: var(--sw-gap-md); }

.auth-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sw-ink);
  text-transform: none;
  letter-spacing: normal;
}

.auth-input {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: var(--sw-gap);
  border: 1px solid var(--sw-line-strong);
  border-radius: var(--sw-radius-sm);
  background: var(--sw-surface);
  color: var(--sw-ink);
  font: inherit;
  font-size: 16px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--sw-accent);
  box-shadow: 0 0 0 3px var(--sw-accent-soft);
}

.auth-card .btn,
.auth-card .btn-primary-forge,
.auth-card button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 24px;
  border: 0;
  border-radius: var(--sw-radius-pill);
  background: var(--sw-accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.auth-card .btn:hover,
.auth-card button[type="submit"]:hover { background: var(--sw-accent-hover); }

.auth-error,
.auth-success {
  padding: 12px 14px;
  margin-bottom: var(--sw-gap);
  border-radius: var(--sw-radius-sm);
  font-size: 15px;
}
.auth-error { background: var(--sw-danger-soft); color: var(--sw-danger); }
.auth-success { background: var(--sw-positive-soft); color: var(--sw-positive); }
.auth-error:empty, .auth-success:empty { display: none; }

.mono-tag { font-size: 15px; color: var(--sw-ink-muted); }

/* Зерно и развёртка остались от тёмной темы — на светлой они только мешают. */
.noise, .scanlines { display: none; }

/* Кнопки прежней темы встречаются на страницах, которые не переверстывались
   заново (сравнения, кабинет). Приводим их к виду основной кнопки. */
.btn-primary-forge,
.btn-forge,
.btn-stealth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--sw-radius-pill);
  background: var(--sw-accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary-forge:hover,
.btn-forge:hover,
.btn-stealth:hover { background: var(--sw-accent-hover); color: #fff; text-decoration: none; }

.btn-stealth {
  background: transparent;
  color: var(--sw-accent);
  border-color: var(--sw-accent);
}
.btn-stealth:hover { background: var(--sw-accent); color: #fff; }

/* Разреженный трекинг и капслок прежней темы на светлом фоне читаются плохо. */
.mono-tag, .h-forge { letter-spacing: normal; }
