/* ============================================================
   Автопрестиж — стили сайта
   Дизайн-токены и мотив «дорожной разметки» — из макетов Клод-дизайна
   ============================================================ */

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/golos-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/golos-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/golos-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: oklch(0.96 0.01 250);
  --surface: #fff;
  --ink: #10151f;
  --muted: #4c5568;
  --muted-2: #6b7488;
  --accent: oklch(0.5 0.14 250);
  --accent-hover: oklch(0.42 0.13 250);
  --accent-light: oklch(0.94 0.03 250);
  --dark: #10151f;
  --line: oklch(0.9 0.015 250);
  --r-card: 22px;
  --r-btn: 14px;
  --r-sm: 12px;
  --shadow: 0 6px 24px oklch(0.3 0.06 255 / .08);
  --shadow-lg: 0 14px 44px oklch(0.3 0.06 255 / .12);
  --wrap: 1232px;
  --gap: 16px;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
::selection { background: oklch(0.9 0.06 250); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 44px 0; }
.section--tight { padding: 26px 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r-btn) 0;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- signature: дорожная разметка ---------- */
.kicker {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px;
}
.kicker::before {
  content: ''; width: 26px; height: 4px; border-radius: 2px; flex: none;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 12px);
}
.dashes {
  height: 4px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 16px);
}
.divider { height: 1px; background: var(--line); margin: 28px 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--r-btn); font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: filter .15s, background .15s, border-color .15s; font-family: inherit;
  line-height: 1.25; text-align: center;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { filter: brightness(1.1); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: var(--accent-light); color: var(--accent); }
