/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
========================================= */
:root {
    --main-bg: #050505;
    --second-bg: #0a0a0a;
    --text-color: #ffffff;
    --muted-text: #cccccc;
    --gold: #c5a059;
    /* Светлее основного золота — подсветка ссылок при наведении */
    --gold-bright: #e5c07b;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Фото вставлены в <picture> (AVIF + запасной JPEG, templates/macros.html).
   Обёртка не создаёт своей коробки: стили работают с <img> как раньше */
picture {
    display: contents;
}

/* =========================================
   ШАПКА (HEADER) И МЕНЮ
========================================= */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px; 
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 100;
    background: transparent;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.7) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 20px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: 'Times New Roman', serif;
    font-size: 1.5em;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    flex: 1; 
    margin-left: 100px; /* Твой идеальный отступ */
    
    color: #ffffff;
    cursor: pointer;
    transition: all 0.6s ease; /* Плавный переход */
    position: relative;
    text-shadow: 0 0 0px rgba(197, 160, 89, 0);
}

/* Эффект мягкого золотого свечения и изменения цвета */
.logo:hover {
    color: #c5a059; /* Плавно меняем цвет на золото */
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.6); /* Мягкое сияние вокруг букв */
    letter-spacing: 4px; /* Буквы чуть-чуть раздвигаются, «дышат» */
}

/* Адаптация для VIP страницы (черный текст изначально) */
.vip-page .logo {
    color: #1a1a1a;
}

.vip-page .logo:hover {
    color: #c5a059;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
}

/* Логотип в шапке скрыт на всех страницах: название компании крупно
   показано на первом экране главной. Элемент остаётся в разметке как пустое
   место, чтобы меню и контакты не сдвигались. Вернуть логотип — удалить правило */
.header .logo {
    visibility: hidden;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex: 2; 
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    transition: 0.3s;
    white-space: nowrap;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    background-color: #e5c07b;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: var(--gold-bright);
}

.contacts {
    display: flex;
    flex-direction: column;
    text-align: right;
    flex: 1; 
    margin-right: 100px;
}

.contacts span {
    font-size: 0.85em;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* Номера и почта — ссылки: звонок и письмо. Выглядят как обычный текст
   и берут цвет у строки, в которой стоят */
.contacts a {
    position: relative;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contacts a:hover {
    color: var(--gold-bright);
}

/* На светлых страницах светлое золото на белом плохо читается */
.vip-page .contacts a:hover {
    color: var(--gold);
}

.contacts a:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 4px;
}

/* Подсказка после копирования адреса почты — справа от него,
   в свободном месте строки (появляется только на компьютере, script.js) */
.contacts a[data-copy]::after {
    content: 'Адрес скопирован';
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%);
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: var(--gold);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contacts a.is-copied::after {
    opacity: 1;
}

/* Кнопка мобильного меню — на широких экранах скрыта */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 -10px 0 12px;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
}

.vip-page .menu-toggle {
    color: #1a1a1a;
}

.menu-toggle:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 0;
    border-radius: 50%;
}

.menu-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Три полоски превращаются в крестик, когда меню открыто */
.header.menu-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header.menu-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.header.menu-open .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   ГЛАВНАЯ СТРАНИЦА (HERO) И РАЗМЫТИЕ
========================================= */
.hero {
    height: 100vh;
    background-color: #000;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.1)), url('../img/hero.jpg') center/cover no-repeat;
    /* AVIF втрое легче; имя копии задаёт tools/photos.swift (ширина в имени) */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.1)),
                image-set(url('../img/hero-1280w.avif') type('image/avif'), url('../img/hero.jpg') type('image/jpeg')) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.hero-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.2)), url('../img/hero.jpg') center/cover no-repeat;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.2)),
                image-set(url('../img/hero-1280w.avif') type('image/avif'), url('../img/hero.jpg') type('image/jpeg')) center/cover no-repeat;
    filter: blur(10px); 
    opacity: 0; 
    z-index: 1;
    transition: opacity 0.1s linear; 
}

