/* ===== BASE ===== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #FAFAFA;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== GLASS NAV ===== */
.glass-nav {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: #000;
    transition: width .4s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active { color: #000; }

/* ===== BURGER / MOBILE MENU ===== */
.burger span {
    display: block;
    width: 22px;
    height: 1px;
    background: #111;
    margin: 5px 0;
    transition: transform .3s ease, opacity .3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 1.25rem 2rem;
    font-size: 10px;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.mobile-menu a:hover { color: #000; }

/* ===== HERO ===== */
.hero-fullscreen {
    height: 100vh;
    min-height: 640px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,.12) 100%),
        url('./images/hero.avif');
    background-size: cover;
    background-position: center;
    background-color: #dfe3e8;
}

.hero-readability-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: brightness(.96);
    pointer-events: none;
}

/* ===== PAGE HEADER (для внутренних страниц) ===== */
.page {
    min-height: 100vh;
    padding-top: 160px;
    padding-bottom: 120px;
}

.page-title {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 300;
    letter-spacing: -.04em;
    line-height: .95;
}

/* ===== ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(5px);
    transition: opacity 1.2s cubic-bezier(.16,1,.3,1), transform 1.2s cubic-bezier(.16,1,.3,1), filter 1.2s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.hero-content {
    animation: fadeUp 1.6s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ===== NORDIC INPUT ===== */
.nordic-input {
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
    transition: border-color .4s ease, padding-left .4s ease;
    border-radius: 0;
}
.nordic-input:focus {
    border-color: #111827;
    padding-left: 8px;
    outline: none;
}
.nordic-input::placeholder { color: #d1d5db; }

/* ===== BUTTONS ===== */
.btn-line {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4em;
    font-weight: 700;
}
.btn-line .line {
    width: 3rem;
    height: 1px;
    background: #000;
    transition: width .5s ease;
}
.btn-line:hover .line { width: 5rem; }

.btn-solid {
    display: block;
    width: 100%;
    background: #000;
    color: #fff;
    padding: 1.5rem;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4em;
    font-weight: 700;
    transition: background .4s ease, transform .4s ease;
}
.btn-solid:hover { background: #1f2937; }

.btn-outline {
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .12);
    padding: .8rem 2rem;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .3em;
    transition: all .5s ease;
}
.btn-outline:hover { background: #000; color: #fff; border-color: #000; }

/* ===== FILTERS ===== */
.filter-btn {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .3em;
    font-weight: 700;
    color: #9ca3af;
    padding-bottom: .5rem;
    border-bottom: 1px solid transparent;
    transition: all .4s ease;
}
.filter-btn:hover { color: #111827; }
.filter-btn.active {
    color: #000;
    border-bottom-color: #000;
}

/* ===== CARDS ===== */
.car-card { cursor: pointer; }
.car-card .car-img {
    filter: grayscale(100%);
    transition: filter 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
}
.car-card:hover .car-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.img-fallback {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-fallback::after {
    content: 'АВТО';
    font-size: 11px;
    letter-spacing: .4em;
    color: #cbd5e1;
}

/* ===== ADVANTAGES ===== */
.adv-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    transition: border-color .5s ease;
}
.adv-item:hover { border-color: #000; }

/* ===== STEPS ===== */
.step-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}
.step-num {
    font-size: 3rem;
    font-weight: 300;
    font-style: italic;
    color: #e5e7eb;
    transition: color .5s ease;
}
.step-item:hover .step-num { color: #000; }

/* ===== REVIEWS ===== */
.review-card {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
}
.review-stars {
    color: #111827;
    letter-spacing: .3em;
    font-size: 11px;
}

/* ===== DETAIL (car) ===== */
.detail-section {
    display: none;
}
.detail-section.open {
    display: block;
    animation: fadeUp .8s cubic-bezier(.16,1,.3,1) forwards;
}

.spec-row {
    border-left: 1px solid #eee;
    padding-left: 2rem;
    position: relative;
}
.spec-row::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 1px;
    height: 40px;
    background: #000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

/* ===== NOTIFICATION ===== */
.notification {
    display: none;
    position: fixed;
    top: 120px;
    right: 30px;
    z-index: 1000;
    background: #000;
    color: #fff;
    padding: 1.5rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.notification.show { display: block; animation: fadeUp .5s ease forwards; }

/* ===== CALC SETTINGS WARNING ===== */
/* Empty while settings load fine, so the block disappears by itself */
.calc-warning:empty { display: none; }
.calc-warning {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border-left: 2px solid #dc2626;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 11px;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page { padding-top: 130px; padding-bottom: 80px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid > img:nth-child(2),
    .gallery-grid > img:nth-child(3) { margin: 0; }
}
