:root {
    --mp-cyan: #25d5fb;
    --mp-blue: #078fd3;
    --mp-deep: #02070d;
    --mp-panel: rgba(7, 21, 33, 0.82);
    --mp-border: rgba(64, 190, 235, 0.24);
}

body {
    background: #02070d;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 7%, rgba(0, 162, 255, 0.15), transparent 31%),
        radial-gradient(circle at 8% 38%, rgba(21, 201, 245, 0.07), transparent 26%),
        linear-gradient(180deg, #02070d 0%, #06121d 48%, #02070d 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 500;
    pointer-events: none;
    opacity: 0.025;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.header {
    transition:
        background 0.3s ease,
        backdrop-filter 0.3s ease,
        box-shadow 0.3s ease;
}

.header.mp-scrolled {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(2, 8, 14, 0.86);
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.28);
}

.header.mp-scrolled .header-inner {
    min-height: 76px;
}

.brand-logo {
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.04);
    filter:
        drop-shadow(0 0 14px rgba(37, 213, 251, 0.34))
        drop-shadow(0 0 35px rgba(37, 213, 251, 0.12));
}

.hero {
    overflow: hidden;
}

.hero-grid {
    position: relative;
}

.hero-grid::after {
    content: "";
    position: absolute;
    top: 3%;
    right: 0;
    width: 55%;
    aspect-ratio: 1;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(
            circle,
            rgba(25, 194, 239, 0.13),
            rgba(11, 89, 135, 0.04) 48%,
            transparent 70%
        );
    animation: mpHalo 7s ease-in-out infinite;
}

.hero h1 {
    text-shadow:
        0 3px 30px rgba(0, 0, 0, 0.3),
        0 0 45px rgba(255, 255, 255, 0.015);
}

.hero-description {
    max-width: 650px;
}

.hero-visual {
    perspective: 1100px;
    transition: transform 0.25s ease-out;
}

.house-scene {
    will-change: transform;
    filter:
        drop-shadow(0 45px 58px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 42px rgba(18, 184, 230, 0.06));
}

.visual-stars {
    animation: mpStars 20s linear infinite;
}

.system-card {
    position: absolute;
    overflow: hidden;
    border-color: rgba(59, 201, 244, 0.35);
    background:
        linear-gradient(
            145deg,
            rgba(8, 25, 38, 0.93),
            rgba(3, 12, 20, 0.86)
        );
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px rgba(255, 255, 255, 0.04),
        0 0 35px rgba(20, 193, 237, 0.05);
}

.system-card::after {
    content: "";
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: -70%;
    width: 42%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent
        );
    transform: rotate(17deg);
    animation: mpSweep 7s ease-in-out infinite;
}

.button {
    position: relative;
    overflow: hidden;
}

.button::after {
    content: "";
    position: absolute;
    top: -70%;
    bottom: -70%;
    left: -55%;
    width: 40%;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.28),
            transparent
        );
    transform: rotate(17deg);
    transition: left 0.65s ease;
}

.button:hover::after {
    left: 125%;
}

.button-primary {
    background:
        linear-gradient(
            135deg,
            #27d8fa 0%,
            #0aa9df 46%,
            #087dc6 100%
        );
    box-shadow:
        0 18px 48px rgba(5, 158, 215, 0.3),
        inset 0 1px rgba(255, 255, 255, 0.26);
}

.solution-card {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.solution-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at var(--mp-x, 50%) var(--mp-y, 50%),
            rgba(33, 207, 250, 0.16),
            transparent 42%
        );
    transition: opacity 0.25s ease;
}

.solution-card:hover::before {
    opacity: 1;
}

.solution-card::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    opacity: 0.1;
    background: var(--mp-cyan);
    filter: blur(65px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.solution-card:hover::after {
    opacity: 0.23;
    transform: scale(1.2);
}

.solution-card > * {
    position: relative;
    z-index: 2;
}

.solution-icon {
    transition:
        transform 0.3s ease,
        text-shadow 0.3s ease;
}

.solution-card:hover .solution-icon {
    transform: translateY(-4px) scale(1.08);
    text-shadow: 0 0 20px rgba(37, 213, 251, 0.55);
}

/* Убираем цветные системные emoji в iOS */

.solution-card:nth-child(4) .solution-icon,
.solution-card:nth-child(5) .solution-icon {
    font-size: 0;
}

.solution-card:nth-child(4) .solution-icon::before {
    content: "◎";
    color: var(--mp-cyan);
    font-size: 34px;
}

.solution-card:nth-child(5) .solution-icon::before {
    content: "⌁";
    color: var(--mp-cyan);
    font-size: 35px;
}

.glass-panel,
.about-layout,
.contact-card {
    position: relative;
    overflow: hidden;
    border-color: var(--mp-border);
    background:
        linear-gradient(
            145deg,
            rgba(11, 29, 44, 0.93),
            rgba(4, 14, 23, 0.88)
        );
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.035),
        0 30px 75px rgba(0, 0, 0, 0.2);
}

.glass-panel::after,
.about-layout::after,
.contact-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 8%;
    left: 8%;
    height: 1px;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(73, 211, 249, 0.4),
            transparent
        );
}