.hero-content {
    position: relative;
    z-index: 2; 
}

/* Название компании на первом экране — тем же шрифтом, что логотип в шапке,
   с такими же пропорционально широкими промежутками между буквами */
.hero-content h1 {
    font-family: 'Times New Roman', serif;
    font-size: 4.5em;
    font-weight: normal;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
}

.hero-content .subtitle {
    font-size: 1em;
    font-weight: 300;
    letter-spacing: 2px;
    color: #b3b3b3;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* Мягкая тень — текст читается и на светлых участках фото (небо, белый автобус) */
.hero-content h1,
.hero-content .subtitle {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
}

.cta-button {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 15px 40px;
    font-size: 0.8em;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
}

.cta-button:hover {
    background-color: #ffffff;
    color: #000000;
}

/* =========================================
   СЕКЦИЯ О КОМПАНИИ 
========================================= */
.about-section {
    padding: 120px 20px;
    background-color: var(--second-bg);
    overflow: hidden; 
}

.about-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-heading span {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    font-weight: 300;
    font-family: 'Montserrat', sans-serif;
}

.about-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: var(--text-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 15px 0 30px;
    line-height: 1.2;
}

.gold-line {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 30px 0;
}

.premium-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 2; 
    color: var(--muted-text);
    margin-bottom: 25px;
}

.about-slogan {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--gold);
    margin-top: 50px;
    letter-spacing: 2px;
    font-style: italic;
    font-weight: 300;
}

/* =========================================
   СТРАНИЦА VIP МАШИН
========================================= */
.vip-page {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    font-family: 'Montserrat', sans-serif;
}
/* Белое размытие шапки при скролле только для VIP страницы */
.vip-page .header.scrolled {
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.vip-page .logo,
.vip-page .nav a,
.vip-page .contacts span {
    color: #1a1a1a !important;
}

.vip-page .nav a::after {
    background-color: #c5a059;
}

.vip-page .nav a:hover {
    color: #c5a059 !important;
}

.vip-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 150px 20px 60px; 
}

.vip-header {
    text-align: center;
    margin-bottom: 80px;
}

.vip-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 400;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.vip-header .subtitle {
    color: #c5a059;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
}

.vip-header .gold-line {
    margin: 30px auto; 
}

/* Карточка авто */
.car-card {
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 100px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.car-main-content {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 40px;
}

.car-image-main {
    flex: 1.5;
}

.car-image-main img {
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.car-details {
    flex: 1;
}

.car-details h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
}

.model-code {
    color: #c5a059;
    font-size: 18px;
    vertical-align: middle;
    white-space: nowrap; /* «20 мест», «Extra Long» не разрываются между строками */
}

.car-description {
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.car-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.car-features li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

/* «Забронировать» — ссылка на форму заявки с выбранной машиной.
   Раньше это была <button>, и браузер сам задавал ей шрифт (Arial 13.33px)
   и считал отступы внутри ширины. Ссылка этого не делает — поэтому шрифт
   и box-sizing заданы явно: вид прежний, на телефоне кнопка не вылезает
   за край при ширине 100% */
.btn-order {
    display: inline-block;
    box-sizing: border-box;
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 18px 40px;
    font: 400 13.3333px Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-order:hover {
    background: #c5a059;
}

/* Галерея */
.car-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Нечётная последняя фотография (одна из одной, третья из трёх) занимает
   всю ширину карточки, чтобы рядом с ней не оставалось пустого места */
.gallery-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 2px;
}

/* Фото целиком, без обрезки — класс car-gallery--whole у галереи.
   Обычные плитки выше режут снимок до 400px в высоту; здесь каждое фото
   показано полностью, в своих пропорциях. Высокий вертикальный снимок
   не растягивается на полтора экрана: не выше 720px, по центру. */
.car-gallery--whole .gallery-item img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 720px;
    aspect-ratio: auto;
    margin: 0 auto;
}

/* =========================================
   ПОДВАЛ
   Минимальный: кнопка «Наверх», место под лицензию и копирайт.
   Отделён от страницы золотой нитью, которая тает к краям.
========================================= */
.footer {
    position: relative;
    background: var(--main-bg);
    padding: 55px 20px 48px;
    text-align: center;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

/* Золотая нить сверху: ярче по центру, к краям сходит на нет */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 100%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.9), transparent);
}

