/* MotoDoc — лендинг motodocai.ru. Направление «Service Plate» (живой сервис-мануал).
   Тёмная база Ink Navy + cyan(данные)/red(сигнал). Без градиентов: hairline-сетка + спот-краска.
   Контраст пересчитан по WCAG: цвета-текста разведены on-dark / on-light. */
:root {
  /* поверхности (shadcn zinc, dark) */
  --ink: #09090B;          /* zinc-950 — фон */
  --ink-2: #121214;        /* alt-секция */
  --surface: #18181B;      /* zinc-900 — карточки */
  --surface-2: #27272A;    /* zinc-800 — поднятые */
  /* текст */
  --bone: #FAFAFA;         /* zinc-50 — основной текст */
  --steel: #A1A1AA;        /* zinc-400 — вторичный/caption */
  /* акценты — нейтральные (boring shadcn): primary = near-white */
  --cyan: #FAFAFA;         /* primary/accent */
  --cyan-deep: #E4E4E7;    /* zinc-200 — hover */
  --red: #EF4444;          /* destructive */
  --red-bright: #F87171;
  /* линии */
  --rule: #27272A;         /* zinc-800 */
  --rule-strong: #3F3F46;  /* zinc-700 */
  --ring: #D4D4D8;         /* focus ring (zinc-300) */
  --header-bg: rgba(9,9,11,0.82);
  /* геометрия */
  --r-page: 6px; --r-ctl: 4px; --r-table: 2px; --r-pill: 999px;
  --shadow-pop: 0 8px 24px rgba(0,0,0,0.35);
  --maxw: 1120px;
  --display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Светлая тема (shadcn zinc, light) — переключается классом html.light */
html.light {
  --ink: #FFFFFF;          /* фон */
  --ink-2: #FAFAFA;        /* alt-секция (zinc-50) */
  --surface: #FFFFFF;      /* карточки (отделяются бордером) */
  --surface-2: #F4F4F5;    /* zinc-100 */
  --bone: #09090B;         /* основной текст */
  --steel: #71717A;        /* zinc-500 — вторичный */
  --cyan: #18181B;         /* primary (тёмная кнопка на светлом) */
  --cyan-deep: #27272A;    /* hover */
  --red: #EF4444; --red-bright: #DC2626;
  --rule: #E4E4E7;         /* zinc-200 */
  --rule-strong: #D4D4D8;  /* zinc-300 */
  --ring: #18181B;
  --header-bg: rgba(255,255,255,0.82);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.accent { color: var(--cyan); }

/* focus всегда виден (перчатки + клавиатура) */
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--r-ctl); }

/* exhibit-лейбл — ярлык узла сервис-мануала */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .14em; color: var(--cyan);
  border: 1px solid var(--rule); border-radius: var(--r-table);
  padding: 6px 12px; margin-bottom: 22px; background: rgba(127,127,127,0.10);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }

/* ---------- Icons (inline SVG sprite) ---------- */
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: var(--r-ctl); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--steel); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:not(.btn):hover { color: var(--bone); }

.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  padding: 12px 22px; border-radius: var(--r-ctl); transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap; min-height: 48px;
}
.btn-primary { background: var(--cyan); color: var(--ink); }
.btn-primary:hover { background: var(--cyan-deep); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-lg { padding: 15px 28px; font-size: 16px; min-height: 52px; }
.nav .btn { padding: 9px 16px; min-height: 40px; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--rule-strong); border-radius: var(--r-ctl); color: var(--bone); cursor: pointer; }
.theme-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.theme-toggle .ico { font-size: 18px; }
.theme-toggle .t-sun { display: none; }
html.light .theme-toggle .t-sun { display: inline-block; }
html.light .theme-toggle .t-moon { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--bone); cursor: pointer; line-height: 0; padding: 6px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(33px, 5vw, 53px); line-height: 1.04; }
.hero .lead { color: var(--steel); font-size: 19px; margin: 20px 0 28px; max-width: 540px; }

