/* ============ Токены (design-tokens.css из комплекта для верстки) ============ */
:root {
  --color-background: #f7f6f2;
  --color-surface: #ffffff;
  --color-text: #202326;
  --color-text-secondary: #666b6d;
  --color-accent: #ff6b36;
  --color-border: #dedfda;
  --color-driver-background: #202326;
  --color-driver-text: #ffffff;
  --color-driver-text-secondary: #c5c8c6;
  --color-driver-market: #353b3f;
  --color-toggle: #e8e8e1;            /* неактивная кнопка переключателя, из макета */
  --font-family: Arial, sans-serif;
  --radius-card: 12px;
  --radius-button: 8px;
  --radius-photo: 16px;
  --container-width: 1200px;

  --gutter: clamp(20px, 4vw, 48px);
  --section-space: clamp(64px, 8vw, 112px);
}

/* ============ Основа ============ */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

@media (min-width: 761px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4, h5, p, ol, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; }
h1, h2, h3, .footer-title { text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 16px; }

:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

/* ============ Типографика ============ */
.display {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
}

.eyebrow-accent { color: var(--color-accent); }

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* ============ Шапка ============ */
.site-header { padding-top: 20px; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(18px, 2.4vw, 28px);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============ 1. Первый экран ============ */
.hero { padding-top: 32px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* Фото начинается на уровне навигации, как в макете */
.hero-media { margin-top: -64px; }

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-photo);
}

.hero .display { margin-top: 24px; }
.hero .lead { margin-top: 20px; max-width: 34em; }

.steps-title {
  margin-top: clamp(28px, 3vw, 36px);
  font-size: clamp(21px, 2vw, 24px);
  line-height: 1.3;
}

.steps {
  list-style: none;
  margin-top: 16px;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 10px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr);
  align-items: baseline;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.94em;
}

.note {
  margin-top: 24px;
  max-width: 36em;
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* ============ Общие секции ============ */
.section { padding-top: var(--section-space); }

/* ============ 2. О сервисе ============ */
.about-lead { margin-top: 24px; max-width: 46em; }

.cards {
  list-style: none;
  margin-top: clamp(32px, 4vw, 44px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: clamp(24px, 2.6vw, 32px);
}

.card-num {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent);
}

.card h3 {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
}

.card p {
  margin-top: 14px;
  color: var(--color-text-secondary);
}

/* ============ 3. Водителям ============ */
.drivers {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius-card);
  background: var(--color-driver-background);
  color: var(--color-driver-text);
}

.drivers .h2 { margin-top: 20px; }

.drivers .lead {
  margin-top: 24px;
  max-width: 30em;
  color: var(--color-driver-text-secondary);
}

.drivers .markets { margin-top: 32px; }

.drivers-points {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 28px;
  align-content: center;
}

.drivers-points h3 {
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.3;
}

.drivers-points p {
  margin-top: 8px;
  color: var(--color-driver-text-secondary);
}

.drivers :focus-visible { outline-color: var(--color-driver-text); }

/* ============ Кнопки маркетов ============ */
.markets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.market {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 10em;
  padding: 10px 22px;
  border-radius: var(--radius-button);
  background: var(--color-text);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

a.market:hover { background: #000; }

.markets-on-dark .market { background: var(--color-driver-market); }
.markets-on-dark a.market:hover { background: #4a5257; }

/* Ссылка ещё не подключена */
.market.is-unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ 4. Приложение ============ */
.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.app-text .lead { margin-top: 24px; max-width: 30em; }

.audience {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 48px);
}

.audience-btn {
  min-height: 48px;
  min-width: 11.5em;
  padding: 10px 22px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--color-toggle);
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.audience-btn[aria-pressed="false"]:hover { background: #dcdcd3; }

.audience-btn[aria-pressed="true"] {
  background: var(--color-text);
  color: #fff;
}

#app-markets { margin-top: 20px; }

.app-media { justify-self: center; }
.app-media img { width: clamp(200px, 22vw, 280px); }

/* ============ 5. Подвал ============ */
.site-footer { padding: var(--section-space) 0 clamp(40px, 5vw, 64px); }

.footer-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px 32px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--color-border);
}

.footer-tagline {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.4;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}

.footer-links a,
.footer-links span.is-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-text-secondary);
  font-size: 17px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links .is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============ Страница оферты ============ */
.legal { padding-top: clamp(32px, 5vw, 64px); }

.page-content {
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.page-content .page-section { max-width: 880px; }

.page-content h3 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.page-content center {
  display: block;
  margin-top: 32px;
  text-align: left;
  color: var(--color-text-secondary);
}

.page-content h5 {
  margin: 16px 0 12px;
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.3;
}

.page-content p { margin: 0 0 1em; }

.page-content ol li { margin: 0.45em 0; }
.page-content ol li::before { padding-right: 0.6em; white-space: nowrap; }

.page-content div > ol > li { margin-top: 1.6em; font-weight: 700; }
.page-content div > ol > li > * { font-weight: 400; }

/* ============ Адаптив ============ */
@media (max-width: 760px) {
  .cards,
  .drivers,
  .footer-bottom { grid-template-columns: minmax(0, 1fr); }

  .drivers-points { gap: 24px; }
}

@media (max-width: 600px) {
  .hero { padding-top: 16px; }

  .hero-grid,
  .app-grid { grid-template-columns: minmax(0, 1fr); }

  .hero-media { margin-top: 8px; }

  .market,
  .audience-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .app-media img { width: min(240px, 72vw); }
}

/* Ограничение выделения и перетаскивания содержимого страницы. */
body, body * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, [contenteditable="true"], [contenteditable="true"] * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
img { -webkit-user-drag: none; }

/* Legal documents: readable text and preserved paragraph/section numbering. */
.legal-page { padding-bottom: 24px; }
.legal-container { max-width: 1000px; }
.legal-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-text-secondary); text-underline-offset: 4px; }
.legal-heading { margin: 20px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.legal-heading h1 { max-width: 900px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.18; overflow-wrap: break-word; }
.legal-document { max-width: 880px; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-document p { margin: 0 0 1em; }
.legal-document h2 { margin: 1.8em 0 .7em; font-size: clamp(21px, 2.6vw, 26px); line-height: 1.35; }
.legal-document a { color: inherit; text-underline-offset: 3px; }
.legal-document .document-centered { text-align: center; }
.footer-links a { padding: 8px 0; line-height: 1.4; }