/* Мягкое золотое свечение под нитью — подвал не сливается с тёмной страницей */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 100%);
    height: 90px;
    background: radial-gradient(ellipse at top, rgba(197, 160, 89, 0.14), transparent 70%);
    pointer-events: none;
}

.footer > * {
    position: relative;
    z-index: 1;
}

/* Кнопка «Наверх» — золотой круг со стрелкой, на отдельной строке */
.to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 30px;
    padding: 0;
    background: none;
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.35s ease;
}

.to-top svg {
    width: 20px;
    height: 20px;
    transition: transform 0.35s ease;
}

.to-top:hover {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.12);
}

.to-top:hover svg {
    transform: translateY(-3px);
}

.to-top:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 4px;
}

/* Надпись «Лицензия» в подвале — открывает окно с документом */
.license-open {
    display: inline-block;
    position: relative;
    margin-bottom: 28px;
    padding: 0;
    background: none;
    border: none;
    color: var(--gold);
    font-family: inherit;
    font-size: 15px;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s ease;
}

.license-open::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

/* При наведении надпись светлеет — как ссылки в меню */
.license-open:hover {
    color: var(--gold-bright);
}

.license-open:hover::after {
    opacity: 1;
}

.license-open:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 7px;
}

/* Окно с лицензией */
.license-modal {
    max-width: min(760px, 92vw);
    max-height: 92vh;
    padding: 0;
    border: none;
    background: none;
    overflow: visible;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.license-modal.is-open {
    opacity: 1;
    transform: none;
}

/* Затемнение и размытие страницы за окном */
.license-modal::backdrop {
    background: rgba(3, 3, 3, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
}

.license-modal.is-open::backdrop {
    background: rgba(3, 3, 3, 0.82);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.license-box {
    position: relative;
}

.license-modal img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid rgba(197, 160, 89, 0.5);
}

.license-caption {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: var(--muted-text);
}

.license-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(5, 5, 5, 0.72);
    border: 1px solid rgba(197, 160, 89, 0.5);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.license-close svg {
    width: 18px;
    height: 18px;
}

.license-close:hover {
    background: rgba(5, 5, 5, 0.9);
    border-color: var(--gold);
}

.license-close:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 3px;
}

/* Если в системе включено «уменьшить движение» — окно появляется без анимации */
@media (prefers-reduced-motion: reduce) {
    .license-modal {
        transition: none;
        transform: none;
        opacity: 1;
    }

    .license-modal::backdrop {
        transition: none;
    }
}

.footer-copyright {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7a7a7a;
}

/* Ссылка на политику — тише копирайта, золотом при наведении */
.footer-policy {
    display: inline-block;
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #5f5f5f;
    transition: color 0.3s ease;
}

.footer-policy:hover {
    color: var(--gold);
}

.footer-policy:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 4px;
}

/* =========================================
   РАЗДЕЛ В РАБОТЕ (Минивэны, Экскурсии)
========================================= */
.coming-soon {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px 0 70px;
    text-align: center;
}

.coming-soon .subtitle {
    display: block;
    margin-bottom: 15px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
}

