:root {
    --bg: #F7F7F7;          /* Светлый фон */
    --surface: #FFFFFF;     
    --text: #111111;        
    --text-muted: #666666;  
    --blue: #002FA7;        /* International Klein Blue */
    --danger: #E50914;      /* Для дефектов */
    --border: #E0E0E0;
    
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; cursor: none; }
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; cursor: none; }
button { border: none; background: none; cursor: none; }
.container { width: min(1300px, 92%); margin: 0 auto; }

/* =========================================
   КУРСОР (Уровень)
   ========================================= */
.cursor-level {
    width: 40px; height: 40px; border: 1px solid var(--blue); border-radius: 50%;
    position: fixed; top: 0; left: 0; 
    pointer-events: none !important; /* Клики проходят сквозь курсор */
    z-index: 9999999; /* Выше баннера */
    transform: translate(-50%, -50%);
}
.cursor-level::before, .cursor-level::after {
    content: ''; position: absolute; background: var(--blue);
}
.cursor-level::before { top: 50%; left: -10px; width: 60px; height: 1px; }
.cursor-level::after { left: 50%; top: -10px; width: 1px; height: 60px; }
@media (max-width: 1024px) { html, a, button { cursor: auto; } .cursor-level { display: none; } }

/* =========================================
   ШАПКА (Floating)
   ========================================= */
.header {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: min(1200px, 90%); z-index: 100;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: 50px;
    padding: 0.8rem 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.header__inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; }
.logo span { color: var(--blue); }
.nav { display: flex; gap: 2rem; }
.nav__link { font-weight: 600; font-size: 0.9rem; transition: color 0.3s; }
.nav__link:hover { color: var(--blue); }
.header__actions { display: flex; align-items: center; gap: 1.5rem; }
.header__phone { font-weight: 700; font-size: 1rem; }

/* Кнопки */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 0.8rem 1.8rem; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
    border-radius: 50px; transition: all 0.3s;
}
.btn--primary { background: var(--text); color: var(--surface); }
.btn--primary:hover { background: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 47, 167, 0.2); }
.btn--outline { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.6rem 1.5rem; font-size: 0.85rem; }

/* =========================================
   ГЕРОЙ И ЛУПА
   ========================================= */
.hero { padding: 12rem 0 8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero__badge { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; color: var(--blue); margin-bottom: 2rem; }
.hero__title { font-family: var(--font-display); font-size: clamp(3.5rem, 7vw, 6rem); line-height: 1.05; margin-bottom: 2rem; letter-spacing: -1px; }
.text-blue { color: var(--blue); }
.hero__desc { font-size: 1.2rem; color: var(--text-muted); max-width: 500px; margin-bottom: 3rem; }

.hero__visual { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.magnifier-container {
    width: 100%;
    height: 500px;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    cursor: none;
}

.magnifier-img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; top: 0; left: 0;
    pointer-events: none;
}

.magnifier-defects {
    position: absolute; inset: 0;
    clip-path: circle(0px at 50% 50%);
    z-index: 2;
}
.magnifier-defects .magnifier-img {
    filter: sepia(1) hue-rotate(320deg) saturate(3) contrast(1.2);
}

.defect-overlay {
    position: absolute; inset: 0;
    background-image: 
        linear-gradient(rgba(229, 9, 20, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(229, 9, 20, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}

.defect-mark {
    position: absolute;
    background: var(--danger);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 0 15px var(--danger);
    animation: pulseDefect 1.5s infinite alternate;
}
@keyframes pulseDefect {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); box-shadow: 0 0 25px var(--danger); }
}

.magnifier-lens {
    position: absolute;
    width: 200px; height: 200px;
    border: 3px solid var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.7),
                0 0 20px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 3;
    transform: translate(-50%, -50%);
    display: none;
}
.magnifier-lens::before, .magnifier-lens::after {
    content: ''; position: absolute; background: rgba(0, 47, 167, 0.5);
}
.magnifier-lens::before { top: 50%; left: 10%; width: 80%; height: 1px; }
.magnifier-lens::after { left: 50%; top: 10%; width: 1px; height: 80%; }

.magnifier-hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   СЕКЦИИ
   ========================================= */
.section { padding: 8rem 0; }
.section--gray { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__title { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }

/* =========================================
   STICKY REVEAL (Карта дефектов)
   ========================================= */
.reveal__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
.reveal__left { position: sticky; top: 150px; height: fit-content; }

.house-schema {
    margin-top: 3rem; background: var(--bg); border-radius: 24px; padding: 3rem;
    border: 1px solid var(--border);
}
.schema-svg { width: 100%; height: auto; }
.schema-marker {
    fill: var(--border); stroke: var(--text); stroke-width: 2;
    transition: all 0.4s ease;
}
.schema-marker.active {
    fill: var(--danger); stroke: var(--danger); r: 12;
    filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.5));
}

