/* Billionaire Agency — британский гоночный зелёный, слоновая кость, латунь.
   Playfair Display (заголовки, есть кириллица), Bodoni Moda (только логотип), Jost (текст). */
:root {
  --green: #0f2a23;        /* фон: британский гоночный зелёный */
  --green-deep: #0a1f1a;   /* шапка, подложка под фото */
  --green-soft: #15362d;   /* панели */
  --ivory: #ece5d6;        /* основной текст */
  --ivory-dim: #a9b2a6;    /* второстепенный текст */
  --brass: #b8955a;        /* акцент: латунь */
  --brass-light: #d6bb85;
  --rule: rgba(236, 229, 214, .14);
  --rule-strong: rgba(236, 229, 214, .28);
  --danger: #e59a86;
  --serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --logo: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--green); color: var(--ivory);
  font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--green-deep); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main { padding: 48px 0 96px; }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(10, 31, 26, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.logo { display: flex; align-items: baseline; gap: 12px; text-decoration: none; white-space: nowrap; }
.logo-main { font-family: var(--logo); font-size: 30px; font-weight: 500; font-style: italic; color: var(--ivory); letter-spacing: -.01em; }
.logo-sub { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .42em; color: var(--brass); text-transform: uppercase; }
.user { display: flex; align-items: center; gap: 18px; color: var(--ivory-dim); font-size: 15px; margin: 0; }
.user button { background: none; border: 0; border-bottom: 1px solid var(--rule-strong); color: var(--ivory); padding: 2px 0; cursor: pointer; font: inherit; }
.user button:hover { border-color: var(--brass); color: var(--brass-light); }

/* ---------- Типографика ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 5.4vw, 64px); }
h2 { font-size: clamp(30px, 3.6vw, 42px); }
.eyebrow { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--brass-light); margin: 0 0 8px; }
.lead { color: var(--ivory-dim); max-width: 560px; margin: 16px 0 0; }
.muted { color: var(--ivory-dim); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brass); color: var(--green-deep); border: 1px solid var(--brass);
  padding: 16px 34px; border-radius: 0;
  font: 500 16px var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--brass-light); border-color: var(--brass-light); }
.btn.ghost { background: transparent; color: var(--ivory); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--brass); color: var(--brass-light); }
.btn.block { width: 100%; }

/* ---------- Каталог ---------- */
.hero { padding: 24px 0 56px; }
.hero h1 { font-size: clamp(46px, 7.4vw, 104px); font-style: italic; line-height: 1.02; max-width: 15ch; letter-spacing: -.02em; }
.hero .count { margin: 28px 0 0; color: var(--ivory-dim); display: flex; align-items: center; gap: 16px; }
.hero .count::before { content: ""; width: 48px; height: 1px; background: var(--brass); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 56px 32px; }
.car-card { text-decoration: none; display: flex; flex-direction: column; }
.car-card .img { aspect-ratio: 4/5; }
.car-card .img img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.car-card:hover .img img { transform: scale(1.025); }
.car-card .body { padding: 20px 0 0; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; }
.car-card h3 { font-size: 32px; grid-column: 1; transition: color .2s; }
.car-card .year { grid-column: 1; color: var(--ivory-dim); font-size: 15px; }
.car-card .price-tag { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 15px; color: var(--ivory-dim); }
.car-card .price-tag b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--brass-light); }
.car-card:hover h3 { color: var(--brass-light); }
.empty { padding: 96px 24px; text-align: center; color: var(--ivory-dim); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--serif); font-style: italic; font-size: 24px; }

/* Фото целиком: само фото по центру, вокруг — его размытая копия */
.photo-fit { position: relative; overflow: hidden; background: var(--green-deep); }
.photo-fit .bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(28px) brightness(.45) saturate(1.05); transform: scale(1.1); }
.photo-fit img { position: relative; width: 100%; height: 100%; object-fit: contain; }

/* ---------- Страница модели ---------- */
.back { color: var(--ivory-dim); text-decoration: none; font-size: 15px; display: inline-block; margin-bottom: 28px; }
.back:hover { color: var(--brass-light); }
.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 56px; align-items: start; }
.gallery .main { height: min(78vh, 780px); }
.gallery .main img { cursor: zoom-in; }
.gallery .main video { position: relative; width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery .main [hidden] { display: none; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(236, 229, 214, .35); background: rgba(10, 31, 26, .5); color: var(--ivory); font-family: var(--serif); font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; transition: background .2s, border-color .2s, color .2s; }
.nav:hover { background: rgba(10, 31, 26, .85); border-color: var(--brass); color: var(--brass-light); }
.nav.prev { left: 16px; } .nav.next { right: 16px; }
.counter { position: absolute; right: 16px; top: 16px; z-index: 2; background: rgba(10, 31, 26, .6); color: var(--ivory); font-size: 13px; letter-spacing: .06em; padding: 4px 12px; }
.counter:empty { display: none; }
.main.single .nav, .main.single ~ .thumbs { display: none; }
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 6); gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: thin; }
.thumbs button { position: relative; padding: 0; border: 1px solid transparent; background: none; cursor: pointer; aspect-ratio: 4/5; overflow: hidden; opacity: .5; transition: opacity .2s, border-color .2s; }
.thumbs button.on, .thumbs button:hover { opacity: 1; border-color: var(--brass); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.thumbs video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumbs .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ivory); font-size: 18px; background: rgba(10, 31, 26, .35); }