.coming-soon h1 {
    margin: 0;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 48px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Золотая линия под заголовком медленно «дышит» */
.coming-soon .gold-line {
    margin: 30px auto;
    animation: line-breathe 3.5s ease-in-out infinite;
}

/* По надписи неспешно проходит золотая волна */
.coming-title {
    margin: 0;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 26px;
    letter-spacing: 1px;
    background: linear-gradient(100deg, #1a1a1a 30%, var(--gold) 50%, #1a1a1a 70%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gold-wave 5s linear infinite;
}

.coming-dots i {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: dot-fade 1.6s ease-in-out infinite;
}

.coming-dots i:nth-child(2) {
    animation-delay: 0.25s;
}

.coming-dots i:nth-child(3) {
    animation-delay: 0.5s;
}

.coming-note {
    margin: 26px 0 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.9;
    color: #555;
}

@keyframes gold-wave {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}

@keyframes dot-fade {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}

@keyframes line-breathe {
    0%, 100% { width: 60px; opacity: 0.65; }
    50% { width: 110px; opacity: 1; }
}

/* Если в системе включено «уменьшить движение» — показываем без анимации */
@media (prefers-reduced-motion: reduce) {
    .coming-title,
    .coming-dots i,
    .coming-soon .gold-line {
        animation: none;
    }

    .coming-title {
        background: none;
        color: #1a1a1a;
    }
}

/* =========================================
   СТРАНИЦЫ ОШИБОК (404, 500)
========================================= */
.error-page {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 180px 20px 100px;
    max-width: 700px;
    margin: 0 auto;
}

.error-code {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 96px;
    line-height: 1;
    color: var(--gold);
    letter-spacing: 4px;
}

.error-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 20px 0 0;
}

.error-page .gold-line {
    margin: 30px auto;
}

.error-text {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.9;
    color: var(--muted-text);
    margin: 0 0 10px;
}

.error-phone {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 24px;
    color: var(--gold);
    letter-spacing: 2px;
    margin: 20px 0 0;
}

.error-phone a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.error-phone a:hover {
    color: var(--gold-bright);
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

/* Кнопка-ссылка: тот же вид, что и у .cta-button на главной */
a.cta-button {
    display: inline-block;
    text-decoration: none;
}

/* =========================================
   ЗАЯВКА (/zakaz)
   Тёмная, как главная. Поля — тонкие рамки, золото при фокусе.
========================================= */
.order-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 180px 20px 100px;
}

.order-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 40px;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    margin: 0;
}

.order-page > .gold-line {
    margin: 30px auto;
}

.order-lead {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.8;
    color: var(--muted-text);
    text-align: center;
    margin: 0 0 50px;
}

/* Общая беда над формой: письмо не ушло, слишком много заявок, ошибки в полях */
.order-alert {
    margin: 0 0 30px;
    padding: 16px 20px;
    border: 1px solid rgba(229, 115, 115, 0.5);
    background: rgba(229, 115, 115, 0.08);
    color: #f2b8b5;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

.order-alert a {
    color: var(--gold-bright);
    text-decoration: none;
    white-space: nowrap;
}

.order-form {
    /* Календарь и часы в полях даты и времени — тёмные, в тон странице */
    color-scheme: dark;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

.order-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 20px;
}

.order-field {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.order-field--half {
    grid-column: span 3;
}

.order-field--third {
    grid-column: span 2;
}

.order-field label {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted-text);
}

.order-required {
    color: var(--gold);
}

/* Подсказка над парой «телефон или почта»; если не указано ни то ни другое —
   становится сообщением об ошибке */
.order-contact-hint {
    grid-column: 1 / -1;
    margin: 0 0 -8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted-text);
}

.order-contact-hint.has-error {
    color: #f2b8b5;
}

.order-field input,
.order-field select,
.order-field textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    padding: 14px 16px;
    font-family: inherit;
    /* Меньше 16px нельзя: айфон увеличивает страницу при касании поля */
    font-size: 16px;
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.order-field textarea {
    min-height: 120px;
    line-height: 1.6;
    resize: vertical;
}

.order-field input::placeholder,
.order-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.order-field input:hover,
.order-field select:hover,
.order-field textarea:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background-color: rgba(255, 255, 255, 0.06);
}

