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

body {
    background-color: var(--background);
    font-family: var(--font-family);
    color: var(--text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* smooth section transitions */
section {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.8s ease;
}
section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    background: rgba(0,0,0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s, padding 0.3s;
    border-bottom: 1px solid rgba(188,164,119, 0.2);
}
.navbar.scrolled {
    padding: 0.8rem 2rem;
    background: rgba(0,0,0, 0.9);
    border-bottom-color: rgba(188,164,119, 0.5);
}
.logo {
    font-family: var(--font-family);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-links {
    display: flex;
    gap: 2.2rem;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: 0.25s;
    letter-spacing: 0.3px;
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}
.menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
}

/* hero section с фоновым видео */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 112px 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Видео фон */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(1.05) contrast(1.03);
    transition: transform 0.3s ease;
}

/* Затемняющий градиент поверх видео */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 43%, rgba(0,0,0,.60) 0%, rgba(0,0,0,.32) 65%, rgba(0,0,0,.42) 100%);
    z-index: 1;
}

/* Дополнительная текстура поверх видео */
.hero::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    text-align: center;
    z-index: 3;
    max-width: 900px;
    width: 100%;
    min-width: 0;
    padding: 0 1.5rem;
    position: relative;
}
.hero h1 {
    font-size: 4.2rem;
    font-family: var(--font-family);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #d2bd94, var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 5s linear infinite;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
}
@keyframes shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.hero p {
    font-size: 1.2rem;
    margin: 1.5rem 0 2rem;
    color: var(--text);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
    font-weight: 500;
}
.btn-glow {
    display: inline-block;
    background: linear-gradient(95deg, var(--accent), #a58d60);
    padding: 1rem 2.4rem;
    border-radius: 40px;
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s;
    box-shadow: 0 5px 15px rgba(188,164,119, 0.4);
    border: none;
    cursor: pointer;
}
.btn-glow:hover {
    transform: scale(1.05);
    background: linear-gradient(95deg, var(--accent-hover), var(--accent));
    box-shadow: 0 10px 25px rgba(188,164,119, 0.6);
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(188,164,119,0.3);
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-family);
    color: var(--accent);
}

/* container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-title {
    font-size: 2.8rem;
    font-family: var(--font-family);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* services grid с изображениями */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.service-card {
    background: rgba(16,18,17, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 28px;
    padding: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(188,164,119, 0.2);
    text-align: center;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: rgba(21,35,29, 0.8);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.4);
}

/* Обертка для изображения */
.service-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Иконка поверх изображения */
.service-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* По умолчанию на мобильных — изображение всегда видно */
.service-image {
    opacity: 1;
}

/* На компьютерах — изображение скрыто, показывается при наведении */
@media (min-width: 769px) {
    .service-image {
        opacity: 0;
        transform: scale(1.05);
    }
    
    .service-card:hover .service-image {
        opacity: 1;
        transform: scale(1);
    }
    
    .service-card:hover .service-icon-overlay {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    
    .service-icon-overlay {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

/* На мобильных — иконка становится меньше и смещается вверх, изображение видно */
@media (max-width: 768px) {
    .service-image {
        opacity: 1;
    }
    
    .service-icon-overlay {
        font-size: 2rem;
        top: 15px;
        left: 15px;
        transform: translate(0, 0);
        background: rgba(0,0,0,0.5);
        padding: 8px 12px;
        border-radius: 30px;
        backdrop-filter: blur(4px);
    }
    
    .service-card:hover .service-icon-overlay {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.service-card h3 {
    font-size: 1.6rem;
    margin: 1rem 0 0.5rem;
    padding: 0 1rem;
}

.service-card p {
    padding: 0 1rem 1.5rem;
    color: var(--text-muted);
}

/* gallery / before-after style */
.gallery-wrap {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}
.card-ba {
    background: var(--surface);
    border-radius: 32px;
    overflow: hidden;
    width: 300px;
    transition: 0.3s;
    border: 1px solid var(--border);
}
.card-ba:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}
.ba-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.ba-label {
    position: absolute;
    background: #000000aa;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}
.card-ba p {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
}

/* why us */
.features-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}
.feature {
    background: rgba(16,18,17, 0.8);
    border-radius: 2rem;
    padding: 1.5rem;
    width: 220px;
    text-align: center;
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
}
.feature i {
    font-size: 2.5rem;
    color: var(--accent);
}

/* form section */
.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    background: var(--surface);
    border-radius: 2.5rem;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
}
.form-group {
    flex: 1;
}
input, textarea, select {
    width: 100%;
    padding: 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    color: white;
    font-size: 1rem;
    transition: 0.2s;
    margin-bottom: 1rem;
    font-family: inherit;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(188,164,119,0.3);
}
.btn-submit {
    background: var(--accent);
    width: 100%;
    padding: 1rem;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: 0.2s;
}
.contact-info {
    flex: 0.8;
    background: var(--background);
    border-radius: 2rem;
    padding: 1.8rem;
}
.contact-info i {
    margin-right: 0.8rem;
    width: 30px;
    color: var(--accent);
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    margin-top: 3rem;
}

@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        background: #000000f5;
        backdrop-filter: blur(20px);
        width: 70%;
        height: 100vh;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.3s;
        border-right: 1px solid var(--accent);
    }
    .nav-links.active {
        left: 0;
    }
    .menu-btn {
        display: block;
    }
    .hero h1 {
        font-size: clamp(1.8rem, 7.8vw, 2.4rem);
        line-height: 1.15;
    }
    .section-title {
        font-size: 2rem;
    }
    .stat-item {
        padding: 0.3rem 0.9rem;
    }
    .hero-stats {
        gap: 0.75rem;
        margin-top: 2rem;
    }
}

/* floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}
.particle {
    position: absolute;
    background: rgba(188,164,119,0.4);
    border-radius: 50%;
    animation: float 14s infinite ease-in-out;
}
@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 0.6; }
    80% { opacity: 0.5; }
    100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* Адаптация видео на мобильных */
@media (max-width: 768px) {
    .hero-video {
        object-fit: cover;
        transform: scale(1.02);
    }
    .hero-overlay {
        background: radial-gradient(ellipse at 50% 43%, rgba(0,0,0,.66) 0%, rgba(0,0,0,.38) 70%, rgba(0,0,0,.46) 100%);
    }
    .hero p {
        font-size: 1rem;
    }
}

/* why us section с фоновым видео */
.why-section {
    position: relative;
    overflow: hidden;
}

/* Фоновое видео для блока Почему Perspectiva */
.why-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.5) blur(1px);
    opacity: 0.6;
}

