/* ============================================================
   МЕХАНИКА ПОКОЯ — FINAL HOUSE INTEGRATION V10
   Fixes the hero geometry, image position, section overlap
   and responsive behaviour. V9 animation logic is retained.
   ============================================================ */

:root {
    --mp-v10-x: 0px;
    --mp-v10-y: 0px;
    --mp-v10-tilt-x: 0deg;
    --mp-v10-tilt-y: 0deg;
}

/* ---------- HEADER DENSITY ---------- */

@media (min-width: 1181px) {
    body.mp-v10-active .site-header,
    body.mp-v10-active .header {
        height: 92px !important;
        min-height: 92px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* ---------- HERO GEOMETRY ---------- */

body.mp-v10-active .hero {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@media (min-width: 1181px) {
    body.mp-v10-active .hero {
        display: grid !important;
        grid-template-columns:
            minmax(500px, 34%)
            minmax(0, 66%) !important;
        height: clamp(390px, 23.2vw, 440px) !important;
        min-height: 390px !important;
        max-height: 440px !important;
        align-items: stretch !important;
    }

    body.mp-v10-active .hero-left,
    body.mp-v10-active .hero-copy,
    body.mp-v10-active .hero__content {
        position: relative !important;
        z-index: 30 !important;
        min-width: 0 !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 28px 22px 18px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        background:
            linear-gradient(
                90deg,
                rgba(2, 9, 16, 1) 0%,
                rgba(2, 9, 16, .985) 78%,
                rgba(2, 9, 16, .53) 100%
            ) !important;
    }

    body.mp-v10-active .hero .eyebrow {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
    }

    body.mp-v10-active .hero h1 {
        max-width: 650px !important;
        margin: 0 !important;
        font-size: clamp(48px, 3.05vw, 58px) !important;
        line-height: 1.02 !important;
        letter-spacing: -.043em !important;
        white-space: normal !important;
    }

    body.mp-v10-active .hero h1 span,
    body.mp-v10-active .hero h1 .light {
        line-height: 1.02 !important;
    }

    body.mp-v10-active .hero-text,
    body.mp-v10-active .hero-copy > p,
    body.mp-v10-active .hero__content > p {
        max-width: 590px !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
        font-size: clamp(13px, .82vw, 15px) !important;
        line-height: 1.55 !important;
    }

    body.mp-v10-active .hero-actions,
    body.mp-v10-active .hero-cta {
        margin-top: 19px !important;
        margin-bottom: 0 !important;
    }

    body.mp-v10-active .hero-tags,
    body.mp-v10-active .trust-row,
    body.mp-v10-active .values {
        margin-top: 19px !important;
        margin-bottom: 0 !important;
    }
}

/* ---------- VISUAL HOST ---------- */

body.mp-v10-active .hero-visual,
body.mp-v10-active .hero-right,
body.mp-v10-active .hero__visual,
body.mp-v10-active [data-hero-visual] {
    position: relative !important;
    z-index: 20 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    isolation: isolate !important;
}

@media (min-width: 1181px) {
    body.mp-v10-active .hero-visual,
    body.mp-v10-active .hero-right,
    body.mp-v10-active .hero__visual,
    body.mp-v10-active [data-hero-visual] {
        margin-left: -28px !important;
        width: calc(100% + 28px) !important;
    }
}

/* Suppress all historical visual implementations. */
body.mp-v10-active .hero-visual > :not(.mp-house-v10),
body.mp-v10-active .hero-right > :not(.mp-house-v10),
body.mp-v10-active .hero__visual > :not(.mp-house-v10),
body.mp-v10-active [data-hero-visual] > :not(.mp-house-v10) {
    display: none !important;
}

body.mp-v10-active .mp-reference-house-v7,
body.mp-v10-active .mp-house-v8,
body.mp-v10-active .mp-house-v9,
body.mp-v10-active .mp-webgl-canvas,
body.mp-v10-active .mp-webgl-badge,
body.mp-v10-active .mp-webgl-debug-status {
    display: none !important;
}

/* ---------- APPROVED SCENE ---------- */

.mp-house-v10 {
    position: absolute;
    inset: 0;
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
    perspective: 1300px;
    opacity: 0;
    background:
        radial-gradient(
            ellipse at 58% 49%,
            rgba(12, 139, 211, .10),
            transparent 54%
        );
    animation:
        mpV10Reveal
        1.05s
        cubic-bezier(.2,.76,.2,1)
        .04s
        forwards;
}

.mp-house-v10__image-wrap {
    position: absolute;
    inset: 0;
    transform:
        translate3d(var(--mp-v10-x), var(--mp-v10-y), 0)
        rotateX(var(--mp-v10-tilt-x))
        rotateY(var(--mp-v10-tilt-y));
    transform-origin: 57% 52%;
    will-change: transform;
}

.mp-house-v10 picture {
    position: absolute;
    inset: 0;
    display: block;
}

.mp-house-v10 img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
    transform: translate(-50%, -50%) scale(1.01);
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
    filter:
        saturate(1.035)
        contrast(1.025)
        brightness(1.015)
        drop-shadow(0 28px 44px rgba(0, 0, 0, .39));
}

/* Blends the source image into the real page background. */
.mp-house-v10::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(2, 9, 16, .94) 0%,
            rgba(2, 9, 16, .46) 3.5%,
            rgba(2, 9, 16, .08) 10%,
            transparent 18%,
            transparent 94%,
            rgba(2, 9, 16, .12) 100%
        ),
        linear-gradient(
            180deg,
            rgba(2, 9, 16, .08) 0%,
            transparent 11%,
            transparent 89%,
            rgba(2, 9, 16, .18) 100%
        );
}