/* сигнатура hero: чат (аватар-маскот + имя, двухцветные пузыри с хвостиками) */
.cb { display: grid; gap: 14px; margin: 0 0 28px; max-width: 470px; }
.cb .bub { font-size: 14.5px; line-height: 1.5; }
.cb .bub .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.cb .bub.out { background: var(--cyan); color: var(--ink); border-radius: 16px 16px 5px 16px; padding: 9px 14px; }
.cb .bub.in { background: var(--surface-2); color: var(--bone); border-radius: 16px 16px 16px 5px; padding: 11px 14px; }
.cb .bub.in p { color: var(--bone); }
.cb-out { justify-self: end; max-width: 82%; }
.cb-in { display: flex; gap: 10px; align-items: flex-start; max-width: 92%; }
.cb-in .av { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); flex: 0 0 auto; }
.cb-in .who { font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--bone); margin: 0 0 5px 2px; }
.cb-in .who span { color: var(--steel); font-weight: 400; }
.cb .src { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-family: var(--display);
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--steel); border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 3px 10px; background: rgba(127,127,127,.06); }
.cb .src .ico { font-size: 14px; color: var(--cyan); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-badge { display: inline-flex; align-items: center; transition: opacity .15s; }
.store-badge img { height: 56px; width: auto; display: block; }
.store-badge:hover { opacity: .9; }
.os-note { margin-top: 18px; color: var(--steel); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.os-note .ico { font-size: 18px; color: var(--cyan); }
.cta-apk-link { color: var(--steel); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.cta-apk-link:hover { color: var(--cyan); }

/* подсказка под кнопками — по платформе (без JS видны все) */
.note-android, .note-ios { display: none; }
.note-other { display: flex; }
body.plat-android .note-android { display: flex; }
body.plat-android .note-other, body.plat-android .note-ios { display: none; }
body.plat-ios .note-ios { display: flex; }
body.plat-ios .note-other, body.plat-ios .note-android { display: none; }
body.plat-android .cta-ios { display: none; }
body.plat-ios .cta-rustore, body.plat-ios .cta-apk { display: none; }

/* hero-art: маскот в Plate-рамке */
.hero-art { display: flex; justify-content: center; }
.plate { margin: 0; width: min(420px, 100%); }
.plate img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }

/* ---------- Section base ---------- */
.block { padding: 72px 0; }
.block.alt { background: var(--ink-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sec-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.sec-head .eyebrow { margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(27px, 3.4vw, 38px); }
.sec-head p { color: var(--steel); font-size: 18px; margin-top: 12px; }

/* ---------- Features ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-page); padding: 26px; transition: border-color .15s; }
.card:hover { border-color: var(--cyan); }
.card .ic { width: 48px; height: 48px; border-radius: var(--r-ctl); display: grid; place-items: center; color: var(--bone); background: rgba(127,127,127,0.10); border: 1px solid var(--rule-strong); margin-bottom: 18px; }
.card .ic .ico { font-size: 24px; }
.card h3 { font-size: 20px; margin-bottom: 9px; }
.card p { color: var(--steel); font-size: 15.5px; }

/* «Скоро» — плоский pill */
.soon-badge { display: inline-block; vertical-align: middle; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--cyan); background: transparent; border: 1px solid var(--rule-strong); padding: 2px 9px; border-radius: var(--r-pill); margin-left: 8px; text-transform: uppercase; white-space: nowrap; }

/* ---------- Steps (реальная последовательность → нумерация оправдана) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-page); padding: 26px; }
.step .n { font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--cyan);
  width: 38px; height: 38px; border-radius: var(--r-ctl); display: grid; place-items: center; border: 1px solid var(--cyan); margin-bottom: 16px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--steel); font-size: 15px; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-page); padding: 28px 26px; position: relative; }
.plan--featured { border: 2px solid var(--cyan); }
.plan-badge { position: absolute; top: -11px; left: 24px; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--cyan); padding: 3px 11px; border-radius: var(--r-pill); }
.plan-name { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--steel); text-transform: uppercase; letter-spacing: .08em; }
.price { margin: 12px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.price b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 36px; font-weight: 500; color: var(--bone); letter-spacing: -0.02em; }
.price span { color: var(--steel); font-size: 16px; }
.plan-sub { color: var(--steel); font-size: 14.5px; margin-bottom: 18px; }
.plan-feats { list-style: none; display: grid; gap: 10px; margin: 0 0 24px; }
.plan-feats li { position: relative; padding-left: 28px; color: var(--bone); font-size: 15.5px; }
.plan-feats li .ico { position: absolute; left: 0; top: 2px; font-size: 18px; color: var(--cyan); }
.plan .btn { width: 100%; margin-top: auto; }
.plan-note { margin-top: 12px; color: var(--cyan); font-family: var(--mono); font-size: 13px; text-align: center; }
.plan-note .ico { font-size: 15px; vertical-align: -3px; margin-right: 2px; }
.price-foot { max-width: 720px; margin: 26px auto 0; text-align: center; color: var(--steel); font-size: 14px; }
/* Rider — три периода (неделя/месяц/год) */
.price-rows { list-style: none; margin: 14px 0 16px; display: grid; gap: 0; }
.price-rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.price-rows li:last-child { border-bottom: 0; }
.price-rows .pr-per { color: var(--steel); font-size: 14.5px; }
.price-rows .pr-amt { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--bone); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
/* Мастерская — бейдж-гарантия возврата (outline + sentence case: фраза-обещание,
   а не статус-метка; держит одну строку даже на узкой 3-колоночной сетке ~880px) */
.plan-badge--refund { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); text-transform: none; letter-spacing: .01em; }

/* ---------- Install ---------- */
.install-head { max-width: 760px; margin: 0 auto 14px; font-family: var(--display); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.install-head .ico { font-size: 20px; color: var(--cyan); }
.install-head.mt { margin-top: 36px; }
.install-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.install-item { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-page); padding: 18px 20px; }
.install-item .num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--r-ctl); font-family: var(--mono); font-size: 15px; display: grid; place-items: center; border: 1px solid var(--cyan); color: var(--cyan); }
.install-item b { color: var(--bone); }
.install-item p { color: var(--steel); font-size: 15.5px; }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 740px; margin: 0 auto; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; border-radius: var(--r-page); border: 1px solid var(--rule); background: var(--surface); }
.shot figcaption { text-align: center; color: var(--steel); font-size: 14px; margin-top: 13px; }
@media (max-width: 880px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 460px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-page); padding: 0; }
.faq details[open] { border-color: var(--rule-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; border-radius: var(--r-page); font-family: var(--display); font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 24px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--steel); padding: 0 22px 20px; font-size: 15.5px; }