/* Затемняющий overlay поверх видео */
.why-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0, 0.85) 0%, rgba(0,0,0, 0.9) 100%);
    z-index: 1;
}

/* Стили для карточек внутри why-section */
.why-section .features-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.why-section .feature {
    background: rgba(16,18,17, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 2rem;
    padding: 1.5rem;
    width: 220px;
    text-align: center;
    border: 1px solid rgba(188,164,119, 0.3);
    transition: all 0.3s ease;
}

.why-section .feature:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: rgba(21,35,29, 0.85);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.5);
}

.why-section .feature i {
    font-size: 2.5rem;
    color: var(--accent);
}

.why-section .feature h3 {
    margin: 0.8rem 0 0.5rem;
    font-size: 1.3rem;
}

.why-section .feature p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.why-section .section-title,
.why-section .section-sub {
    position: relative;
    z-index: 2;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .why-video {
        filter: brightness(0.35) blur(1px);
        opacity: 0.5;
    }
    
    .why-overlay {
        background: linear-gradient(135deg, rgba(0,0,0, 0.9) 0%, rgba(0,0,0, 0.95) 100%);
    }
    
    .why-section .feature {
        width: 100%;
        max-width: 280px;
        backdrop-filter: blur(12px);
    }
}


/* Gallery / before-after section with grayscale to color effect */
.gallery-wrap {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.card-ba {
    background: var(--surface);
    border-radius: 32px;
    overflow: hidden;
    width: 300px;
    transition: 0.3s;
    border: 1px solid var(--border);
}

.card-ba:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

/* Эффект для изображений: изначально черно-белые, при наведении цветные */
.ba-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: filter 0.4s ease;
    filter: grayscale(100%) brightness(.88);
}

/* При наведении на карточку - изображение становится цветным */
.card-ba:hover .ba-img {
    filter: grayscale(0%) brightness(1.12) contrast(1.04);
}

.ba-label {
    position: absolute;
    background: #000000aa;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

/* При наведении на карточку - лейбл становится более ярким */
.card-ba:hover .ba-label {
    background: #bca477aa;
}

.card-ba p {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
}

/* На мобильных устройствах изображения цветные по умолчанию */
@media (max-width: 768px) {
    .ba-img {
        filter: grayscale(0%) brightness(1.12) contrast(1.04);
    }
    
    /* На мобильных лейбл тоже становится акцентным */
    .ba-label {
        background: #bca477aa;
    }
}
/* British racing green and warm brass: quiet highlights, clear contrast. */
.logo { background: none; color: var(--text); -webkit-text-fill-color: var(--text); }
.hero h1 { background: none; color: var(--text); -webkit-text-fill-color: var(--text); animation: none; }
.btn-glow, .btn-submit { color: var(--background); box-shadow: none; }
.btn-glow:hover, .btn-submit:hover { background: var(--accent-hover); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ba-label { color: var(--text); }
.card-ba:hover .ba-label { color: var(--background); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 4px; }
@media (max-width: 768px) { .ba-label { color: var(--background); } }

.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.65); }
.hero p { text-shadow: 0 2px 12px rgba(0,0,0,.85); }

.feature p { color: var(--text-muted); line-height: 1.65; margin-top: .75rem; }
.feature { width: 300px; }
.feature h3 { margin-top: .8rem; }
.contact-info p { margin-top: 1rem; line-height: 1.6; }
.contact-info a { color: var(--accent); text-underline-offset: 4px; }
.contact-map { margin-top: 1.5rem; }
.map-frame { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.map-frame iframe { display: block; border: 0; width: 100%; height: 280px; }
.contact-map .map-note { color: var(--text-muted); font-size: .8rem; line-height: 1.5; margin: .75rem 0; }
.map-link { display: inline-block; font-size: .85rem; }

.gallery-more { margin: 2.5rem auto 0; max-width: 720px; text-align: center; padding-top: 2rem; border-top: 1px solid var(--border); }
.gallery-more h3 { font-size: 1.4rem; line-height: 1.4; }
.gallery-more p { margin: .75rem 0 1.5rem; color: var(--text-muted); line-height: 1.65; }
.gallery-more .btn-glow i { margin-right: .5rem; }

.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-status { font-size: .9rem; line-height: 1.6; color: var(--text-muted); }
.form-status:not(:empty) { margin-top: 1rem; }
.form-status[data-state="success"] { color: var(--accent-hover); }
.form-status[data-state="error"] { color: #edb7a8; }
.btn-submit:disabled { opacity: .65; cursor: wait; }