/* Retained cinematic animation layers. */
.mp-house-v10__radar {
    position: absolute;
    z-index: 6;
    top: 49%;
    left: 57%;
    width: 69%;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: .17;
    transform: translate(-50%, -50%);
    background:
        conic-gradient(
            from 12deg,
            transparent 0 307deg,
            rgba(53, 220, 255, .02) 318deg,
            rgba(53, 220, 255, .14) 349deg,
            transparent 360deg
        );
    -webkit-mask-image:
        radial-gradient(circle, #000 0 53%, transparent 71%);
    mask-image:
        radial-gradient(circle, #000 0 53%, transparent 71%);
    animation: mpV10Radar 14s linear infinite;
}

.mp-house-v10__scan {
    position: absolute;
    z-index: 8;
    left: 11%;
    right: 2%;
    top: 15%;
    height: 1px;
    opacity: 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(68, 225, 255, .70),
            transparent
        );
    box-shadow:
        0 0 8px rgba(32, 209, 255, .44),
        0 0 22px rgba(32, 209, 255, .14);
    animation: mpV10Scan 8.8s ease-in-out 1.25s infinite;
}

.mp-house-v10__hotspot,
.mp-house-v10__particle {
    position: absolute;
    z-index: 9;
    border-radius: 50%;
    pointer-events: none;
}

.mp-house-v10__hotspot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border: 1px solid rgba(219, 250, 255, .94);
    background: #25d9ff;
    box-shadow:
        0 0 7px rgba(37, 217, 255, .96),
        0 0 16px rgba(37, 217, 255, .45);
    animation: mpV10Hotspot 2.35s ease-in-out infinite;
}

.mp-house-v10__hotspot::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(37, 217, 255, .31);
    border-radius: 50%;
    animation: mpV10HotspotRing 2.35s ease-out infinite;
}

.mp-house-v10__particle {
    width: var(--size);
    height: var(--size);
    opacity: 0;
    background: rgba(74, 224, 255, .76);
    box-shadow: 0 0 6px rgba(74, 224, 255, .50);
    animation:
        mpV10Particle
        var(--duration)
        linear
        var(--delay)
        infinite;
}

/* ---------- REMOVE THE NEGATIVE OVERLAP ---------- */