.btn--light:hover { filter: brightness(0.97); }
.btn--on-dark { background: #fff; color: var(--ink); }
.btn--on-dark:hover { filter: brightness(0.94); color: var(--ink); }
.btn--lg { padding: 16px 28px; font-size: 16.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- карточки ---------- */
.card {
  background: var(--surface); border-radius: var(--r-card); padding: 26px 28px;
}
.card--dark { background: var(--dark); color: #fff; }
.card--dark .muted, .card--dark p { color: #b9c0cf; }
.card--accent { background: var(--accent-light); }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 13.5px; }
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- шапка ---------- */
.header { padding: 0 24px; position: sticky; top: 12px; z-index: 80; }
.header__inner {
  max-width: var(--wrap); margin: 16px auto 0; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow); padding: 12px 22px;
  display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 18px; height: 4px; background: var(--accent); border-radius: 2px; flex: none; }
.logo__text { font-weight: 800; font-size: 16px; }
.nav { display: flex; gap: 20px; font-size: 14px; font-weight: 500; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.header__phone { font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.burger span + span { margin-top: 5px; }

/* ---------- герой ---------- */
.hero { display: grid; grid-template-columns: 1.45fr 1fr; gap: var(--gap); padding-top: 22px; }
.hero__main { grid-column: 1; background: var(--surface); border-radius: var(--r-card); padding: 38px 40px; }
.hero__side { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: var(--gap); align-content: start; }
.hero__trust { grid-column: 1; background: var(--surface); border-radius: var(--r-card); padding: 20px 28px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-bottom: 16px; }
.hero__sub { font-size: 17px; color: var(--muted); margin-bottom: 24px; max-width: 46ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill {
  background: var(--bg); border-radius: 99px; padding: 7px 13px;
  font-size: 13px; font-weight: 500; color: #3d4a63;
}
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.trust-row li { display: flex; align-items: center; gap: 7px; }
.trust-row li::before { content: ''; width: 12px; height: 3px; border-radius: 2px; background: var(--accent); flex: none; }

/* ---------- заглушки под фото ---------- */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 190px; border-radius: var(--r-card); padding: 18px;
  color: #5b6478; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12.5px; line-height: 1.45;
  background-color: oklch(0.93 0.012 250);
  background-image: repeating-linear-gradient(45deg,
      oklch(0.89 0.02 250) 0 10px, transparent 10px 20px);
  border: 1px solid var(--line);
}
.ph--sm { min-height: 130px; }
.ph--tall { min-height: 300px; }
.ph--video { aspect-ratio: 9 / 16; min-height: 0; }

/* ---------- фотографии ---------- */
.photo {
  width: 100%; height: auto; display: block; object-fit: cover;
  border-radius: var(--r-card); background: var(--accent-light);
}
.photo--wide   { aspect-ratio: 4 / 3; }
.photo--tall   { aspect-ratio: 3 / 4; }
.photo--person { aspect-ratio: 4 / 5; border-radius: var(--r-btn); }
.photo--flat   { border-radius: var(--r-btn); }
.figure { margin: 0; }
.figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted-2); }
.person h3 { font-size: 16px; margin-top: 12px; }
.person p { font-size: 13.5px; color: var(--muted-2); margin-top: 4px; }

/* ---------- видео и карты ---------- */
.clip {
  aspect-ratio: 9 / 16; border-radius: var(--r-btn);
  overflow: hidden; background: var(--dark);
}
.clip iframe { width: 100%; height: 100%; border: 0; display: block; }
.map {
  aspect-ratio: 16 / 9; border-radius: var(--r-card);
  overflow: hidden; background: var(--accent-light);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 720px) { .map { aspect-ratio: 4 / 5; } }

/* ---------- отзывы ---------- */
.review blockquote { margin: 0; font-size: 15.5px; color: var(--muted); }
.review blockquote::before {
  content: ''; display: block; width: 28px; height: 4px; border-radius: 2px;
  margin-bottom: 14px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 12px);
}
.review .who { font-weight: 700; font-size: 15px; margin-top: 14px; }
.review .meta { font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.links-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.links-row a {
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  background: var(--bg); border-radius: 99px; padding: 7px 14px; color: var(--muted);
}
.links-row a:hover { background: var(--accent-light); color: var(--accent); }

/* ---------- метки для данных заказчика ---------- */
.todo {
  display: inline-block; background: oklch(0.95 0.06 90); color: #6b4b00;
  border: 1px dashed oklch(0.75 0.1 80); border-radius: 8px;
  padding: 3px 9px; font-size: 12.5px; font-weight: 500;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
.todo--block { display: block; margin-top: 10px; }

/* ---------- таблицы ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--r-card); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; min-width: 560px; }
table.data th, table.data td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
table.data th { font-weight: 700; }
table.data thead th { background: var(--accent-light); }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border-radius: var(--r-btn); padding: 16px 20px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- квиз ---------- */
.quiz { background: var(--surface); border-radius: var(--r-card); padding: 28px 30px; }
.quiz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz__title { font-size: 21px; font-weight: 800; }
.quiz__step { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.quiz__bar { display: flex; gap: 5px; margin-bottom: 22px; }
.quiz__bar i { height: 4px; border-radius: 2px; background: var(--line); flex: 1; transition: background .2s; }
.quiz__bar i.on { background: var(--accent); }
.quiz__q { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.quiz__opts { display: grid; gap: 10px; }
.opt {
  text-align: left; background: var(--bg); border: 1px solid transparent;
  border-radius: var(--r-btn); padding: 15px 18px; cursor: pointer;
  font-family: inherit; font-size: 15.5px; font-weight: 600; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--accent); background: var(--accent-light); }
.opt small { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted-2); margin-top: 3px; }
.quiz__nav { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--muted); font-family: inherit; font-size: 14.5px; cursor: pointer; padding: 6px 0; }
.link-btn:hover { color: var(--accent); }
.quiz__note { font-size: 13px; color: var(--muted-2); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-btn);
  font-family: inherit; font-size: 16px; background: var(--bg); color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); background: #fff; }
.field--err input { border-color: #c0392b; }
.err-msg { color: #c0392b; font-size: 13px; margin-top: 5px; display: none; }
.field--err .err-msg { display: block; }
.ways { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.way {
  border: 1px solid var(--line); background: var(--bg); border-radius: 99px;
  padding: 9px 16px; font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--muted);
}
.way[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.result-card { background: var(--dark); color: #fff; border-radius: var(--r-card); padding: 24px 26px; margin-bottom: 18px; }
.result-card .price { font-size: 34px; font-weight: 800; }
.result-card ul li { font-size: 14.5px; color: #b9c0cf; padding-left: 18px; position: relative; margin-top: 6px; }
.result-card ul li::before { content: ''; position: absolute; left: 0; top: 9px; width: 10px; height: 3px; border-radius: 2px; background: var(--accent); }
.done { text-align: center; padding: 26px 10px; }
.done__mark { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; font-size: 26px; }

/* ---------- футер ---------- */
.footer { background: var(--dark); color: #fff; margin-top: 44px; padding: 44px 0 34px; }
.footer a { color: #cdd4e2; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.footer li { margin-bottom: 8px; font-size: 14.5px; color: #b9c0cf; }
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; gap: 28px; }
.footer__bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid #263047; font-size: 13px; color: #8e97ab; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- мобильная нижняя панель ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr); gap: 8px; box-shadow: 0 -6px 20px rgb(16 21 31 / .08);
}
.bottombar a, .bottombar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; text-decoration: none; color: var(--muted);
  background: none; border: 0; font-family: inherit; cursor: pointer; padding: 6px 2px;
}
.bottombar .is-main { color: #fff; background: var(--accent); border-radius: var(--r-sm); }

/* ---------- модальное окно квиза ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 120; background: rgb(16 21 31 / .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.modal__box { width: 100%; max-width: 620px; margin: auto; position: relative; }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: var(--bg); color: var(--ink);
  font-size: 20px; cursor: pointer; line-height: 1;
}

/* ---------- версия для слабовидящих ---------- */
body.a11y { --bg: #000; --surface: #000; --ink: #ffea00; --muted: #ffea00; --muted-2: #ffea00;
  --accent: #ffea00; --accent-hover: #fff; --accent-light: #000; --dark: #000; --line: #ffea00;
  --shadow: none; --shadow-lg: none; font-size: 20px; }
body.a11y * { background-image: none !important; letter-spacing: .01em; }
body.a11y .card, body.a11y .quiz, body.a11y .header__inner, body.a11y .faq details,
body.a11y .hero__main, body.a11y .hero__trust, body.a11y .result-card, body.a11y .ph { border: 2px solid #ffea00; }
body.a11y .btn--primary, body.a11y .way[aria-pressed="true"] { background: #ffea00; color: #000; }
body.a11y img, body.a11y iframe { filter: grayscale(1) contrast(1.2); }
body.a11y .footer { background: #000; border-top: 2px solid #ffea00; }
body.a11y .footer li, body.a11y .footer a, body.a11y .footer__bottom { color: #ffea00; }
body.a11y .todo { background: #000; color: #ffea00; border-color: #ffea00; }
.a11y-toggle { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero__main, .hero__side, .hero__trust { grid-column: 1; grid-row: auto; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { padding-bottom: 74px; }
  .wrap { padding: 0 16px; }
  .header { padding: 0 16px; }
  .header__inner { padding: 10px 16px; }
  .nav {
    display: none; width: 100%; order: 5; flex-direction: column; gap: 2px;
    margin-left: 0; padding-top: 10px; border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 16px; }
  .burger { display: block; }
  .header__phone { margin-left: auto; }
  .header .btn { display: none; }
  .hero__main { padding: 26px 22px; }
  .section { padding: 32px 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .card { padding: 22px 20px; }
  .quiz { padding: 22px 18px; }
  .footer__cols { grid-template-columns: 1fr; gap: 22px; }
  .bottombar { display: grid; }
  h2 { font-size: 24px; }
}

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

@media print {
  .header, .bottombar, .modal, .quiz { display: none !important; }
}