.timeline-step b {
    transition:
        transform 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.timeline-step:hover b {
    color: white;
    background: rgba(13, 185, 232, 0.16);
    transform: translateY(-4px);
    box-shadow:
        0 0 0 5px rgba(13, 185, 232, 0.045),
        0 0 25px rgba(13, 185, 232, 0.26);
}

.plan-house {
    animation: mpDashboard 6s ease-in-out infinite;
}

.statistics article {
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.statistics article:hover {
    transform: translateY(-4px);
    border-color: rgba(40, 204, 249, 0.32);
    background: rgba(13, 185, 232, 0.045);
}

.benefits article {
    padding: 6px;
    border-radius: 10px;
    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.benefits article:hover {
    transform: translateY(-3px);
    background: rgba(13, 185, 232, 0.04);
}

.contact-form input {
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-form input:hover {
    border-color: rgba(75, 205, 246, 0.27);
}

.contact-form input:focus {
    background: rgba(3, 13, 21, 0.94);
}

@keyframes mpHalo {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.97);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes mpStars {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-22px, 13px, 0);
    }
}

@keyframes mpSweep {
    0%,
    68% {
        left: -70%;
    }

    90%,
    100% {
        left: 145%;
    }
}

@keyframes mpDashboard {
    0%,
    100% {
        transform:
            rotateX(58deg)
            rotateZ(-31deg)
            translateZ(0);
    }

    50% {
        transform:
            rotateX(58deg)
            rotateZ(-31deg)
            translateZ(8px);
    }
}

@media (max-width: 720px) {
    .container {
        width: calc(100% - 34px);
    }

    .header-inner {
        min-height: 112px;
    }

    .brand-logo {
        width: 57px;
        height: 57px;
    }

    .brand-text strong {
        font-size: 15px;
        letter-spacing: 0.14em;
    }

    .brand-text small {
        font-size: 5px;
    }

    .menu-button {
        width: 56px;
        height: 56px;
        padding: 14px;
        border-radius: 15px;
    }

    .hero {
        padding-top: 82px;
    }

    .eyebrow {
        margin-bottom: 30px;
        font-size: 10px;
        line-height: 1.55;
    }

    .hero h1 {
        margin-bottom: 32px;
        font-size: clamp(41px, 11.8vw, 55px);
        line-height: 1.04;
    }

    .hero h1 span {
        margin-top: 15px;
        font-size: 0.91em;
        line-height: 1.09;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.8;
    }

    .hero-buttons {
        gap: 15px;
        margin-top: 35px;
    }

    .hero-buttons .button {
        min-height: 69px;
        border-radius: 13px;
        font-size: 16px;
    }

    .values {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        gap: 22px 27px;
        margin-top: 37px;
        font-size: 12px;
    }

    .hero-visual {
        height: 560px;
        margin-top: 8px;
    }

    .house-scene {
        top: 42px;
        left: 50%;
        width: 730px;
        max-width: none;
        height: 490px;
        transform: translateX(-50%);
    }

    .system-card {
        min-width: 174px;
        transform: scale(0.93);
    }

    .camera-card {
        top: 12px;
        left: 9px;
    }

    .access-card {
        top: 100px;
        left: -13px;
    }

    .alarm-card {
        top: 132px;
        right: -13px;
    }

    .perimeter-card {
        right: 23%;
        bottom: 9px;
    }

    .solution-card {
        min-height: 166px;
        grid-template-columns: 54px 1fr 28px;
        gap: 22px;
        padding: 27px;
        border-radius: 18px;
    }

    .solution-card h3 {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .solution-card p {
        font-size: 12px;
        line-height: 1.65;
    }

    .process-panel,
    .dashboard {
        padding: 29px;
        border-radius: 20px;
    }

    .process-panel h2 {
        font-size: 38px;
    }

    .timeline {
        gap: 26px 30px;
    }

    .timeline-step b {
        width: 57px;
        height: 57px;
        font-size: 11px;
    }

    .timeline-step h3 {
        font-size: 15px;
    }

    .timeline-step p {
        font-size: 11px;
        line-height: 1.55;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header h3 {
        font-size: 20px;
    }

    .floor-plan {
        min-height: 450px;
    }

    .systems-list > div {
        min-height: 54px;
        align-items: center;
        font-size: 12px;
    }

    .statistics article {
        min-height: 116px;
        padding: 15px;
    }

    .benefits {
        gap: 22px;
        padding: 29px;
        border-radius: 20px;
    }

    .benefits article {
        gap: 18px;
    }

    .benefits h3 {
        font-size: 15px;
    }

    .benefits p {
        font-size: 11px;
        line-height: 1.65;
    }

    .about-layout,
    .contact-card {
        padding: 35px;
        border-radius: 20px;
    }

    .about-layout h2,
    .contact-copy h2 {
        font-size: 38px;
    }

    .about-layout > p,
    .contact-copy p {
        font-size: 14px;
        line-height: 1.8;
    }

    .contact-form input {
        min-height: 68px;
        padding: 19px;
        border-radius: 13px;
        font-size: 15px;
    }

    .contact-form button {
        min-height: 70px;
        font-size: 16px;
    }
}

@media (max-width: 390px) {
    .container {
        width: calc(100% - 26px);
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-logo {
        width: 51px;
        height: 51px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .values {
        grid-template-columns: 1fr 1fr;
    }

    .solution-card {
        padding: 23px;
    }

    .process-panel h2,
    .about-layout h2,
    .contact-copy h2 {
        font-size: 33px;
    }
}