body.mp-v10-active .solutions,
body.mp-v10-active .services-row,
body.mp-v10-active .services-grid,
body.mp-v10-active .directions-grid,
body.mp-v10-active .service-strip {
    position: relative !important;
    z-index: 40 !important;
    margin-top: 0 !important;
    transform: none !important;
    clear: both !important;
}

/* ---------- TABLET ---------- */

@media (max-width: 1180px) and (min-width: 721px) {
    body.mp-v10-active .hero {
        display: grid !important;
        grid-template-columns: 42% 58% !important;
        height: 500px !important;
        min-height: 500px !important;
        padding: 0 !important;
        align-items: stretch !important;
    }

    body.mp-v10-active .hero-left,
    body.mp-v10-active .hero-copy,
    body.mp-v10-active .hero__content {
        padding: 34px 18px 20px 0 !important;
        justify-content: flex-start !important;
    }

    body.mp-v10-active .hero-visual,
    body.mp-v10-active .hero-right,
    body.mp-v10-active .hero__visual,
    body.mp-v10-active [data-hero-visual] {
        height: 500px !important;
    }

    .mp-house-v10 img {
        width: 112%;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 720px) {
    body.mp-v10-active .hero {
        display: grid !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 0 !important;
        padding-top: 18px !important;
        overflow: hidden !important;
    }

    body.mp-v10-active .hero-left,
    body.mp-v10-active .hero-copy,
    body.mp-v10-active .hero__content {
        position: relative !important;
        z-index: 30 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 22px 0 12px !important;
        justify-content: flex-start !important;
        background:
            linear-gradient(
                180deg,
                rgba(2,9,16,.99),
                rgba(2,9,16,.96)
            ) !important;
    }

    body.mp-v10-active .hero-visual,
    body.mp-v10-active .hero-right,
    body.mp-v10-active .hero__visual,
    body.mp-v10-active [data-hero-visual] {
        width: 100% !important;
        height: clamp(330px, 68vw, 430px) !important;
        min-height: 330px !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .mp-house-v10 img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: translate(-50%, -50%) scale(1);
    }

    .mp-house-v10__radar {
        width: 92%;
    }

    .mp-house-v10__scan,
    .mp-house-v10__particle {
        display: none;
    }

    body.mp-v10-active .solutions,
    body.mp-v10-active .services-row,
    body.mp-v10-active .services-grid,
    body.mp-v10-active .directions-grid,
    body.mp-v10-active .service-strip {
        margin-top: 10px !important;
    }
}

/* ---------- MOTION ---------- */

@keyframes mpV10Reveal {
    from {
        opacity: 0;
        filter: brightness(.44);
        transform: translateY(6px) scale(.99);
    }
    to {
        opacity: 1;
        filter: brightness(1);
        transform: translateY(0) scale(1);
    }
}

@keyframes mpV10Radar {
    to { rotate: 360deg; }
}

@keyframes mpV10Scan {
    0%,14% { top:15%; opacity:0; }
    24% { opacity:.44; }
    61% { top:80%; opacity:.25; }
    72%,100% { top:84%; opacity:0; }
}

@keyframes mpV10Hotspot {
    0%,100% { opacity:.55; transform:scale(.84); }
    50% { opacity:1; transform:scale(1.17); }
}

@keyframes mpV10HotspotRing {
    from { opacity:.68; transform:scale(.45); }
    to { opacity:0; transform:scale(1.32); }
}

@keyframes mpV10Particle {
    0% { opacity:0; translate:0 15px; }
    18% { opacity:.48; }
    76% { opacity:.16; }
    100% { opacity:0; translate:var(--drift) -75px; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-house-v10,
    .mp-house-v10__radar,
    .mp-house-v10__scan,
    .mp-house-v10__hotspot,
    .mp-house-v10__hotspot::after,
    .mp-house-v10__particle {
        animation: none !important;
    }

    .mp-house-v10 {
        opacity: 1;
    }
}