.side { position: sticky; top: 108px; padding-top: 4px; }
.side .year { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--brass-light); margin: 0 0 6px; }
.side h1 { font-size: clamp(40px, 4.4vw, 60px); }
.side .price { margin: 22px 0 28px; display: flex; align-items: baseline; gap: 10px; color: var(--ivory-dim); }
.side .price b { font-family: var(--serif); font-weight: 400; font-size: 38px; color: var(--brass-light); }
.price-request { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--brass-light); }
.specs { margin: 0 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.specs li span:first-child { color: var(--ivory-dim); }
.links { display: flex; flex-direction: column; margin: 0 0 28px; border-top: 1px solid var(--rule); }
.link-btn { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 16px; transition: color .2s; }
.link-btn span { color: var(--brass); }
.link-btn:hover { color: var(--brass-light); }

.about { margin-top: 64px; max-width: 680px; }
.about h2 { margin-bottom: 22px; font-style: italic; }
.desc { color: #d8d2c4; font-size: 18px; line-height: 1.75; }
.desc p { margin: 0 0 16px; }

/* Полноэкранный просмотр */
.lightbox { position: fixed; inset: 0; background: rgba(6, 18, 15, .96); display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--ivory); font-family: var(--serif); font-size: 44px; cursor: pointer; padding: 20px; opacity: .75; }
.lightbox button:hover { opacity: 1; color: var(--brass-light); }
.lb-close { top: 0; right: 0; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0; top: 50%; transform: translateY(-50%); }

/* ---------- Бронирование ---------- */
.narrow { max-width: 680px; margin: 0 auto; }
.panel { background: var(--green-soft); border: 1px solid var(--rule); padding: 44px; }
.steps { display: flex; gap: 10px; margin-bottom: 30px; font-size: 15px; color: var(--ivory-dim); }
.steps b { color: var(--brass-light); font-weight: 500; }
.car-mini { display: flex; gap: 20px; align-items: center; padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--rule); }
.car-mini img { width: 96px; aspect-ratio: 4/5; object-fit: cover; object-position: center top; }
.car-mini h2 { font-size: 34px; font-style: italic; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 15px; color: var(--ivory-dim); margin-bottom: 8px; }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong); color: var(--ivory); padding: 10px 0; font: 18px var(--sans); border-radius: 0; }
.field textarea { border: 1px solid var(--rule-strong); padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.field input[type=date] { color-scheme: dark; }
.errors { color: var(--danger); font-size: 14px; margin-top: 6px; }
.summary { margin: 0 0 32px; padding: 0; list-style: none; }
.summary li { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.summary li span:first-child { color: var(--ivory-dim); }
.summary li span:last-child { text-align: right; }
.summary .total span:last-child { font-family: var(--serif); font-size: 32px; color: var(--brass-light); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions .btn { flex: 1; }

.done { text-align: center; padding: 72px 36px; }
.done .mark { width: 72px; height: 72px; margin: 0 auto 28px; border: 1px solid var(--brass); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--brass-light); font-size: 30px; }
.done h2 { font-style: italic; }
.done p { color: var(--ivory-dim); max-width: 440px; margin: 18px auto 34px; }

/* ---------- Вход ---------- */
.login { max-width: 440px; margin: 32px auto; }
.login h1 { font-style: italic; margin-bottom: 8px; }
.login .note { color: var(--ivory-dim); margin: 0 0 34px; }

footer { border-top: 1px solid var(--rule); color: var(--ivory-dim); font-size: 14px; padding: 28px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
footer .logo-main { font-size: 20px; }

@media (max-width: 960px) {
  .detail { grid-template-columns: 1fr; gap: 36px; }
  /* на телефоне: фото → название, цена, бронь → описание */
  .detail > div:first-child { display: contents; }
  .gallery { order: 1; }
  .side { order: 2; position: static; }
  .about { order: 3; margin-top: 8px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  main { padding: 32px 0 72px; }
  .top .wrap { height: 64px; }
  .logo-main { font-size: 24px; }
  .logo-sub { font-size: 10px; letter-spacing: .3em; }
  .user .name { display: none; }
  .hero { padding: 8px 0 40px; }
  .grid { grid-template-columns: 1fr; gap: 44px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .panel { padding: 26px 20px; }
  .gallery .main { height: auto; aspect-ratio: 4/5; }
  .thumbs { grid-auto-columns: calc((100% - 24px) / 4); }
  .nav { width: 42px; height: 42px; font-size: 26px; }
  .nav.prev { left: 8px; } .nav.next { right: 8px; }
  .car-mini img { width: 72px; }
  .car-mini h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
