/* --- НАСТРОЙКИ ЦВЕТОВ --- */
:root {
    --hero-bg: #ffffff;
    --content-bg: #050505;
    --text-on-white: #1a1a1a;
    --text-on-black: #f0f0f0;
    --accent: #ff3b30;
    --border-dark: #222;
}

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

body, html {
    font-family: 'Manrope', sans-serif;
    background-color: var(--hero-bg);
    overflow-x: hidden;
    /* ВАЖНО: Убирает эффект "пружины" на iPhone, чтобы 3D не дергалось */
    overscroll-behavior: none; 
}

/* --- ШАПКА --- */
.glass-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
    transition: all 0.4s ease;
}

.logo-container {
    position: relative;
    width: 140px; 
    height: 40px;
    display: flex;
    align-items: center;
}

.logo-img {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
    transition: opacity 0.4s ease;
}

/* Логика смены логотипа */
.logo-black { opacity: 1; }
.logo-white { opacity: 0; }

.glass-header.scrolled .logo-black { opacity: 0; }
.glass-header.scrolled .logo-white { opacity: 1; }

nav { display: flex; gap: 30px; }
nav a {
    text-decoration: none; color: #555;
    font-size: 0.9rem; font-weight: 500; transition: color 0.3s;
}
nav a:hover { color: #000; }

/* КНОПКА */
.btn-contact {
    text-decoration: none; padding: 8px 20px;
    border: 1px solid #ccc; border-radius: 30px;
    color: var(--text-on-white); font-size: 0.85rem; transition: all 0.3s;
    white-space: nowrap;
    display: flex; align-items: center; justify-content: center;
}
.btn-contact:hover { background: #000; color: #fff; border-color: #000; }

/* СОСТОЯНИЕ ПРОКРУТКИ */
.glass-header.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 50px;
}
.glass-header.scrolled nav a { color: #aaa; }
.glass-header.scrolled nav a:hover { color: #fff; }
.glass-header.scrolled .btn-contact { border-color: #555; color: #fff; }
.glass-header.scrolled .btn-contact:hover { background: #fff; color: #000; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh; width: 100%;
    background: var(--hero-bg);
    position: relative; overflow: hidden;
}
.spline-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

.hero-overlay {
    position: absolute; bottom: 15%; left: 50px; z-index: 2; pointer-events: none;
}
.hero-overlay h1 {
    color: var(--text-on-white);
    font-size: 5rem; line-height: 1.1; font-weight: 400;
    letter-spacing: -0.04em; margin-bottom: 20px;
}
.red-text { color: var(--accent); }
.hero-overlay p { color: #555; font-size: 1.2rem; font-weight: 300; }

.scroll-hint {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: #000; opacity: 0.4; font-size: 0.8rem; text-transform: uppercase;
    animation: bounce 2s infinite; z-index: 5;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
}

/* --- DARK CONTENT --- */
.dark-content {
    background: var(--content-bg);
    color: var(--text-on-black);
    position: relative; z-index: 10;
    border-top-left-radius: 40px; border-top-right-radius: 40px;
    margin-top: -50px; padding-top: 100px;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }

h2 {
    font-size: 3rem; font-weight: 400; letter-spacing: -0.03em;
    margin-bottom: 50px; line-height: 1.2; color: #fff;
}
p { font-size: 1.1rem; line-height: 1.6; color: #888; font-weight: 300; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
        
.stat-item .number { font-size: 3.5rem; color: var(--accent); font-weight: 300; display: block; }
.stat-item .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; display: block; color: #666; }

/* УСЛУГИ */
.services-list { margin-top: 60px; border-top: 1px solid var(--border-dark); }
.service-row {
    display: grid; grid-template-columns: 0.5fr 2fr 1fr;
    padding: 50px 0; border-bottom: 1px solid var(--border-dark);
    transition: background 0.3s;
}
.service-row:hover { background: #0f0f0f; }
.srv-num { color: var(--accent); font-size: 1rem; }
.srv-info h3 { font-size: 2rem; font-weight: 400; margin-bottom: 15px; color: #fff; }
.srv-tags span {
    border: 1px solid #333; padding: 6px 14px; border-radius: 50px;
    font-size: 0.8rem; margin-left: 5px; color: #888;
}

/* ПРОЦЕСС */
.process-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.process-card {
    background: #0a0a0a; border: 1px solid var(--border-dark);
    padding: 40px; border-radius: 20px;
    transition: transform 0.3s, border-color 0.3s;
}
.process-card:hover { border-color: #333; transform: translateY(-10px); }
.p-num {
    font-size: 3rem; color: var(--accent); font-weight: 300;
    margin-bottom: 20px; opacity: 0.8;
}
.p-content h3 { font-size: 1.5rem; color: #fff; margin-bottom: 15px; }
.p-content p { font-size: 1rem; color: #777; }

/* CTA */
.cta-section { text-align: center; padding-bottom: 150px; padding-top: 50px; }
.btn-main {
    display: inline-block; background: #fff; color: #000;
    padding: 16px 40px; border-radius: 50px;
    text-decoration: none; font-size: 1rem;
    margin-top: 40px; transition: transform 0.3s, background 0.3s;
}
.btn-main:hover { background: var(--accent); color: #fff; transform: scale(1.05); }

/* FOOTER */
footer {
    background: #000; border-top: 1px solid var(--border-dark);
    padding: 80px 0; font-size: 0.9rem;
}
.footer-wrapper { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand { flex: 1; min-width: 250px; }
.footer-logo-img { height: 60px; width: auto; margin-bottom: 25px; display: block; }
.footer-brand p { color: #555; max-width: 300px; }
.footer-legal { flex: 1; min-width: 300px; text-align: right; }
.legal-text { color: #555; font-size: 0.75rem; line-height: 1.6; text-transform: uppercase; margin-bottom: 15px; }
.legal-text strong { color: #888; font-weight: 500; }

/* АДАПТИВ (MOBILE) */
@media (max-width: 768px) {
    .hero-overlay h1 { font-size: 3rem; }
    .grid-2, .service-row { grid-template-columns: 1fr; gap: 30px; }
    .process-grid { grid-template-columns: 1fr; }
    .srv-tags { display: none; }
    .glass-header { padding: 15px 15px; }
    .glass-header.scrolled { padding: 15px 15px; }
    nav { display: none; }
    .footer-wrapper, .footer-legal { text-align: left; flex-direction: column; }
    .logo-container { width: 110px; height: 30px; }
    .btn-contact { font-size: 0.75rem; padding: 0 16px; height: 36px; }
}