.reveal__right { display: flex; flex-direction: column; gap: 4rem; padding-top: 5rem; padding-bottom: 20rem; }
.reveal-block { opacity: 0.3; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.reveal-block.active { opacity: 1; transform: translateY(0); }
.reveal-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--blue); display: block; margin-bottom: 1rem; }
.reveal-block h3 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 1rem; }
.reveal-block p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

/* =========================================
   КАЛЬКУЛЯТОР УЩЕРБА
   ========================================= */
.section--calc {
    background: #FFFFFF;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8rem 0;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 4rem;
    border-bottom: 2px solid var(--text);
    padding-bottom: 2rem;
}
.calc-header .section__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    letter-spacing: -1px;
}
.calc-subtitle {
    max-width: 350px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    text-align: right;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.calc-options { display: flex; flex-direction: column; gap: 0; }
.calc-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.calc-item:first-child { border-top: 1px solid var(--border); }
.calc-item:hover { padding-left: 1rem; background: var(--bg); }
.calc-item input { position: absolute; opacity: 0; pointer-events: none; }
.calc-custom-check {
    width: 24px; height: 24px; border: 2px solid var(--text);
    border-radius: 4px; margin-right: 1.5rem; flex-shrink: 0;
    position: relative; transition: all 0.2s;
}
.calc-item input:checked ~ .calc-custom-check {
    background: var(--blue); border-color: var(--blue);
}
.calc-item input:checked ~ .calc-custom-check::after {
    content: '✓';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff; font-size: 1rem; font-weight: bold;
}
.calc-text { display: flex; flex-direction: column; gap: 0.2rem; }
.calc-text strong { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.calc-text em { font-style: normal; font-size: 0.9rem; color: var(--blue); font-weight: 500; }

.calc-item input:checked ~ .calc-text strong { color: var(--blue); }

.calc-result {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    position: sticky;
    top: 120px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}
.calc-result-inner { display: flex; flex-direction: column; gap: 1.5rem; }
.calc-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
.calc-sum {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: color 0.3s;
}
.calc-sum.active { color: var(--blue); }
.calc-currency { font-size: 2rem; font-weight: 600; }
.calc-note { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; font-style: italic; }
.calc-result .btn { margin-top: 1rem; }

/* =========================================
   КОНТАКТЫ
   ========================================= */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.contact__title { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem); line-height: 1; margin-bottom: 1.5rem; }
.contact__desc { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 3rem; max-width: 400px; }
.contact__phone { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; transition: color 0.3s; display: inline-block; }
.contact__phone:hover { color: var(--blue); }

.contact__right { display: flex; flex-direction: column; gap: 1rem; }

/* =========================================
   ПОДВАЛ И КУКИ
   ========================================= */
.footer { padding: 3rem 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); }
.footer__link:hover { color: var(--blue); }

.cookie-banner {
    position: fixed; bottom: -150px; left: 50%; transform: translateX(-50%);
    width: min(800px, 95%); background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem;
    z-index: 100000; /* Ниже курсора, чтобы курсор был поверх, но клики работали */
    transition: bottom 0.5s; box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.cookie-banner.show { bottom: 20px; }
.cookie-banner p { font-size: 0.9rem; }
.cookie-banner a { color: var(--blue); font-weight: 600; text-decoration: underline; }

/* =========================================
   АДАПТИВ
   ========================================= */
@media (max-width: 1024px) {
    .header { width: 95%; padding: 0.8rem 1rem; }
    .hero { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .hero__desc { margin-inline: auto; }
    .magnifier-container { height: 400px; cursor: auto; }
    .magnifier-lens { display: none; }
    
    .reveal__inner { grid-template-columns: 1fr; gap: 3rem; }
    .reveal__left { position: relative; top: 0; }
    .reveal__right { padding-top: 0; padding-bottom: 0; }
    .reveal-block { opacity: 1; transform: none; }
    
    .calc-grid { grid-template-columns: 1fr; gap: 2rem; }
    .calc-result { position: relative; top: 0; }
    .calc-header { flex-direction: column; align-items: flex-start; }
    .calc-subtitle { text-align: left; max-width: 100%; }
    
    .contact__inner { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 768px) {
    .nav, .header__phone { display: none; }
    .hero__title { font-size: 3rem; }
    .contact__phone { font-size: 2rem; }
    .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
    
    /* ФИКС КУКИ-БАННЕРА НА МОБИЛКАХ */
    .cookie-banner { 
        flex-direction: column; 
        text-align: center; 
        bottom: -300px; /* Прячем глубже, так как он становится выше */
    }
    .cookie-banner.show {
        bottom: 20px;
    }
    
    .calc-sum { font-size: 3rem; }
    .calc-item { padding: 1rem 0; }
    .calc-text strong { font-size: 1rem; }
}