/* Список машин: своя золотая стрелка вместо системной */
.order-field select {
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c5a059' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.order-field option,
.order-field optgroup {
    background-color: #111111;
    color: var(--text-color);
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: #e57373;
}

.order-error {
    font-size: 13px;
    line-height: 1.5;
    color: #f2b8b5;
}

.order-consent {
    margin-top: 30px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted-text);
}

.order-consent label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.order-consent input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--gold);
    cursor: pointer;
}

.order-consent .order-error {
    display: block;
    margin: 8px 0 0 30px;
}

.order-submit {
    display: block;
    margin: 40px auto 0;
    padding: 18px 56px;
    font-family: inherit;
    font-size: 13px;
}

/* Пока заявка уходит, кнопка заблокирована — от двойного нажатия (script.js) */
.order-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.order-note {
    margin: 20px 0 0;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

/* Ловушка для ботов: за пределами экрана */
.order-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Ссылки на согласие и политику у галочки */
.order-consent a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(197, 160, 89, 0.4);
    text-underline-offset: 3px;
}

.order-consent a:hover {
    color: var(--gold-bright);
}

/* =========================================
   ПОЛИТИКА И СОГЛАСИЕ (/politika, /soglasie)
   Длинный текст на тёмном фоне: узкая колонка, крупный межстрочный
========================================= */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 180px 20px 100px;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted-text);
}

.legal-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 1px;
    text-align: center;
    color: var(--text-color);
    margin: 0;
}

.legal-page > .gold-line {
    margin: 30px auto;
}

.legal-revision {
    margin: 0 0 50px;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

.legal-page h2 {
    margin: 44px 0 14px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-color);
}

.legal-page p,
.legal-page ul {
    margin: 0 0 14px;
}

.legal-page ul {
    padding-left: 22px;
}

.legal-page li {
    margin-bottom: 6px;
}

.legal-page strong {
    font-weight: 400;
    color: var(--text-color);
}

.legal-page a {
    color: var(--gold);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.legal-page a:hover {
    color: var(--gold-bright);
}

/* Галочка на странице «Заявка отправлена» */
.order-thanks-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
    color: var(--gold);
}

