/*
Theme Name: CustomCars
Theme URI: https://customcars.pro
Description: Одностраничный лендинг сервиса «Нарисуй автомобиль — мы сделаем его настоящим».
Version: 1.0
Text Domain: customcars
*/

/* Layout: лист для эскизов — бумага, синяя шариковая ручка, красный маркер; секции идут как развороты альбома дизайнера */
:root {
  --paper: #f3f1ec;
  --paper-2: #e9e6df;
  --card: #fbfaf7;
  --ink: #17181c;
  --ink-soft: #55565e;
  --pen: #23308f;        /* синяя шариковая ручка из эскиза */
  --red: #d42a20;        /* красный маркер */
  --red-deep: #9e1a13;
  --line: #d4d0c6;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --wrap: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.4vw, 52px); }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(64px, 9vw, 120px); }
.band--dark { background: var(--ink); color: var(--paper); }
.band--red { background: var(--red); color: #fff; }
.eyebrow {
  font: 600 13px/1 var(--f-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}
.band--dark .eyebrow { color: #ff6a5f; }
.hand { font-family: var(--f-hand); font-weight: 600; color: var(--pen); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 60ch; }
.band--dark .lead { color: #b9b7b1; }
.head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 780px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 16px/1 var(--f-body);
  padding: 18px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

/* Шапка */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.logo { font: 700 19px/1 var(--f-display); text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.logo i { width: 22px; height: 12px; border: 2.5px solid var(--red); border-radius: 50%; display: inline-block; }
.logo b { color: var(--red); font-weight: 700; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.top .btn { padding: 12px 18px; font-size: 14px; }
@media (max-width: 1080px) { .nav { display: none; } }

/* Первый экран: заголовок во всю ширину, ниже — текст слева и «эскиз → машина» справа */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-head { display: grid; gap: 22px; }
.hero h1 { font-size: clamp(30px, 4.3vw, 56px); font-weight: 700; line-height: 1.06; text-wrap: initial; }
.hero h1 span { display: block; }
.hero h1 em { font-style: normal; color: var(--red); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: -1%; right: -1%; bottom: -.1em; height: .14em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 50 2, 120 2, 198 6' fill='none' stroke='%2323308f' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.hero-body {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; margin-top: clamp(32px, 4vw, 56px);
}
.hero-text { display: grid; gap: 26px; min-width: 0; }
.hero-text .lead { font-size: clamp(17px, 1.4vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: 14px; color: var(--ink-soft); }

.hero-art { margin: 0; min-width: 0; display: grid; gap: 14px; }
.art { position: relative; aspect-ratio: 16 / 11; max-width: 100%; }
.sheet {
  position: absolute; left: 1%; top: 9%; width: 52%; z-index: 1;
  background: #fff; padding: 8px;
  transform: rotate(-4deg);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(23,24,28,.35);
}
.render {
  position: absolute; right: 0; bottom: 4%; width: 72%; z-index: 2;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(120,10,5,.6);
}
.tag { position: absolute; z-index: 3; font-size: clamp(20px, 2vw, 28px); line-height: 1; white-space: nowrap; }
.tag-sketch { left: 3%; top: 0; transform: rotate(-4deg); }
.tag-car { right: 1%; top: 3%; transform: rotate(-2deg); }
.arrow { position: absolute; z-index: 3; left: 52%; top: 9%; width: 22%; color: var(--pen); overflow: visible; }
.hero-art figcaption { font-size: 12px; color: var(--ink-soft); text-align: right; }

@media (max-width: 900px) {
  .hero-body { grid-template-columns: 1fr; }
}

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.step { padding: 26px 24px 30px 0; display: grid; gap: 12px; align-content: start; min-width: 0; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step-n { font: 700 15px/1 var(--f-display); color: var(--red); display: flex; align-items: center; gap: 10px; }
.step-n::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .4; }
.step p { color: var(--ink-soft); font-size: 16px; }
.step .hand { font-size: 22px; line-height: 1.1; }
.process-img { margin-top: clamp(36px, 5vw, 56px); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Платформа и оболочка */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split > * { min-width: 0; }
.layers { display: grid; gap: 0; }
.layer { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid #3a3b40; }
.layer:last-child { border-bottom: 1px solid #3a3b40; }
.layer-k { font: 600 12px/1.3 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #8c8a85; padding-top: 4px; }
.layer h3 { margin-bottom: 8px; }
.layer p { color: #b9b7b1; font-size: 16px; }
.layer--you h3 { color: #ff6a5f; }
.modules-img { background: #fff; border-radius: 8px; padding: 18px; }
.limit {
  margin-top: 28px; padding: 18px 20px; border: 1.5px dashed #6a6965; border-radius: 8px;
  font-size: 15px; color: #d6d4ce;
}
.limit b { color: #fff; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 6px; }
}

/* Обновление внешности */
.renew { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.renew > * { min-width: 0; }
.renew-img { border-radius: 8px; overflow: hidden; background: #fff; }
.renew ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.renew li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.renew li::before { content: ""; width: 18px; height: 10px; margin-top: 8px; border: 2px solid var(--red); border-radius: 50%; }
@media (max-width: 860px) { .renew { grid-template-columns: 1fr; } }

/* Для кого */
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.who-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.who-card .hand { font-size: 24px; line-height: 1; color: var(--red); }
.who-card p { color: var(--ink-soft); font-size: 16px; }
.who-card--accent { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.who-card--accent p { color: #b9b7b1; }
.who-card--accent .hand { color: #ff6a5f; }
@media (max-width: 900px) { .who { grid-template-columns: 1fr; } }

/* Этапы */
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: st; }
.stage { padding: 28px 26px 28px 0; display: grid; gap: 12px; align-content: start; position: relative; min-width: 0; }
.stage + .stage { padding-left: 26px; border-left: 1px solid rgba(255,255,255,.35); }
.stage-status {
  justify-self: start; font: 600 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.7);
}
.stage--now .stage-status { background: #fff; color: var(--red); border-color: #fff; }
.stage p { color: rgba(255,255,255,.86); font-size: 16px; }
.road-note { margin-top: 36px; font-size: 15px; color: rgba(255,255,255,.85); max-width: 70ch; }
.band--red h2 { color: #fff; }
.band--red .eyebrow { color: #fff; opacity: .8; }
.band--red .lead { color: rgba(255,255,255,.9); }
@media (max-width: 860px) {
  .road { grid-template-columns: 1fr; }
  .stage + .stage { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.35); }
}

/* Форма */
.order { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.order > * { min-width: 0; }
.order-side { display: grid; gap: 22px; }
.order-side .sheet-mini { background: #fff; padding: 8px; transform: rotate(2deg); max-width: 360px; box-shadow: 0 16px 30px -18px rgba(0,0,0,.35); }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: clamp(22px, 3vw, 36px); display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-weight: 600; font-size: 15px; }
.field small { color: var(--ink-soft); font-size: 13px; }
.field input[type=text], .field input[type=email], .field textarea {
  font: inherit; font-size: 16px; padding: 14px 16px; border-radius: 8px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--pen); outline: none; box-shadow: 0 0 0 3px rgba(35,48,143,.15); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { font-weight: 500; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: #fff; font-size: 15px; }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chips input:focus-visible + span { outline: 3px solid var(--pen); outline-offset: 2px; }
.drop {
  display: grid; place-items: center; text-align: center; gap: 6px;
  border: 2px dashed var(--pen); border-radius: 10px; padding: 26px 16px; cursor: pointer;
  background: rgba(35,48,143,.04); color: var(--pen);
}
.drop .hand { font-size: 26px; line-height: 1; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.has-file { border-style: solid; background: rgba(35,48,143,.08); }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-legal { font-size: 13px; color: var(--ink-soft); }
.alert { padding: 16px 18px; border-radius: 8px; font-weight: 500; }
.alert--ok { background: #e3efe3; color: #1f4d22; }
.alert--err { background: #f8e1df; color: var(--red-deep); }
@media (max-width: 860px) { .order { grid-template-columns: 1fr; } }

/* Вопросы */
.faq { display: grid; gap: 0; max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font: 600 19px/1.35 var(--f-body); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 28px/1 var(--f-body); color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 24px; color: var(--ink-soft); max-width: 70ch; }

/* Подвал */
.foot { padding-block: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.case-card {
  display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.case-card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(23,24,28,.45); }
.case-card-img { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; }
.case-card-text { padding: 24px 26px 26px; display: grid; gap: 12px; align-content: start; }
.case-card-text p { color: var(--ink-soft); font-size: 16px; }
.case-more { font-weight: 600; color: var(--red); }
.cases-all { margin-top: 28px; }

.page-top { padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 48px); }
.page-title { font-size: clamp(30px, 4.3vw, 56px); font-weight: 700; }
.back { font-size: 15px; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); }
.case-cover { border-radius: 10px; overflow: hidden; }
.case-cover img { width: 100%; }

.case-body { padding-bottom: clamp(64px, 8vw, 110px); display: grid; gap: 22px; }
.case-body > * { width: 100%; max-width: 720px; margin: 0 auto; }
.case-body > h2 { font-size: clamp(24px, 2.6vw, 34px); margin-top: 28px; }
.case-body p { color: var(--ink-soft); }
.case-body figure { margin: 8px auto; }
.case-body figure.wide { max-width: 100%; }
.case-body figure img { border-radius: 8px; width: 100%; }
.case-body figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }
.case-body .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 100%; align-items: center; }
.case-body .pair figure { margin: 0; background: #fff; border-radius: 8px; padding: 12px; }
.case-facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.case-facts li { padding: 16px 16px 16px 0; display: grid; gap: 4px; align-content: start; font-size: 16px; }
.case-facts b { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
@media (max-width: 640px) { .case-body .pair { grid-template-columns: 1fr; } }

/* Новости */
.news-filter { margin-bottom: 28px; }
.news { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.news-item { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.news-item[hidden] { display: none; }
.news-item time { font-size: 14px; color: var(--ink-soft); padding-top: 4px; }
.news-item time b { display: block; font: 700 30px/1 var(--f-display); color: var(--ink); }
.news-main { display: grid; gap: 8px; min-width: 0; max-width: 820px; }
.news-src { font: 600 12px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.news-main h2 { font: 600 21px/1.3 var(--f-body); letter-spacing: 0; }
.news-main h2 a { text-decoration: none; }
.news-main h2 a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.news-main p { color: var(--ink-soft); font-size: 16px; }
.news-updated { margin-top: 20px; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 8px; } .news-item time b { display: inline; font-size: 18px; } }
