/* BIMMER — Tuning Studio Krasnodar
   Premium dark theme, BMW M-inspired accents */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-subtle: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #a8a8a8;
    --text-muted: #6a6a6a;
    --accent-red: #cc0000;
    --accent-blue: #0066b1;
    --accent-gold: #c9a96e;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 16px 48px rgba(204, 0, 0, 0.15);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-red); }

img { max-width: 100%; display: block; height: auto; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* === Header === */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--border-subtle);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo__accent {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--text-primary) 50%, var(--accent-red) 100%);
    border-radius: 50%;
    position: relative;
}

.logo__accent::after {
    content: '';
    position: absolute;
    inset: 6px;
    background: var(--bg-primary);
    border-radius: 50%;
}

.nav { display: flex; gap: 32px; }

.nav__link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav__link:hover, .nav__link.active { color: var(--text-primary); }

.header__cta {
    background: var(--accent-red);
    color: var(--text-primary);
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    transition: background var(--transition);
}

.header__cta:hover { background: #a00000; color: white; }

.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    background:
        linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.95) 100%),
        url('../img/hero/hero-1.jpg') center/cover no-repeat;
}

.hero__content { max-width: 760px; }

.hero__badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(204, 0, 0, 0.15);
    border: 1px solid rgba(204, 0, 0, 0.4);
    color: var(--accent-red);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 2px;
    margin-bottom: 24px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero__title-accent { color: var(--accent-red); }

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn--primary { background: var(--accent-red); color: white; }
.btn--primary:hover { background: #a00000; transform: translateY(-2px); color: white; }

.btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}
.btn--ghost:hover { background: var(--bg-card); border-color: var(--text-secondary); color: var(--text-primary); }

/* === Section === */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-secondary); }

.section__head { text-align: center; margin-bottom: 64px; }

.section__eyebrow {
    color: var(--accent-red);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section__lead {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 680px;
    margin: 0 auto;
}

/* === Cards grid === */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 32px;
    transition: all var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(204, 0, 0, 0.3);
}

.card__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: white;
    font-weight: 700;
}

.card__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.card__text { color: var(--text-secondary); font-size: 0.9375rem; }

.card__link {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.card__link::after {
    content: ' →';
    transition: transform var(--transition);
    display: inline-block;
}
.card__link:hover::after { transform: translateX(4px); }

/* === Page header (для внутренних страниц) === */
.page-head {
    padding: 160px 0 80px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.page-head__crumbs {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.page-head__crumbs a { color: var(--text-secondary); }
.page-head__crumbs a:hover { color: var(--accent-red); }

.page-head__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.page-head__lead {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 720px;
}

/* === Content block === */
.content { padding: 80px 0; }
.content__inner { max-width: 880px; margin: 0 auto; }
.content h2 { font-size: 2rem; margin: 48px 0 20px; font-weight: 700; }
.content h3 { font-size: 1.375rem; margin: 32px 0 14px; font-weight: 600; color: var(--text-primary); }
.content p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1.0625rem; }
.content ul, .content ol { color: var(--text-secondary); margin: 16px 0 16px 24px; }
.content ul li, .content ol li { margin-bottom: 8px; }
.content strong { color: var(--text-primary); }
.content a { color: var(--accent-red); border-bottom: 1px solid rgba(204,0,0,0.3); }
.content a:hover { border-color: var(--accent-red); }

.content-image {
    width: 100%;
    border-radius: 8px;
    margin: 32px 0;
    border: 1px solid var(--border-subtle);
}

/* === Pricing table === */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.pricing-table th {
    background: var(--bg-secondary);
    padding: 16px 20px;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-table .price {
    color: var(--accent-red);
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

/* === Stats === */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding: 60px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin: 48px 0;
}

.stat__number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-red);
    line-height: 1;
    margin-bottom: 8px;
}

.stat__label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === CTA block === */
.cta-block {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 64px;
    text-align: center;
    margin: 80px 0;
}

.cta-block__title { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.cta-block__text { color: var(--text-secondary); margin-bottom: 32px; max-width: 580px; margin-left: auto; margin-right: auto; }

@media (max-width: 600px) { .cta-block { padding: 40px 24px; } }

/* === Portfolio gallery === */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery__item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery__item:hover img { transform: scale(1.05); }

.gallery__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 20px 16px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
    color: white;
}
.gallery__caption-title { font-weight: 700; margin-bottom: 4px; }
.gallery__caption-meta { font-size: 0.8125rem; color: var(--text-secondary); }

/* === Reviews === */
.review {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 32px;
}
.review__stars { color: var(--accent-gold); margin-bottom: 12px; font-size: 1rem; }
.review__text { color: var(--text-primary); margin-bottom: 16px; font-style: italic; }
.review__author { color: var(--text-secondary); font-size: 0.875rem; }
.review__author strong { color: var(--text-primary); display: block; margin-bottom: 2px; }

/* === Form === */
.form { display: grid; gap: 16px; max-width: 520px; }
.form__field { display: grid; gap: 6px; }
.form__label { font-size: 0.875rem; color: var(--text-secondary); }
.form__input, .form__textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition);
}
.form__input:focus, .form__textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}
.form__textarea { min-height: 120px; resize: vertical; }

/* === Footer === */
.footer {
    background: var(--bg-secondary);
    padding: 64px 0 32px;
    border-top: 1px solid var(--border-subtle);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer__title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.footer__list { list-style: none; }
.footer__list li { margin-bottom: 10px; }
.footer__list a { color: var(--text-secondary); font-size: 0.9375rem; }
.footer__list a:hover { color: var(--accent-red); }

.footer__about { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; max-width: 320px; }

.footer__bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

@media (max-width: 800px) {
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__bottom { flex-direction: column; gap: 12px; }
}

/* === Mobile nav === */
@media (max-width: 920px) {
    .nav, .header__cta { display: none; }
    .menu-toggle { display: block; }
    .nav.open {
        display: flex;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-subtle);
    }
}

/* === Utilities === */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