/* =========================================
   АНИМАЦИИ
========================================= */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.hero-content.fade-in {
    animation: fadeInUp 1s forwards 0.5s; 
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-right {
    transform: translateX(60px);
}

.slide-left {
    transform: translateX(-60px);
}

.premium-text.second-p {
    transition-delay: 0.2s;
}

.about-slogan {
    transition-delay: 0.4s;
}

/* =========================================
   АДАПТИВНОСТЬ
========================================= */

/* Ноутбуки до 1439px: шапка остаётся в одну строку,
   но с меньшими отступами — иначе меню и контакты не помещаются */
@media (max-width: 1439px) {
    .logo {
        margin-left: 30px;
    }

    .contacts {
        margin-right: 30px;
    }

    .nav {
        gap: 14px;
    }

    .nav a {
        font-size: 13px;
    }

    /* Карточки, которые «выезжают» сбоку, до появления сдвинуты на 60px
       и на узких экранах торчали за край — страницу можно было сдвинуть вбок */
    .vip-container {
        overflow-x: hidden;
        overflow-x: clip;
    }
}

/* ПК от 1280px: контакты тонкой строкой над меню, меню ровно по центру.
   На планшетах и телефонах контакты внизу полноэкранного меню */
@media (min-width: 1280px) {
    .header,
    .header.scrolled {
        flex-wrap: wrap;
        padding-top: 0;
    }

    .header {
        padding-bottom: 20px;
    }

    .header.scrolled {
        padding-bottom: 14px;
    }

    /* Логотип скрыт на всех страницах; на ПК он не занимает места,
       чтобы меню встало ровно по центру */
    .header .logo {
        display: none;
    }

    .nav {
        flex: 1 1 100%;
    }

    .contacts {
        order: -1;
        flex: 1 1 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin: 0 0 18px;
        padding: 11px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        text-align: center;
        transition: margin 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header.scrolled .contacts {
        margin-bottom: 12px;
        padding: 8px 0;
    }

    .vip-page .contacts {
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }

    .contacts span {
        margin: 0;
        font-size: 15px;
        letter-spacing: 1.2px;
    }

    /* Золотые точки между контактами — кружки, а не символ: чётче на любом фоне
       и не зачитываются экранными дикторами */
    .contacts span + span::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        margin: 0 18px;
        border-radius: 50%;
        background: var(--gold);
        vertical-align: middle;
    }
}

/* Появление пунктов мобильного меню */
@keyframes menu-item-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

/* Планшеты и телефоны до 1279px: компактная шапка с кнопкой меню */
@media (max-width: 1279px) {
    .header,
    .header.scrolled {
        left: 0;
        transform: none;
        max-width: none;
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .logo {
        flex: 1;
        margin: 0;
        font-size: 1.3em;
        letter-spacing: 2px;
    }

    /* На сенсорных экранах «наведение» залипает после касания —
       не даём буквам логотипа раздвигаться */
    .logo:hover {
        letter-spacing: 2px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav,
    .contacts {
        display: none;
    }

    /* ---------- Открытое меню: на весь экран, в фирменном тёмном стиле ----------
       Одинаковое на всех страницах, в том числе на светлых (VIP, Микроавтобусы).
       .vip-page в селекторе нужен: правило «прокрученная шапка на светлой
       странице» (.vip-page .header.scrolled) тоже !important и точнее простого
       .header.menu-open — без этого после прокрутки меню получало полупрозрачный
       белый фон и сквозь него просвечивала страница */
    .header.menu-open,
    .vip-page .header.menu-open {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "logo     toggle"
            "nav      nav"
            "contacts contacts";
        height: 100vh;
        height: 100dvh;
        padding-bottom: max(30px, env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #0a0a0a !important;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .header.menu-open .logo {
        grid-area: logo;
        color: #ffffff !important;
    }

    .header.menu-open .menu-toggle {
        grid-area: toggle;
        color: #ffffff;
    }

    .header.menu-open .nav {
        grid-area: nav;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 30px 0;
    }

    .header.menu-open .nav a {
        display: block;
        padding: 8px 0;
        font-family: 'Playfair Display', 'Times New Roman', serif;
        font-size: clamp(26px, 7.5vw, 36px);
        line-height: 1.25;
        letter-spacing: 0.5px;
        text-transform: none;
        white-space: normal;
        color: #ffffff !important;
        animation: menu-item-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    .header.menu-open .nav a:nth-child(2) { animation-delay: 0.05s; }
    .header.menu-open .nav a:nth-child(3) { animation-delay: 0.1s; }
    .header.menu-open .nav a:nth-child(4) { animation-delay: 0.15s; }
    .header.menu-open .nav a:nth-child(5) { animation-delay: 0.2s; }
    .header.menu-open .nav a:nth-child(6) { animation-delay: 0.25s; }

    /* Подчёркивание при наведении — только для ПК */
    .header.menu-open .nav a::after {
        display: none;
    }

    .header.menu-open .nav a:hover,
    .header.menu-open .nav a[aria-current="page"] {
        color: var(--gold) !important;
    }

    .header.menu-open .contacts {
        grid-area: contacts;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        text-align: left;
        animation: menu-item-in 0.5s 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    /* Короткая золотая линия — тот же акцент, что под заголовками сайта */
    .header.menu-open .contacts::before {
        content: '';
        width: 60px;
        height: 2px;
        margin-bottom: 24px;
        background: var(--gold);
    }

    .header.menu-open .contacts span {
        font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
        font-size: 16px;
        letter-spacing: 1px;
        margin-bottom: 10px;
        color: var(--gold) !important;
    }

    .header.menu-open .contacts span:last-child {
        margin-bottom: 0;
        color: var(--muted-text) !important;
    }

    /* Строка номера всего ~20px в высоту — пальцем легко промахнуться.
       Отступы расширяют область нажатия до 30px, а отрицательные поля
       возвращают строки на прежние места: вёрстка меню не меняется */
    .header.menu-open .contacts a {
        display: inline-block;
        padding: 5px 0;
        margin: -5px 0;
    }

    /* Пока меню открыто, страница под ним не прокручивается */
    html.menu-lock,
    html.menu-lock body {
        overflow: hidden;
    }
}

@media (max-width: 1279px) and (prefers-reduced-motion: reduce) {
    .header.menu-open .nav a,
    .header.menu-open .contacts {
        animation: none;
    }
}

/* Планшеты до 992px: карточки и блок «О компании» в одну колонку */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .gold-line {
        margin: 30px auto;
    }

    .car-main-content {
        flex-direction: column;
        align-items: stretch;
    }

    .car-gallery {
        grid-template-columns: 1fr;
    }
}

/* Телефоны до 768px */
@media (max-width: 768px) {
    /* svh учитывает панели браузера на iPhone; старые браузеры возьмут vh */
    .hero {
        height: 100vh;
        height: 100svh;
    }

    .hero-content h1 {
        font-size: clamp(2em, 9vw, 4.5em);
    }

    .about-section {
        padding: 80px 20px;
    }

    .about-heading h2 {
        font-size: clamp(26px, 7.5vw, 42px);
    }

    .about-slogan {
        font-size: 20px;
        margin-top: 35px;
    }

    .vip-container {
        padding: 110px 16px 40px;
    }

    .vip-header {
        margin-bottom: 50px;
    }

    .vip-header h1 {
        font-size: clamp(24px, 8vw, 48px);
        letter-spacing: 1px;
    }

    /* Страховка: если длинное слово всё же не влезет — перенести, а не обрезать */
    .vip-header h1,
    .about-heading h2,
    .car-details h2,
    .error-title {
        overflow-wrap: break-word;
    }

    .car-card {
        padding: 20px;
        margin-bottom: 40px;
    }

    .car-main-content {
        gap: 24px;
        margin-bottom: 24px;
    }

    .car-details h2 {
        font-size: clamp(24px, 6.5vw, 32px);
        margin: 0 0 15px;
    }

    .model-code {
        font-size: 16px;
    }

    .btn-order {
        width: 100%;
        padding: 16px 20px;
    }

    /* Фото галереи в пропорции 4:3 вместо узкой полосы высотой 400px */
    .gallery-item img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .error-page {
        padding: 120px 16px 60px;
    }

    .order-page,
    .legal-page {
        padding: 120px 16px 60px;
    }

    .legal-title {
        font-size: clamp(22px, 6.5vw, 32px);
    }

    .order-title {
        font-size: clamp(24px, 7vw, 40px);
    }

    .order-lead {
        margin-bottom: 36px;
    }

    .order-field--half {
        grid-column: span 6;
    }

    /* Дата и время — рядом, пассажиры — отдельной строкой */
    .order-field--third {
        grid-column: span 3;
    }

    .order-field--count {
        grid-column: span 6;
    }

    .order-submit {
        width: 100%;
        padding: 18px 20px;
    }

    .error-code {
        font-size: 72px;
    }

    .error-title {
        font-size: clamp(22px, 6vw, 32px);
    }

    /* Блоки появляются снизу, а не сбоку — без горизонтальной прокрутки */
    .slide-left,
    .slide-right {
        transform: translateY(30px);
    }

    .footer {
        padding: 45px 20px 40px;
    }

    .coming-soon h1 {
        font-size: clamp(26px, 8vw, 48px);
    }

    .coming-title {
        font-size: clamp(20px, 5.5vw, 26px);
    }
}
