/* =============================================
   Публичные страницы OptiRent: главная, посадочные, инструкции.
   Палитра и ритм — из лендинга. Админка этот файл не подключает.
   ============================================= */

/* Inter лежит у нас (static/fonts). optional + preload в <head>: текст не перескакивает
   при подмене шрифта, сдвига вёрстки нет. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: url(/fonts/inter-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #111;
  --ink-soft: #555;
  --muted: #6b6b6b;
  --bg: #fff;
  --bg-alt: #f8f9fa;
  --border: #e8e8e8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff4ff;
  --green: #15803d;
  --green-bg: rgba(22,163,74,0.08);
  --orange: #c2410c;
  --orange-bg: rgba(234,88,12,0.08);
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Ссылка внутри текста отличается не только цветом */
p a, .list a, .step-text a { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Шапка ── */
.nav {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 18px;
  list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-login { color: var(--accent); font-weight: 600; }

/* ── Кнопка ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-lg { min-height: 50px; padding: 14px 32px; font-size: 15px; }

/* ── Первый экран ── */
.hero { padding: 72px 0 56px; }
.hero h1 {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 28px;
}
.hero-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ── Раздел ── */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.section h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  text-wrap: balance;
}
.section h3 { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 28px 0 8px; }
.section-text {
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 600px;
}
.section-text + .section-text { margin-top: 12px; }
.section-text--gap { margin-top: 16px; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-weight: 600; font-size: 14px; }

.list { margin: 12px 0 0 20px; color: var(--ink-soft); max-width: 580px; }
.list li { margin: 6px 0; line-height: 1.6; }
.list li strong { color: var(--ink); }

/* ── Карточки возможностей ── */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.f-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.f-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
}
.f-card p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ── Макет шахматки ── */
.chess-demo {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 11px;
}
.chess-header {
  background: var(--bg-alt);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chess-month { color: var(--ink); text-transform: none; font-size: 13px; letter-spacing: normal; }
/* Сетка шире телефона: прокручивается она сама, страница остаётся на месте */
.chess-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.chess-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.chess-grid {
  display: grid;
  grid-template-columns: 120px repeat(14, minmax(36px, 1fr));
  min-width: 624px;
  font-variant-numeric: tabular-nums;
}
.chess-cell {
  padding: 7px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 10px;
  color: var(--muted);
  min-width: 0;
}
.chess-row-label {
  position: sticky;
  left: 0;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chess-corner { position: sticky; left: 0; background: var(--bg-alt); }
.chess-day-header {
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-alt);
  font-size: 10px;
}
.chess-weekend { color: var(--orange); }
.chess-b { color: #fff; font-weight: 600; font-size: 9px; letter-spacing: 0.02em; }
.chess-b--avito { background: #0a7a52; }
.chess-b--sutochno { background: #7c3aed; }
.chess-b--cian { background: #1d4ed8; }
.chess-b--direct { background: #b45309; }
.chess-b--manual { background: var(--ink); }
.chess-legend {
  padding: 10px 14px;
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.chess-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.dot--avito { background: #0a7a52; }
.dot--sutochno { background: #7c3aed; }
.dot--cian { background: #1d4ed8; }
.dot--direct { background: #b45309; }
.dot--manual { background: #111; }

/* ── Карточка рекомендаций ── */
.ai-demo {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ai-demo-header {
  background: var(--bg-alt);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.ai-rec { padding: 16px; }
.ai-rec-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.ai-rec-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.ai-rec-date { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; min-width: 80px; padding-top: 1px; }
.ai-rec-body { flex: 1; min-width: 0; }
.ai-rec-prices { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.ai-rec-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.ai-rec-arrow { font-size: 11px; color: var(--muted); }
.ai-rec-new { font-size: 14px; font-weight: 700; color: var(--green); }
.ai-rec-new.down { color: var(--orange); }
.ai-rec-reason { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ai-rec-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.ai-rec-tag.up { background: var(--green-bg); color: var(--green); }
.ai-rec-tag.down { background: var(--orange-bg); color: var(--orange); }
.demo-note { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ── Схема синхронизации ── */
.sync-diagram {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.sync-row { display: flex; align-items: center; justify-content: center; gap: 8px 12px; flex-wrap: wrap; list-style: none; }
.sync-platform {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
}
.sync-hub {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent);
}
.sync-arrows { display: flex; align-items: center; justify-content: center; padding: 12px 0; }
.sync-arrows svg { max-width: 100%; }
.sync-label { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ── Скриншоты ── */
.shot {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.shot img { width: 100%; }
.shot figcaption { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--bg); }
.shot-placeholder {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 16px; text-align: center; font-size: 13px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); margin-top: 16px; background: var(--bg-alt);
}

/* ── Шаги ── */
.steps { margin-top: 32px; display: flex; flex-direction: column; list-style: none; }
.step { display: flex; gap: 16px; padding: 16px 0; }
.step:not(:last-child) { border-bottom: 1px solid var(--border); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); flex-shrink: 0;
}
.step-body { padding-top: 3px; min-width: 0; }
.step-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.step-text { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

/* ── Доп. возможности ── */
.extras { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.extra-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.extra-card h3 { font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.extra-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }

/* ── Планы ── */
.roadmap { margin-top: 20px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.roadmap li { font-size: 14px; color: var(--ink-soft); padding-left: 20px; position: relative; line-height: 1.5; }
.roadmap li::before {
  content: ''; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px;
  border-radius: 50%; border: 1.5px solid var(--muted); background: var(--bg);
}

/* ── Вопросы и ответы ── */
.faq { margin-top: 20px; }
.faq-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.faq-item p { font-size: 14px; color: var(--ink-soft); line-height: 1.65; max-width: 620px; }

/* ── Хлебные крошки ── */
.crumbs { padding: 16px 0 0; font-size: 13px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 6px; }
.crumbs li { display: inline-flex; align-items: center; min-height: 32px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* ── Ссылки на разделы ── */
.cards { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; list-style: none; }
.card-link {
  display: block; height: 100%; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--ink);
}
.card-link:hover { border-color: var(--accent); text-decoration: none; }
.card-link strong { display: block; font-size: 14px; margin-bottom: 2px; }
.card-link span { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.note {
  margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--accent);
  background: var(--accent-light); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px; color: var(--ink); max-width: 620px;
}
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
code { background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; }
pre { margin-top: 12px; padding: 14px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }

/* ── Призыв ── */
.cta-block { padding: 56px 0; border-top: 1px solid var(--border); text-align: center; }
.cta-block h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.015em; }
.cta-block p { color: var(--ink-soft); margin-bottom: 24px; font-size: 15px; }

/* ── Подвал ── */
.footer { padding: 28px 0 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; }
.footer-brand { font-weight: 600; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--ink); }
.footer-operator { flex-basis: 100%; margin: 0; }
.footer-operator a { color: var(--muted); }

/* ── Узкий экран ── */
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 36px; }
  .section, .cta-block { padding: 40px 0; }
  .features, .extras, .cards { grid-template-columns: 1fr; }
  .nav-links { gap: 0 14px; }
  .sync-diagram { padding: 16px 12px; }
  .hero .btn-lg, .cta-block .btn-lg { width: 100%; }
  .ai-rec-row { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
