/* Car Assist — спокойная мужская палитра: тёплый серый + настоящий коричневый */
:root {
  --dark: #3f3b38;
  --dark-2: #33302d;
  --light: #cbc5bd;
  --card: #d9d4cd;
  --mid: #b9b2a9;
  --text: #2b2826;
  --muted: #4a443f;
  --border: #a79f96;
  --accent: #3b3e43;
  --accent-hover: #2b2d31;
  --accent-on-dark: #6c7178;
  --on-dark: #efeae4;
  --on-dark-muted: #c4bcb2;
  --radius: 10px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

h1, h2, h3 { text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.6vw, 48px); letter-spacing: .06em; }
h2 { font-size: clamp(20px, 2.6vw, 28px); }
h3 { font-size: 15px; }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--dark-2); color: var(--on-dark); border-bottom: 1px solid #4d4844; }
.top-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { text-decoration: none; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 16px; display: flex; flex-direction: column; line-height: 1.1; }
.logo small { font-weight: 400; font-size: 10px; letter-spacing: .22em; color: var(--on-dark-muted); margin-top: 3px; }
.menu { display: flex; gap: 20px; margin-left: auto; }
.menu a { text-decoration: none; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-muted); }
.menu a:hover { color: var(--on-dark); }
.langs { display: flex; border: 1px solid #6a635d; border-radius: 6px; overflow: hidden; }
.langs a { text-decoration: none; font-size: 12px; padding: 5px 8px; color: var(--on-dark-muted); letter-spacing: .06em; }
.langs a + a { border-left: 1px solid #6a635d; }
.langs a[aria-current] { background: var(--on-dark); color: var(--dark-2); font-weight: 700; }
.langs a:hover:not([aria-current]) { color: var(--on-dark); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--on-dark); margin: 4px 0; transition: .2s; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; font: inherit; font-weight: 600;
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 24px; border-radius: 8px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { padding: 9px 14px; font-size: 12px; }
.btn-wide { width: 100%; }
.btn-accent { background: var(--accent); color: #f5f0ea; }
.btn-accent:hover { background: var(--accent-hover); }
.top .btn-accent { background: #50555c; border-color: #a3a8af; }
.top .btn-accent:hover { background: #60666e; }
/* на тёмном фоне — светлая кнопка и прозрачная со светлой рамкой (без «пыльности») */
.btn-light { background: var(--on-dark); color: var(--dark-2); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(239, 234, 228, .7); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(239, 234, 228, .08); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Первый экран ---------- */
.hero { background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%); color: var(--on-dark); padding: 88px 0 80px; position: relative; overflow: hidden; }
.hero::after { /* лёгкий «дорожный» мотив */
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(239,234,228,.08); box-shadow: 0 0 0 60px rgba(239,234,228,.025), 0 0 0 140px rgba(239,234,228,.02);
  pointer-events: none;
}
.kicker { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; color: var(--on-dark-muted); margin: 0 0 18px; }
.hero h1 { max-width: 760px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 640px; color: #ddd6ce; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.slogan { margin: 40px 0 0; font-style: italic; color: var(--on-dark-muted); letter-spacing: .03em; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--mid); }
.section.dark { background: var(--dark); color: var(--on-dark); }
.section-text { color: var(--muted); max-width: 680px; margin: -4px 0 32px; }
.dark .section-text { color: var(--on-dark-muted); }

/* ---------- Форма-калькулятор ---------- */
.calc { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 760px; box-shadow: 0 10px 30px rgba(43, 40, 38, .08); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field[hidden] { display: none; }
.field > span { font-weight: 600; letter-spacing: .04em; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: #f4f1ed;
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; width: 100%;
}
textarea { resize: vertical; }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; -webkit-min-logical-width: calc(100% - 24px); min-height: 44px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.invalid { border-color: #9b3b2a !important; background: #f6ebe7; }
.custom-only { display: none; }
.calc.is-custom .custom-only { display: flex; }

.price-hint { background: #efe9e2; border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px; font-size: 14px; color: var(--muted); }
.price-hint b { color: var(--accent); font-size: 18px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 11px 6px; border: 1px solid var(--border); border-radius: 8px; background: #f4f1ed; font-size: 14px; }
.seg input:checked + span { background: var(--accent); color: #f5f0ea; border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: 12px; color: var(--muted); margin: 18px 0 14px; }
.form-msg { margin: 14px 0 0; font-size: 14px; min-height: 1em; }
.form-msg.ok { color: #2f5b32; font-weight: 600; }
.form-msg.err { color: #9b3b2a; font-weight: 600; }
.form-msg.demo { color: var(--accent); font-weight: 600; }

/* ---------- Маршруты ---------- */
.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.route {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  font: inherit; cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; color: var(--text); transition: transform .12s, border-color .12s;
}
.route:hover { transform: translateY(-2px); border-color: var(--accent); }
.route-name { font-weight: 600; font-size: 14px; }
.route-price { white-space: nowrap; font-size: 13px; color: var(--muted); }
.route-price b { color: var(--accent); font-size: 17px; }

/* ---------- Шаги ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #f5f0ea; font-weight: 700; margin-bottom: 14px; }
.steps p, .why p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Почему ---------- */
.why { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.why li { border-top: 2px solid var(--accent-on-dark); padding-top: 18px; }
.dark .why p { color: var(--on-dark-muted); }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.contact { text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s; }
.contact:hover { border-color: var(--accent); }
.contact span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact b { font-size: 17px; word-break: break-word; }

/* ---------- Подвал ---------- */
.foot { background: var(--dark-2); color: var(--on-dark-muted); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.foot b { color: var(--on-dark); letter-spacing: .1em; text-transform: uppercase; }
.foot-legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 24px; font-size: 12px; line-height: 1.6; }
.foot-legal a { color: var(--on-dark); text-decoration: underline; }
.consent a { color: inherit; text-decoration: underline; }
.legal { max-width: 780px; }
.legal h1 { margin: 0 0 6px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p { line-height: 1.65; margin: 0 0 12px; }
.legal-date { color: var(--muted); font-size: 14px; }
.proto { text-align: center; background: #26231f; color: #d9b9a2; padding: 10px; font-size: 12px; letter-spacing: .06em; }


/* ---------- Мобильная версия ---------- */
@media (max-width: 940px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .top-cta { display: none; }
}
@media (max-width: 760px) {
  .burger { display: block; margin-left: 4px; }
  .langs { margin-left: auto; }
  .menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--dark-2); border-bottom: 1px solid #4d4844; margin: 0;
  }
  .menu a { padding: 14px 20px; border-top: 1px solid #4d4844; }
  .top.open .menu { display: flex; }
  .top.open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .top.open .burger span:nth-child(2) { opacity: 0; }
  .top.open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding: 60px 0 56px; }
  .section { padding: 56px 0; }
  .calc { padding: 20px 16px; }
  .grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .seg { grid-template-columns: 1fr; }
  .why, .contacts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .logo small { display: none; }
  .langs a { padding: 5px 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* выбор времени: два списка (часы : минуты) вместо неудобного системного окошка */
.time-pick { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.time-pick b { font-size: 18px; color: var(--muted); }

/* способ связи: плитки как на сайте Forever Remembered */
.methods { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.method { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 78px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: #f4f1ed; font-size: 13px; color: var(--muted); line-height: 1.2; transition: border-color .12s, background .12s; }
.method:hover { border-color: var(--accent); }
.method input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.method:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #f5f0ea; }
.method:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.method svg { flex: none; }
@media (max-width: 520px) { .methods { grid-template-columns: repeat(3, 1fr); } }

/* плавающая кнопка связи + список способов */
.chat { position: relative; flex: none; }
.wa-float { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #3f6b52; color: #fff; border: 2px solid #2f5440; box-shadow: 0 3px 10px rgba(0,0,0,.3); cursor: pointer; }
.wa-float:hover { background: #355c46; }
.wa-float .i-close { display: none; }
.chat.open .i-close { display: block; }
.chat.open .i-open { display: none; }
.chat-panel { color: var(--text); position: absolute; top: 52px; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.28); padding: 10px; min-width: 240px; }
.chat-panel[hidden] { display: none; }
.chat-title { margin: 4px 8px 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.chat-panel a { color: var(--text); display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 11px 12px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.chat-panel a:hover { background: #efe9e2; }
.chat-panel a svg { color: #3f6b52; flex: none; }
.contacts { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .contacts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .contacts { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .methods { grid-template-columns: repeat(3, 1fr); } }

/* дети, багаж, животные — в одну строку */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.trio .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .trio { gap: 8px; } .trio select { padding-left: 8px; padding-right: 4px; } }

/* форма слева, калькулятор цены справа; на телефоне калькулятор идёт первым */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.calc-layout .calc { max-width: none; }
.pricecalc { position: sticky; top: 84px; background: var(--dark-2); color: var(--on-dark); border-radius: 14px; padding: 26px; box-shadow: 0 10px 30px rgba(43, 40, 38, .18); display: flex; flex-direction: column; gap: 14px; }
.pricecalc h3 { margin: 0; font-size: 20px; }
.pricecalc .pc-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--on-dark-muted); }
.pricecalc .field > span { color: var(--on-dark-muted); }
.pc-fields { display: grid; gap: 12px; }
.pricecalc .seg { grid-template-columns: 1fr; }
.pc-result { background: rgba(239, 234, 228, .08); border: 1px solid rgba(239, 234, 228, .18); border-radius: 10px; padding: 14px 16px; min-height: 84px; }
.pc-result p { margin: 0; }
.pc-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.pc-price { font-size: 38px; font-weight: 700; line-height: 1.15; }
.pc-price small { font-size: 18px; font-weight: 600; }
.pc-hint { font-size: 13px; color: var(--on-dark-muted); }
.pricecalc .btn-accent { background: var(--on-dark); color: var(--dark-2); border-color: var(--on-dark); }
.pricecalc .btn-accent:hover { background: #fff; }
@media (max-width: 940px) {
  .calc-layout { grid-template-columns: 1fr; }
  .pricecalc { order: -1; position: static; }
}
.pricecalc .seg span { color: var(--text); }
.pricecalc .seg input:checked + span { background: #565c64; color: #fff; border-color: #c4c8cd; }

/* галерея: по 2 фото в ряд */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; background: var(--mid); box-shadow: 0 6px 18px rgba(43, 40, 38, .12); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
@media (max-width: 480px) { .gallery { gap: 8px; } }

/* переключатель языка: на компьютере — ряд кодов, на телефоне — выпадающий список по вертикали */
.langs-list { display: flex; }
.langs-btn { display: none; }
.l-name { display: none; }
@media (max-width: 760px) {
  .langs { position: relative; overflow: visible; }
  .langs-btn { display: block; background: none; border: 0; color: var(--on-dark); font: inherit; font-size: 12px; letter-spacing: .06em; padding: 7px 10px; cursor: pointer; }
  .langs-btn::after { content: " ▾"; font-size: 10px; }
  .langs-list { display: none; position: absolute; top: calc(100% + 8px); right: 0; flex-direction: column; min-width: 160px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); overflow: hidden; z-index: 40; }
  .langs.open .langs-list { display: flex; }
  .langs-list a, .langs a { padding: 13px 16px; font-size: 15px; color: var(--text); letter-spacing: 0; border-left: 0; }
  .langs-list a + a { border-top: 1px solid var(--border); }
  .langs-list a[aria-current] { background: var(--mid); color: var(--text); font-weight: 700; }
  .langs-list a:hover:not([aria-current]) { background: #efe9e2; color: var(--text); }
  .l-code { display: none; }
  .l-name { display: inline; }
}

/* Lightbox */
.gallery a { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.94); display: none; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.lb.open { display: flex; }
.lb img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s ease, opacity .2s; }
.lb button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb .lb-close { top: 14px; right: 14px; }
.lb .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb .lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; opacity: .85; }
@media (max-width: 700px) { .lb .lb-prev, .lb .lb-next { display: none; } }