/* ---------- CTA strip ---------- */
.cta { text-align: center; padding: 56px 30px; border-radius: var(--r-page); background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--cyan); }
.cta h2 { font-size: clamp(27px, 3.6vw, 38px); }
.cta p { color: var(--steel); margin: 14px auto 26px; max-width: 520px; }
.cta .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 44px 0 38px; color: var(--steel); font-size: 14.5px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.foot-brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--bone); }
.foot-brand img { width: 30px; height: 30px; border-radius: var(--r-ctl); }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-cols h4 { color: var(--bone); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.foot-cols a, .foot-cols span { display: block; color: var(--steel); margin-bottom: 8px; transition: color .15s; }
.foot-cols a:hover { color: var(--cyan); }
.foot-bottom { border-top: 1px solid var(--rule); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.foot-bottom .ico { font-size: 16px; vertical-align: -0.22em; color: var(--steel); }

/* ---------- Legal pages (privacy/terms — общий stylesheet, токены §1) ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 52px 0 80px; }
.legal h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 10px; }
.legal .updated { color: var(--steel); font-size: 14.5px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 36px 0 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--bone); font-size: 16px; }
.legal p { margin-bottom: 14px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 24px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--cyan); }
.legal a:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--steel); font-size: 15px; margin-bottom: 8px; }
.back-link:hover { color: var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-cta, .eyebrow, .cb { margin-left: auto; margin-right: auto; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .os-note { justify-content: center; }
  .hero-art { order: -1; margin-bottom: 8px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: 64px; left: 0; right: 0; background: var(--ink-2);
    border-bottom: 1px solid var(--rule); padding: 22px; z-index: 60; }
  .nav-links.open .btn { width: 100%; }
  .grid, .steps, .price-grid { grid-template-columns: 1fr; }
}
