/* ========== LEGACY INNER HEADER (DESKTOP OVERRIDES KEPT FOR NON-HERO PAGES) ========== */
@media (min-width: 1101px) {
    .header:not(.header--desktop-hero) {
        background: transparent;
    }

    .header:not(.header--desktop-hero) .container {
        max-width: none;
        width: 100%;
        padding: 28px 20px 0;
        overflow-x: clip;
    }

    .header:not(.header--desktop-hero) .header-top {
        margin-top: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    .header-top--compact {
        grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr);
        grid-template-areas:
            "logo nav .";
        width: 100%;
        align-items: end;
        gap: 0 26px;
        padding: 0;
        border-bottom: 0;
        background: none;
        box-shadow: none;
    }

    .header-top--compact .logo {
        align-self: end;
        justify-self: start;
        margin-top: 38px;
        margin-left: 38px;
        transform: translateY(16px);
    }

    .header-top--compact .logo-premium {
        gap: 10px;
        align-items: center;
    }

    .header-top--compact .logo-main--image {
        transform: translateY(0);
        padding: 4px;
        border-radius: 14px;
        border: 1px solid rgba(24, 61, 93, 0.08);
        background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(201, 212, 227, 0.92) 100%);
        box-shadow:
            0 12px 28px rgba(15, 23, 42, 0.09),
            0 2px 6px rgba(24, 61, 93, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.82);
    }

    .header-top--compact .logo-tagline {
        display: grid;
        gap: 5px;
        max-width: none;
        position: relative;
        padding-bottom: 8px;
        font-size: 12.2px;
        line-height: 1.24;
        color: rgba(var(--theme-text-rgb), 0.58);
        font-weight: 720;
        letter-spacing: 0.17em;
        text-transform: uppercase;
    }

    .header-top--compact .logo-tagline::before {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 92px;
        height: 1px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.42), rgba(var(--theme-accent-rgb), 0));
    }

    .header-top--compact .logo-tagline::after {
        content: "KOMFORTPLUS116.RU";
        display: block;
        font-family: "Cormorant Garamond", serif;
        font-size: 35px;
        font-weight: 700;
        line-height: 0.92;
        letter-spacing: -0.015em;
        text-transform: none;
        color: var(--theme-text-strong);
    }

    .header-top--compact .nav {
        grid-area: nav;
        justify-self: center;
        align-self: end;
        width: auto;
        min-width: 0;
        margin-top: 0;
        position: relative;
        z-index: 3;
    }

    .header-top--compact .nav-list {
        display: flex;
        flex-wrap: nowrap;
        margin: 0;
        padding: 0;
        list-style: none;
        justify-content: flex-start;
        align-items: center;
        gap: 12px 26px;
        min-width: 0;
    }

    .header-top--compact .nav-list li {
        flex: 0 0 auto;
    }

    .header-top--compact .nav-list a {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0;
        min-height: 30px;
        padding: 6px 0;
        border: 0;
        border-radius: 999px;
        background: none;
        box-shadow: none;
        color: rgba(var(--theme-text-rgb), 0.78);
        font-size: 0.94rem;
        font-weight: 820;
        letter-spacing: 0;
        line-height: 1.08;
        white-space: nowrap;
        transform: none;
        transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
    }

    .header-top--compact .nav-list a i {
        display: none;
    }

    .header-top--compact .nav-list a::after {
        content: "";
        position: absolute;
        left: 7px;
        right: 7px;
        bottom: 0;
        height: 0.75px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0) 0%, rgba(var(--theme-accent-strong-rgb), 0.16) 18%, rgba(var(--theme-accent-rgb), 0.28) 50%, rgba(var(--theme-accent-strong-rgb), 0.16) 82%, rgba(var(--theme-accent-strong-rgb), 0) 100%);
        box-shadow: 0 1px 3px rgba(var(--theme-accent-strong-rgb), 0.05);
        opacity: 0.64;
        transform: scaleX(1);
        transform-origin: center;
        transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
    }

    .header-top--compact .nav-list a:hover,
    .header-top--compact .nav-list a.active {
        color: var(--theme-accent);
    }

    .header-top--compact .nav-list a:hover::after {
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0) 0%, rgba(var(--theme-accent-rgb), 0.3) 18%, rgba(var(--theme-accent-rgb), 0.46) 50%, rgba(var(--theme-accent-rgb), 0.3) 82%, rgba(var(--theme-accent-strong-rgb), 0) 100%);
        box-shadow: 0 1px 4px rgba(var(--theme-accent-strong-rgb), 0.1);
        opacity: 0.82;
    }

    .header-top--compact .nav-list a.active {
        min-height: 30px;
        padding: 6px 0;
        border: 0;
        background: none;
        color: var(--theme-accent);
        box-shadow: none;
    }

    .header-top--compact .nav-list a.active::after {
        background: linear-gradient(90deg, rgba(var(--theme-accent-strong-rgb), 0) 0%, rgba(var(--theme-accent-rgb), 0.36) 18%, rgba(var(--theme-accent-rgb), 0.54) 50%, rgba(var(--theme-accent-rgb), 0.36) 82%, rgba(var(--theme-accent-strong-rgb), 0) 100%);
        box-shadow: 0 1px 4px rgba(var(--theme-accent-strong-rgb), 0.12);
        opacity: 0.96;
    }

    .header:not(.header--desktop-hero) .header-actions {
        display: none;
    }

    .header-contact-stack {
        display: none !important;
    }

    .header-contact-stack .contact-phone:first-of-type,
    .header-contact-stack .contact-phone:nth-of-type(2),
    .header-contact-stack .contact-address,
    .header-contact-stack .contact-phone,
    .header-contact-stack .contact-address {
        box-shadow: none;
        background: none;
        border: 0;
        padding: 0;
        border-radius: 0;
        min-height: auto;
        pointer-events: auto;
    }

    .header-contact-stack .contact-phone:first-of-type {
        order: 1;
        padding: 0;
        border-radius: 0;
        background: none;
        border: 0;
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .header-contact-stack .contact-phone:first-of-type i {
        font-size: 0.98rem;
        margin-top: 2px;
        color: var(--theme-accent-strong);
    }

    .header-contact-stack .contact-phone:first-of-type .phone-number {
        font-size: 20px;
        color: var(--theme-accent-strong);
        letter-spacing: -0.01em;
    }

    .header-contact-stack .contact-phone:first-of-type .phone-label {
        color: rgba(107, 96, 86, 0.78);
        font-size: 13.4px;
        font-weight: 700;
        display: block;
    }

    .header-contact-stack .contact-phone:nth-of-type(2),
    .header-contact-stack .contact-address {
        min-height: auto;
        border-radius: 0;
        line-height: 1.3;
    }

    .header-contact-stack .contact-phone:nth-of-type(2) {
        order: 2;
        opacity: 0.76;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .header-contact-stack .contact-phone:nth-of-type(2) i {
        color: var(--theme-accent-strong);
    }

    .header-contact-stack .contact-phone:nth-of-type(2) .phone-number {
        font-size: 15.8px;
        font-weight: 760;
        color: var(--theme-accent-strong);
    }

    .header-contact-stack .contact-phone:nth-of-type(2) .phone-label {
        display: none;
    }

    .header-contact-stack .contact-address {
        order: 3;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        max-width: 520px;
        color: rgba(107, 96, 86, 0.72);
        font-size: 12.8px;
        font-weight: 600;
    }

    .header-contact-stack .contact-address i {
        margin-top: 2px;
        color: var(--theme-accent-strong);
    }

    .header:not(.header--desktop-hero) .desktop-hero-header {
        display: none !important;
    }
}

/* Desktop logo feedback: make the header mark visibly active on hover. */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__mark,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__mark,
    body#top .header-top--compact .logo-main--image {
        transition:
            transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.22s ease,
            border-color 0.22s ease,
            background 0.22s ease;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__logo,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__logo,
    body#top .header-top--compact .logo-image {
        transition: filter 0.22s ease;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover .hero-brand__mark,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:focus-visible .hero-brand__mark,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__link:hover .hero-brand__mark,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__link:focus-visible .hero-brand__mark,
    body#top .header-top--compact .logo-link:hover .logo-main--image,
    body#top .header-top--compact .logo-link:focus-visible .logo-main--image {
        transform: translateY(-3px);
        border-color: rgba(var(--theme-accent-rgb), 0.16);
        background: linear-gradient(180deg, rgba(252, 253, 255, 1) 0%, rgba(221, 229, 239, 0.96) 100%);
        box-shadow:
            0 14px 28px rgba(15, 23, 42, 0.1),
            0 2px 8px rgba(24, 61, 93, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover .hero-brand__logo,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:focus-visible .hero-brand__logo,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__link:hover .hero-brand__logo,
    body#top .header.header--desktop-hero .desktop-hero-header .hero-brand__link:focus-visible .hero-brand__logo,
    body#top .header-top--compact .logo-link:hover .logo-image,
    body#top .header-top--compact .logo-link:focus-visible .logo-image {
        filter: drop-shadow(0 8px 14px rgba(var(--theme-accent-strong-rgb), 0.12));
    }
}

/* Mobile and tablet tap target: only the logo image navigates, not the adjacent brand text. */
@media (max-width: 1101.98px),
    (min-width: 900px) and (max-width: 2200px) and (min-height: 1200px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (hover: none) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (hover: none) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (min-width: 1101px) and (max-width: 1600px) and (pointer: coarse),
    (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse),
    (pointer: coarse) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9),
    (hover: none) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9) {
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link {
        pointer-events: none !important;
        cursor: default !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__mark {
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__eyebrow,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__name {
        pointer-events: none !important;
        cursor: default !important;
    }
}

/* ========== INNER HERO FIRST-PAINT CONTRACT ========== */
.internal-scene-header {
    display: none;
}

@media (min-width: 1101px) {
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home) {
        display: none !important;
    }

    body#top .internal-hero-scene {
        position: relative;
        z-index: 1;
        display: block;
        overflow: hidden;
        isolation: isolate;
        min-height: 200px;
        height: 200px;
        max-height: 200px;
        margin-top: 0;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body#top .internal-hero-stage {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 15 / 8;
        min-height: 670px;
        height: auto;
        margin: 0;
        overflow: hidden;
        border-radius: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body#top .internal-hero-scene .hero-stage__picture {
        position: absolute;
        inset: 0 -8px 0 -1px;
        z-index: 0;
        display: block;
        contain: paint;
        background-color: #f7fafc;
        background-image: url('../images/hero/home-hero-main.webp');
        background-position: center 72%;
        background-repeat: no-repeat;
        background-size: cover;
    }

    body#top .internal-hero-scene .hero-stage__picture img {
        width: calc(100% + 9px);
        max-width: none;
        height: 100%;
        object-fit: cover;
        object-position: center 72%;
    }
}

/* ========== DESKTOP HEADER HOMEPAGE PARITY ========== */
@media (min-width: 1101px) {
    .header.header--desktop-hero,
    .header.header--desktop-hero .container {
        overflow-x: clip !important;
    }

    .header.header--desktop-hero {
        position: absolute;
        inset: 0 0 auto;
        z-index: 40;
        margin-bottom: 0;
        background: transparent;
    }

    .header.header--desktop-hero .container {
        max-width: none;
        width: 100%;
        padding: 0;
    }

    .header.header--desktop-hero:not(.internal-legacy-header) .header-top.header-top--compact {
        display: none !important;
    }

    .header.header--desktop-hero.internal-legacy-header .container {
        max-width: none;
        width: 100%;
        padding: 28px 20px 0;
        overflow-x: clip;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top {
        margin-top: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        display: grid !important;
    }

    .header.header--desktop-hero.internal-legacy-header .desktop-hero-header {
        display: none !important;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand {
        display: flex;
        align-items: flex-start;
        min-width: 0;
        width: max-content;
        margin-top: 38px;
        margin-left: 38px;
        transform: translateY(16px);
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link,
    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link:visited,
    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link:hover {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        color: #10263d !important;
        text-decoration: none !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link *,
    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link *::before,
    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link *::after {
        color: inherit !important;
        text-decoration: none !important;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        width: 78px;
        height: 78px;
        flex: 0 0 78px;
        padding: 4px;
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(201, 212, 227, 0.92) 100%);
        box-shadow:
            0 10px 24px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.75);
        isolation: isolate;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__logo {
        display: block;
        width: 70px;
        height: 70px;
        max-width: 328px;
        aspect-ratio: 1 / 1;
        border: 0;
        border-radius: 12px;
        background: transparent;
        object-fit: contain;
        position: relative;
        z-index: 1;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__text {
        display: grid;
        gap: 6px;
        min-width: 0;
        width: max-content;
        position: relative;
        padding-bottom: 8px;
        font-family: 'Manrope', sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: normal;
        letter-spacing: normal;
        font-synthesis: none;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__text::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 92px;
        height: 1px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(24, 61, 93, 0.56), rgba(24, 61, 93, 0));
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__eyebrow {
        color: rgba(14, 18, 24, 0.84) !important;
        font-family: 'Manrope', sans-serif;
        font-size: 13.8px;
        font-weight: 760;
        font-synthesis: none;
        line-height: 1.18;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__name {
        font-family: 'Cormorant Garamond', serif;
        font-size: 39px;
        font-weight: 700;
        font-synthesis: none;
        line-height: 0.92;
        letter-spacing: -0.015em;
        color: #10263d;
        font-variant-numeric: lining-nums proportional-nums;
        font-feature-settings: "lnum" 1, "pnum" 1;
    }

    .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__wave {
        display: block;
        position: absolute;
        inset: -185% -185%;
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 44%,
            rgba(255, 255, 255, 0.7) 50%,
            rgba(255, 255, 255, 0) 56%,
            rgba(255, 255, 255, 0) 100%
        );
        transform: translate(150%, -150%) rotate(10deg);
        opacity: 0.6;
        pointer-events: none;
        filter: blur(0.6px);
        z-index: 2;
        animation: logo-wave-shine 3.1s linear infinite;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        grid-template-columns: max-content minmax(0, 1fr) !important;
        grid-template-areas: "logo nav" !important;
        gap: 0 clamp(34px, 3.8vw, 58px) !important;
        align-items: end !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        justify-self: end !important;
        width: 100% !important;
        max-width: calc(100vw - 620px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        justify-content: flex-end !important;
        gap: 12px clamp(14px, 1.35vw, 20px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a {
        font-size: clamp(0.82rem, 0.66rem + 0.18vw, 0.9rem) !important;
    }

    .header.header--desktop-hero .desktop-hero-header {
        position: relative;
        z-index: 4;
        display: grid;
        gap: 0;
        min-height: 0;
        margin: -20px 24px 0;
        padding: 0;
        --apple-accent-deep: #6f5741;
        --apple-text: #2b332f;
    }

    .header.header--desktop-hero + .catalog-page,
    .header.header--desktop-hero + .services-page,
    .header.header--desktop-hero + .gallery-page,
    .header.header--desktop-hero + .prices-page,
    .header.header--desktop-hero + .contacts-page,
    .header.header--desktop-hero + .payment-docs-page,
    .header.header--desktop-hero + .privacy-page,
    .header.header--desktop-hero + .automation-product-page {
        padding-top: 172px;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-scene__topbar {
        position: relative;
        z-index: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px 20px;
        padding: 0;
        margin-bottom: 0;
        border: 0;
        border-radius: 0;
        background: none;
        backdrop-filter: none;
        box-shadow: none;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(340px, 388px);
        align-items: end;
        gap: 10px 36px;
        margin-top: -24px;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand {
        display: flex;
        align-items: flex-start;
        min-width: 0;
        width: max-content;
        margin-top: 38px;
        margin-left: 38px;
        transform: translateY(16px);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__link,
    .header.header--desktop-hero .desktop-hero-header .hero-brand__link:visited,
    .header.header--desktop-hero .desktop-hero-header .hero-brand__link:hover {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        color: #2b332f !important;
        text-decoration: none !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__link *,
    .header.header--desktop-hero .desktop-hero-header .hero-brand__link *:before,
    .header.header--desktop-hero .desktop-hero-header .hero-brand__link *:after {
        color: inherit !important;
        text-decoration: none !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        width: 78px;
        height: 78px;
        flex: 0 0 78px;
        padding: 4px;
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(201, 212, 227, 0.92) 100%);
        box-shadow:
            0 12px 28px rgba(15, 23, 42, 0.09),
            0 2px 6px rgba(24, 61, 93, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.82);
        isolation: isolate;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__logo {
        display: block;
        height: 70px;
        width: 70px;
        max-width: 328px;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
        border: 0;
        background: transparent;
        object-fit: contain;
        position: relative;
        z-index: 1;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__text {
        display: grid;
        gap: 5px;
        min-width: 0;
        width: max-content;
        position: relative;
        padding-bottom: 8px;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__eyebrow {
        color: rgba(var(--theme-accent-strong-rgb), 0.72);
        font-size: 12.2px;
        font-weight: 720;
        line-height: 1.18;
        letter-spacing: 0.17em;
        text-transform: uppercase;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__name {
        font-family: 'Cormorant Garamond', serif;
        font-size: 35px;
        font-weight: 700;
        font-synthesis: none;
        line-height: 0.92;
        letter-spacing: -0.015em;
        color: var(--theme-text);
        font-variant-numeric: lining-nums proportional-nums;
        font-feature-settings: "lnum" 1, "pnum" 1;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__text::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 92px;
        height: 1px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.56), rgba(var(--theme-accent-rgb), 0));
    }

    .header.header--desktop-hero .desktop-hero-header .hero-brand__wave {
        display: block;
        position: absolute;
        inset: -185% -185%;
        background: linear-gradient(135deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,0) 44%,
            rgba(255,255,255,0.7) 50%,
            rgba(255,255,255,0) 56%,
            rgba(255,255,255,0) 100%);
        transform: translate(150%, -150%) rotate(10deg);
        opacity: 0.6;
        pointer-events: none;
        filter: blur(0.6px);
        z-index: 2;
        animation: logo-wave-shine 3.1s linear infinite;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-scene__nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 9px 18px;
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        align-self: end;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link,
    .header.header--desktop-hero .desktop-hero-header .hero-nav__link:visited {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        padding: 7px 14px;
        border: 1px solid rgba(138, 111, 74, 0.12);
        border-radius: 999px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08)),
            linear-gradient(90deg, rgba(138, 111, 74, 0.06), rgba(255, 255, 255, 0));
        color: rgba(43, 51, 47, 0.82);
        font-size: 15.5px;
        font-weight: 800;
        letter-spacing: 0.012em;
        line-height: 1.08;
        white-space: nowrap;
        text-decoration: none !important;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
        box-shadow:
            0 8px 16px rgba(87, 73, 58, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.16);
        transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease, transform 180ms ease;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 0;
        height: 0.75px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(111, 87, 65, 0) 0%, rgba(138, 111, 74, 0.28) 20%, rgba(138, 111, 74, 0.42) 50%, rgba(138, 111, 74, 0.28) 80%, rgba(111, 87, 65, 0) 100%);
        box-shadow: 0 1px 3px rgba(87, 73, 58, 0.05);
        opacity: 0;
        transform: scaleX(0.42);
        transform-origin: center;
        transition: transform 180ms ease, background 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link:hover {
        color: #8a6f52;
        border-color: rgba(138, 111, 74, 0.24);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.14)),
            linear-gradient(90deg, rgba(138, 111, 74, 0.12), rgba(255, 255, 255, 0));
        box-shadow:
            0 10px 20px rgba(87, 73, 58, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
        transform: translateY(-1px);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link:hover::after {
        opacity: 0.78;
        transform: scaleX(1);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link--active {
        border: 1px solid transparent;
        border-color: transparent;
        background: none;
        color: #8a6f52 !important;
        box-shadow: none;
        text-shadow: none;
        transform: none;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-nav__link--active::after {
        opacity: 0.96;
        transform: scaleX(1);
        background: linear-gradient(90deg, rgba(111, 87, 65, 0) 0%, rgba(138, 111, 74, 0.34) 18%, rgba(138, 111, 74, 0.6) 50%, rgba(138, 111, 74, 0.34) 82%, rgba(111, 87, 65, 0) 100%);
        box-shadow: 0 1px 4px rgba(87, 73, 58, 0.1);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-stack {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: min(100%, 404px);
        max-width: 404px;
        min-height: 96px;
        gap: 10px;
        justify-self: end;
        align-self: end;
        margin-right: 0;
        padding-right: 0;
        transform: translate3d(116px, -8px, 0);
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link,
    .header.header--desktop-hero .desktop-hero-header .hero-header-address {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-start;
        width: 100%;
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border: 0;
        color: #2b332f !important;
        text-decoration: none !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link--secondary {
        opacity: 0.76;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link--secondary .hero-header-sub {
        display: none;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-text {
        display: grid;
        gap: 3px;
        min-width: 0;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link i,
    .header.header--desktop-hero .desktop-hero-header .hero-header-address i {
        --pokraska-icon-color: #8a6f52;
        color: var(--pokraska-icon-color, #8a6f52) !important;
        font-size: 18px;
        width: 19px;
        flex: 0 0 19px;
        text-align: center;
        display: inline-block;
        line-height: 1;
        text-shadow: none !important;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link i::before,
    .header.header--desktop-hero .desktop-hero-header .hero-header-address i::before {
        display: block;
        line-height: 1;
    }

    .header :is(.contact-phone, .hero-header-link) > .fa-phone::before,
    .internal-hero-scene .desktop-hero-header .hero-header-link > .fa-phone::before,
    .hero-scene > .hero-header .hero-header-link > .fa-phone::before {
        content: "" !important;
        display: block !important;
        width: 1em;
        height: 1em;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%20512%20512'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M164.9%2024.6c-7.7-18.6-28-28.5-47.4-23.2l-88%2024C12.1%2030.2%200%2046%200%2064c0%20247.4%20200.6%20448%20448%20448%2018%200%2033.8-12.1%2038.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3%2011.6L304.7%20368C234.3%20334.7%20177.3%20277.7%20144%20207.3L193.3%20167c13.7-11.2%2018.4-30%2011.6-46.3l-40-96z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%20512%20512'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M164.9%2024.6c-7.7-18.6-28-28.5-47.4-23.2l-88%2024C12.1%2030.2%200%2046%200%2064c0%20247.4%20200.6%20448%20448%20448%2018%200%2033.8-12.1%2038.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3%2011.6L304.7%20368C234.3%20334.7%20177.3%20277.7%20144%20207.3L193.3%20167c13.7-11.2%2018.4-30%2011.6-46.3l-40-96z'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-main {
        color: var(--apple-accent-deep);
        font-size: 17.5px;
        line-height: 1.1;
        font-weight: 760;
        font-variant-numeric: tabular-nums lining-nums;
        font-feature-settings: "tnum" 1, "lnum" 1;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link--primary .hero-header-main {
        font-size: 21.5px;
        line-height: 1.04;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link--secondary .hero-header-main {
        font-size: 16.8px;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-sub {
        color: rgba(120, 111, 102, 0.9);
        font-size: 13.5px;
        line-height: 1.24;
        font-weight: 640;
        font-variant-numeric: tabular-nums lining-nums;
        font-feature-settings: "tnum" 1, "lnum" 1;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-link--primary .hero-header-sub {
        color: rgba(120, 111, 102, 0.86);
        font-size: 14.2px;
    }

    .header.header--desktop-hero .desktop-hero-header .hero-header-address {
        color: rgba(120, 111, 102, 0.82);
        font-size: 13.5px;
        line-height: 1.3;
        font-weight: 600;
        text-align: left;
    }

    body#top .gallery-header h1 {
        background: none !important;
        color: #2b231c !important;
        -webkit-text-fill-color: currentColor !important;
        background-clip: initial !important;
        -webkit-background-clip: initial !important;
    }
}

/* ========== DESKTOP HEADER COMPOSITION ========== */
@media (min-width: 1101px) {
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        grid-template-columns: max-content minmax(0, 1fr) minmax(310px, 392px) !important;
        grid-template-areas:
            "logo . contacts"
            "nav nav nav" !important;
        gap: 14px clamp(34px, 4vw, 64px) !important;
        align-items: start !important;
        min-height: 170px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand {
        grid-area: logo !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack {
        display: flex !important;
        grid-area: contacts !important;
        justify-self: end !important;
        align-self: start !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: min(100%, 392px) !important;
        max-width: 392px !important;
        min-height: 0 !important;
        gap: 8px !important;
        margin: 52px 38px 0 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone,
    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-address {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #10263d !important;
        text-decoration: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type {
        display: inline-grid !important;
        grid-template-columns: 20px auto !important;
        align-items: start !important;
        column-gap: 10px !important;
        width: max-content !important;
        max-width: 100% !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type i {
        display: inline-block !important;
        width: 20px !important;
        margin-top: 3px !important;
        color: #183d5d !important;
        font-size: 1.02rem !important;
        line-height: 1 !important;
        text-align: center !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-info {
        display: grid !important;
        gap: 3px !important;
        min-width: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-number {
        display: block !important;
        color: #10263d !important;
        font-size: 21.5px !important;
        font-weight: 780 !important;
        line-height: 1.04 !important;
        letter-spacing: -0.012em !important;
        white-space: nowrap !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-label {
        display: block !important;
        color: rgba(94, 105, 119, 0.92) !important;
        font-size: 13.8px !important;
        font-weight: 660 !important;
        line-height: 1.18 !important;
        white-space: nowrap !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:nth-of-type(2),
    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-address {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        grid-area: nav !important;
        justify-self: center !important;
        align-self: start !important;
        width: max-content !important;
        max-width: calc(100vw - 120px) !important;
        margin-top: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        justify-content: center !important;
        gap: 12px clamp(16px, 1.55vw, 24px) !important;
    }
}

/* ========== COMPACT HEADER ARCHITECTURE ========== */
:root {
    --header-panel-ink: #10263d;
    --header-panel-muted: rgba(73, 91, 108, 0.82);
    --header-panel-line: rgba(24, 61, 93, 0.09);
    --header-panel-bg: linear-gradient(135deg, rgba(255, 255, 253, 0.99) 0%, rgba(249, 252, 253, 0.97) 54%, rgba(240, 247, 249, 0.94) 100%);
    --header-panel-shadow: 0 14px 34px rgba(16, 38, 61, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

@media (min-width: 1101px) {
    body#top .header.header--desktop-hero.internal-legacy-header.header--home {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-actions {
        display: none !important;
    }
}

@media (pointer: coarse) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (hover: none) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5) {
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home) {
        display: block !important;
    }
}

/* One compact header system: mobile, tablet and real phone desktop-site mode. */
@media (max-width: 1101.98px),
    (min-width: 900px) and (max-width: 2200px) and (min-height: 1200px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (hover: none) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (hover: none) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (min-width: 1101px) and (max-width: 1600px) and (pointer: coarse),
    (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse),
    (pointer: coarse) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9),
    (hover: none) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9) {
    body#top.menu-open {
        overflow: hidden;
    }

    body#top .header.header--desktop-hero.internal-legacy-header,
    body#top .header.header--desktop-hero.internal-legacy-header.header--home {
        display: block !important;
        position: fixed !important;
        inset: 0 0 auto 0 !important;
        z-index: 1600 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        background: var(--header-panel-bg) !important;
        box-shadow: none !important;
        overflow: visible !important;
        isolation: isolate !important;
        transform: translateY(0) !important;
        transition: transform 220ms ease !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header.is-hidden {
        transform: translateY(-100%) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .desktop-hero-header {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        position: relative !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(168px, auto) minmax(0, 1fr) !important;
        grid-template-areas: "logo contacts actions" !important;
        align-items: center !important;
        gap: 0 clamp(10px, 1.8vw, 18px) !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 62px !important;
        margin: 0 !important;
        padding: 10px clamp(12px, 2vw, 18px) !important;
        border: 0 !important;
        border-bottom: 1px solid var(--header-panel-line) !important;
        border-radius: 0 !important;
        background:
            radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 30%),
            var(--header-panel-bg) !important;
        box-shadow: var(--header-panel-shadow) !important;
        -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
        backdrop-filter: blur(18px) saturate(112%) !important;
        overflow: visible !important;
        isolation: isolate !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .logo,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand {
        grid-area: logo !important;
        display: flex !important;
        justify-self: start !important;
        align-self: center !important;
        width: 100% !important;
        max-width: 300px !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover {
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 9px !important;
        width: 100% !important;
        min-width: 0 !important;
        color: var(--header-panel-ink) !important;
        text-decoration: none !important;
        -webkit-text-fill-color: currentColor !important;
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link *,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link *::before,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link *::after {
        color: inherit !important;
        text-decoration: none !important;
        -webkit-text-fill-color: currentColor !important;
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__mark {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 52px !important;
        height: 52px !important;
        flex: 0 0 52px !important;
        padding: 4px !important;
        border: 1px solid rgba(24, 61, 93, 0.1) !important;
        border-radius: 14px !important;
        background:
            radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 24%),
            linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(201, 212, 227, 0.92) 100%) !important;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(24, 61, 93, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
        cursor: pointer !important;
        overflow: hidden !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__logo {
        width: 44px !important;
        height: 44px !important;
        max-width: none !important;
        object-fit: contain !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px !important;
        min-width: 0 !important;
        width: auto !important;
        min-height: 52px !important;
        padding: 0 !important;
        font-family: 'Manrope', sans-serif !important;
        cursor: default !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text::after {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__eyebrow,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__name {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__eyebrow {
        color: rgba(16, 38, 61, 0.78) !important;
        font-family: 'Manrope', sans-serif !important;
        font-size: clamp(9px, 1.15vw, 11px) !important;
        font-weight: 760 !important;
        letter-spacing: 0.11em !important;
        line-height: 1.12 !important;
        text-transform: uppercase !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__name {
        color: var(--header-panel-ink) !important;
        font-family: 'Cormorant Garamond', serif !important;
        font-size: clamp(18px, 2.35vw, 22px) !important;
        font-weight: 700 !important;
        font-variant-numeric: lining-nums proportional-nums !important;
        font-feature-settings: "lnum" 1, "pnum" 1 !important;
        letter-spacing: -0.015em !important;
        line-height: 0.96 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack {
        grid-area: contacts !important;
        display: flex !important;
        justify-self: center !important;
        align-self: center !important;
        align-items: center !important;
        justify-content: center !important;
        width: max-content !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone,
    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-address {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--header-panel-ink) !important;
        text-decoration: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type {
        display: inline-grid !important;
        grid-template-columns: 17px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 7px !important;
        width: max-content !important;
        max-width: 218px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type i {
        display: inline-grid !important;
        place-items: center !important;
        width: 17px !important;
        height: 17px !important;
        color: #183d5d !important;
        font-size: 0.88rem !important;
        line-height: 1 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-info {
        display: grid !important;
        gap: 2px !important;
        min-width: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-number {
        display: block !important;
        color: var(--header-panel-ink) !important;
        font-size: clamp(13.8px, 1.8vw, 16.4px) !important;
        font-weight: 800 !important;
        letter-spacing: -0.01em !important;
        line-height: 1.02 !important;
        white-space: nowrap !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-label {
        display: block !important;
        color: rgba(27, 47, 66, 0.68) !important;
        font-size: clamp(9.4px, 1.22vw, 11px) !important;
        font-weight: 660 !important;
        line-height: 1.08 !important;
        white-space: nowrap !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:nth-of-type(2),
    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-address {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-actions {
        grid-area: actions !important;
        display: flex !important;
        justify-self: end !important;
        align-self: center !important;
        justify-content: flex-end !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        z-index: 3 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle:focus-visible,
    body#top .header.header--desktop-hero.internal-legacy-header.is-menu-open .hero-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        border: 1px solid rgba(24, 61, 93, 0.14) !important;
        border-radius: 15px !important;
        background:
            radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 44%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 247, 250, 0.94)) !important;
        box-shadow: 0 10px 24px rgba(16, 38, 61, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
        color: var(--header-panel-ink) !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle__label {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle__bars {
        position: relative !important;
        display: grid !important;
        grid-auto-rows: max-content !important;
        align-content: center !important;
        justify-items: center !important;
        gap: 5px !important;
        width: 18px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle__bars span {
        display: block !important;
        width: 18px !important;
        height: 1.75px !important;
        border-radius: 999px !important;
        background: rgba(16, 38, 61, 0.92) !important;
        opacity: 1 !important;
        transform-origin: center !important;
        transition: opacity 160ms ease, transform 180ms ease, width 160ms ease !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle__bars span:nth-child(2) {
        width: 13px !important;
        justify-self: end !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.active .hero-menu-toggle__bars span:nth-child(1),
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.is-active .hero-menu-toggle__bars span:nth-child(1) {
        transform: translateY(6.75px) rotate(45deg) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.active .hero-menu-toggle__bars span:nth-child(2),
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.is-active .hero-menu-toggle__bars span:nth-child(2) {
        opacity: 0 !important;
        transform: translateX(4px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.active .hero-menu-toggle__bars span:nth-child(3),
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle.is-active .hero-menu-toggle__bars span:nth-child(3) {
        transform: translateY(-6.75px) rotate(-45deg) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        position: absolute !important;
        top: calc(100% - 1px) !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2 !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100dvh - var(--header-top-height, 72px) - 18px) !important;
        margin: 0 !important;
        padding: 13px !important;
        border: 1px solid rgba(24, 61, 93, 0.12) !important;
        border-top: 0 !important;
        border-radius: 0 0 18px 18px !important;
        background:
            radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0) 30%),
            linear-gradient(145deg, rgba(255, 255, 253, 0.995), rgba(249, 252, 253, 0.98) 48%, rgba(238, 246, 249, 0.96)) !important;
        box-shadow: 0 24px 54px rgba(16, 38, 61, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.84) !important;
        -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
        backdrop-filter: blur(18px) saturate(112%) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-10px) !important;
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav.active,
    body#top .header.header--desktop-hero.internal-legacy-header.is-menu-open .header-top.header-top--compact .nav,
    body#top .header.header--desktop-hero.internal-legacy-header.is-menu-open .nav {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list li {
        width: 100% !important;
        min-width: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:focus-visible {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon title"
            "icon note" !important;
        align-items: center !important;
        gap: 2px 10px !important;
        width: 100% !important;
        min-height: 62px !important;
        padding: 10px 11px !important;
        border: 1px solid rgba(24, 61, 93, 0.1) !important;
        border-radius: 16px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 252, 0.8)),
            linear-gradient(90deg, rgba(24, 61, 93, 0.035), rgba(255, 255, 255, 0)) !important;
        box-shadow: 0 10px 22px rgba(16, 38, 61, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
        color: rgba(16, 38, 61, 0.86) !important;
        line-height: 1.12 !important;
        text-align: left !important;
        text-decoration: none !important;
        white-space: normal !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a i {
        grid-area: icon !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 12px !important;
        background: linear-gradient(145deg, rgba(24, 61, 93, 0.1), rgba(24, 61, 93, 0.035)) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
        color: rgba(24, 61, 93, 0.86) !important;
        font-size: 12px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-link__text {
        grid-area: title !important;
        display: block !important;
        align-self: end !important;
        color: var(--header-panel-ink) !important;
        font-size: 0.92rem !important;
        font-weight: 840 !important;
        line-height: 1.08 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::before {
        content: none !important;
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::after {
        content: attr(data-menu-note) !important;
        grid-area: note !important;
        display: block !important;
        position: static !important;
        align-self: start !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        background: none !important;
        box-shadow: none !important;
        color: rgba(73, 91, 108, 0.78) !important;
        font-size: 11px !important;
        font-weight: 650 !important;
        line-height: 1.16 !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a.active,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a[aria-current="page"] {
        border-color: rgba(24, 61, 93, 0.22) !important;
        background:
            radial-gradient(circle at 0% 0%, rgba(24, 61, 93, 0.1), rgba(24, 61, 93, 0) 38%),
            linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(241, 248, 251, 0.9)) !important;
        box-shadow: 0 12px 26px rgba(16, 38, 61, 0.09), inset 3px 0 0 rgba(24, 61, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-menu-toggle {
        animation: none !important;
    }
}

@media (min-width: 821px) and (max-width: 1101.98px) {
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1101px) and (max-width: 1600px) and (pointer: coarse),
    (min-width: 900px) and (max-width: 2200px) and (min-height: 1200px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (hover: none) and (min-width: 1101px) and (max-width: 1600px) and (min-height: 1100px) and (min-aspect-ratio: 5 / 6) and (max-aspect-ratio: 6 / 5),
    (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse),
    (pointer: coarse) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9),
    (hover: none) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9) {
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        padding: 10px 12px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:focus-visible {
        grid-template-columns: 30px minmax(0, 1fr) !important;
        min-height: 54px !important;
        padding: 8px 10px !important;
        border-radius: 15px !important;
        gap: 1px 9px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a i {
        width: 30px !important;
        height: 30px !important;
        border-radius: 11px !important;
        font-size: 11px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-link__text {
        font-size: 0.84rem !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::after {
        font-size: 10px !important;
        line-height: 1.12 !important;
    }
}

/* Wide phone desktop-site mode: keep the full menu visible only after the compact tablet header range. */
@media (min-width: 1102px) and (max-width: 1221.98px),
    (min-width: 1102px) and (max-width: 2200px) and (min-height: 1200px) and (max-aspect-ratio: 2 / 3),
    (pointer: coarse) and (min-width: 1102px) and (max-width: 1600px),
    (hover: none) and (min-width: 1102px) and (max-width: 1600px),
    (pointer: coarse) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9),
    (hover: none) and (min-width: 2200px) and (min-height: 2200px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9) {
    body#top .header.header--desktop-hero.internal-legacy-header.header--home,
    body#top .header.header--desktop-hero.internal-legacy-header.header--home.is-hidden,
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home),
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home).is-hidden,
    body#top .header.header--desktop-hero.internal-legacy-header,
    body#top .header.header--desktop-hero.internal-legacy-header.is-hidden {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        position: sticky !important;
        top: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(196px, auto) !important;
        grid-template-areas:
            "logo contacts"
            "nav nav" !important;
        align-items: center !important;
        gap: 10px clamp(18px, 3vw, 34px) !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 12px clamp(18px, 3vw, 32px) 14px !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(24, 61, 93, 0.1) !important;
        border-radius: 0 !important;
        background:
            radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 32%),
            var(--header-panel-bg) !important;
        box-shadow: 0 14px 32px rgba(16, 38, 61, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
        -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
        backdrop-filter: blur(18px) saturate(112%) !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand {
        grid-area: logo !important;
        justify-self: start !important;
        max-width: min(100%, 330px) !important;
        margin: 0 !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover {
        color: var(--header-panel-ink) !important;
        text-decoration: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack {
        grid-area: contacts !important;
        display: flex !important;
        justify-self: end !important;
        width: max-content !important;
        max-width: 220px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-actions {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        grid-area: nav !important;
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: none !important;
        box-shadow: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        overflow: visible !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 7px clamp(4px, 0.65vw, 8px) !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list li {
        width: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:focus-visible {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-height: 31px !important;
        padding: 6px clamp(7px, 0.8vw, 10px) !important;
        border: 1px solid rgba(24, 61, 93, 0.09) !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.46) !important;
        box-shadow: none !important;
        color: rgba(16, 38, 61, 0.82) !important;
        font-size: clamp(12px, 1.28vw, 13.6px) !important;
        font-weight: 790 !important;
        line-height: 1.08 !important;
        text-align: center !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        transform: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a i,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::before,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::after {
        display: none !important;
        content: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a.active,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a[aria-current="page"] {
        border-color: rgba(24, 61, 93, 0.18) !important;
        background: rgba(255, 255, 255, 0.72) !important;
        color: var(--header-panel-ink) !important;
        box-shadow: inset 0 -2px 0 rgba(24, 61, 93, 0.28) !important;
    }

    body#top .internal-hero-scene,
    body#top .internal-scene-header,
    body#top .hero-scene > .hero-header.hero-header--desktop-home,
    body#top .hero-header--desktop-home {
        display: none !important;
    }

    body#top .internal-hero-scene + :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .privacy-page, .automation-product-page, .automation-faq-wrap) {
        padding-top: clamp(24px, 3vw, 38px) !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .privacy-page, .automation-product-page, .automation-faq-wrap) > .container {
        max-width: none !important;
        min-width: 0 !important;
    }
}

/* Final header placement contract: tablet keeps the compact overlay, desktop-site canvases keep the header inside hero artwork. */
@media (min-width: 1102px) {
    body#top > .header.header--desktop-hero.internal-legacy-header,
    body#top > .header.header--desktop-hero.internal-legacy-header.is-hidden,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home.is-hidden,
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home),
    body#top .header.header--desktop-hero.internal-legacy-header:not(.header--home).is-hidden {
        display: none !important;
    }

    body#top .internal-hero-scene {
        display: block !important;
        position: relative !important;
        overflow: hidden !important;
        min-height: 200px !important;
        height: 200px !important;
        max-height: 200px !important;
        margin-top: 0 !important;
    }

    body#top .internal-scene-header,
    body#top .hero-scene > .hero-header.hero-header--desktop-home {
        display: grid !important;
    }
}

@media (min-width: 1102px) and (max-width: 1221.98px) {
    body#top .internal-scene-header,
    body#top .hero-scene > .hero-header.hero-header--desktop-home {
        position: absolute !important;
        top: clamp(12px, 1.3vw, 18px) !important;
        right: clamp(16px, 2vw, 24px) !important;
        left: clamp(16px, 2vw, 24px) !important;
        z-index: 24 !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        pointer-events: none !important;
    }

    body#top .internal-scene-header .hero-scene__topbar,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__topbar {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: clamp(10px, 1.4vw, 16px) !important;
        min-height: 0 !important;
        padding: 0 !important;
        pointer-events: none !important;
    }

    body#top .internal-scene-header :is(.hero-brand, .hero-scene__nav, .hero-header-stack),
    body#top .hero-scene > .hero-header.hero-header--desktop-home :is(.hero-brand, .hero-scene__nav, .hero-header-stack) {
        pointer-events: auto !important;
    }

    body#top .internal-scene-header .hero-brand,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-brand {
        max-width: clamp(210px, 25vw, 270px) !important;
        margin: 0 !important;
        transform: none !important;
    }

    body#top .internal-scene-header .hero-brand__mark,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-brand__mark {
        width: clamp(54px, 5vw, 62px) !important;
        height: clamp(54px, 5vw, 62px) !important;
        flex-basis: clamp(54px, 5vw, 62px) !important;
        border-radius: 13px !important;
    }

    body#top .internal-scene-header .hero-brand__logo,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-brand__logo {
        width: clamp(46px, 4.2vw, 54px) !important;
        height: clamp(46px, 4.2vw, 54px) !important;
    }

    body#top .internal-scene-header .hero-brand__eyebrow,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-brand__eyebrow {
        font-size: clamp(9px, 0.9vw, 10.6px) !important;
        letter-spacing: 0.12em !important;
    }

    body#top .internal-scene-header .hero-brand__name,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-brand__name {
        font-size: clamp(24px, 2.45vw, 30px) !important;
    }

    body#top .internal-scene-header .hero-scene__nav,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        width: min(100%, 760px) !important;
        max-width: 100% !important;
        gap: 4px !important;
        padding: 5px 6px !important;
        margin: 0 auto !important;
        overflow: visible !important;
    }

    body#top .internal-scene-header .hero-nav__link,
    body#top .internal-scene-header .hero-nav__link:visited,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-nav__link,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-nav__link:visited {
        min-height: 28px !important;
        padding: 5px clamp(5px, 0.6vw, 8px) !important;
        font-size: clamp(11px, 0.95vw, 12.2px) !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }

    body#top .internal-scene-header .hero-header-stack,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-stack {
        width: clamp(188px, 19vw, 226px) !important;
        max-width: clamp(188px, 19vw, 226px) !important;
        min-height: 0 !important;
        gap: 6px !important;
        transform: none !important;
    }

    body#top .internal-scene-header .hero-header-link--secondary,
    body#top .internal-scene-header .hero-header-address,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--secondary,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-address {
        display: none !important;
    }

    body#top .internal-scene-header .hero-header-link--primary .hero-header-main,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary .hero-header-main {
        font-size: clamp(13.4px, 1.18vw, 15.4px) !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
    }

    body#top .internal-scene-header .hero-header-link--primary .hero-header-sub,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary .hero-header-sub {
        font-size: clamp(10.4px, 1vw, 12px) !important;
        line-height: 1.12 !important;
        white-space: nowrap !important;
    }
}

/* Final compact guard: there must be one fixed top header before the hero-header breakpoint. */
@media (max-width: 1101.98px) {
    body#top > .header.header--desktop-hero.internal-legacy-header,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home,
    body#top > .header.header--desktop-hero.internal-legacy-header:not(.header--home),
    body#top > .header.header--desktop-hero.internal-legacy-header.is-hidden,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home.is-hidden,
    body#top > .header.header--desktop-hero.internal-legacy-header:not(.header--home).is-hidden {
        display: block !important;
        position: fixed !important;
        inset: 0 0 auto 0 !important;
        z-index: 1600 !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: translateY(0) !important;
    }

    body#top > .header.header--desktop-hero.internal-legacy-header.is-hidden,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home.is-hidden,
    body#top > .header.header--desktop-hero.internal-legacy-header:not(.header--home).is-hidden {
        transform: translateY(-100%) !important;
        pointer-events: none !important;
    }

    body#top .internal-hero-scene,
    body#top .internal-scene-header,
    body#top .hero-scene > .hero-header.hero-header--desktop-home,
    body#top .hero-header--desktop-home {
        display: none !important;
    }
}

/* Home large canvas: the header belongs inside the hero image, not above it. */
@media (min-width: 1500px) and (min-height: 1800px) and (max-aspect-ratio: 6 / 5) {
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home,
    body#top > .header.header--desktop-hero.internal-legacy-header.header--home.is-hidden {
        display: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home {
        display: grid !important;
    }
}

@media (min-width: 641px) and (max-width: 820.98px) {
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        min-height: 60px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover {
        grid-template-columns: clamp(42px, 5.6vw, 46px) minmax(0, 1fr) !important;
        gap: clamp(6px, 1vw, 8px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__mark {
        width: clamp(42px, 5.6vw, 46px) !important;
        height: clamp(42px, 5.6vw, 46px) !important;
        flex-basis: clamp(42px, 5.6vw, 46px) !important;
        border-radius: 13px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__logo {
        width: clamp(36px, 4.8vw, 39px) !important;
        height: clamp(36px, 4.8vw, 39px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text {
        min-height: clamp(42px, 5.6vw, 46px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__eyebrow {
        font-size: clamp(7.8px, 1.05vw, 8.8px) !important;
        letter-spacing: 0.09em !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__name {
        font-size: clamp(15px, 2.25vw, 17px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type {
        grid-template-columns: clamp(14px, 1.9vw, 15px) minmax(0, 1fr) !important;
        gap: 6px !important;
        max-width: clamp(178px, 24vw, 190px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type i {
        width: clamp(14px, 1.9vw, 15px) !important;
        height: clamp(14px, 1.9vw, 15px) !important;
        font-size: 0.78rem !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-number {
        font-size: clamp(12.4px, 1.9vw, 13.2px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack .contact-phone:first-of-type .phone-label {
        font-size: clamp(8.2px, 1.2vw, 8.9px) !important;
    }
}

@media (max-width: 640.98px) {
    body#top .header.header--desktop-hero.internal-legacy-header,
    body#top .header.header--desktop-hero.internal-legacy-header.header--home {
        padding: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact {
        grid-template-columns: minmax(0, 1fr) 44px !important;
        grid-template-areas: "logo actions" !important;
        gap: 0 10px !important;
        min-height: 52px !important;
        padding: 8px 10px !important;
        border-radius: 0 !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand {
        max-width: 100% !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__link:hover {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__mark {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
        padding: 3px !important;
        border-radius: 12px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__logo {
        width: 38px !important;
        height: 38px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__text {
        min-height: 44px !important;
        gap: 2px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__eyebrow {
        font-size: 8px !important;
        letter-spacing: 0.08em !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .hero-brand__name {
        font-size: clamp(15px, 4.4vw, 17px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-contact-stack {
        display: none !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav {
        padding: 11px !important;
        border-radius: 0 0 16px 16px !important;
        max-height: calc(100dvh - var(--header-top-height, 66px) - 16px) !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 7px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:visited,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:focus-visible {
        min-height: 52px !important;
        padding: 9px 10px !important;
        border-radius: 15px !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a::after {
        display: none !important;
    }
}

@media (max-width: 1101.98px) and (hover: hover) and (pointer: fine) {
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a {
        cursor: url("../images/ui/remote-cursor.svg") 6 5, pointer !important;
        transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease !important;
    }

    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:hover,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .nav-list a:focus-visible {
        border-color: rgba(24, 61, 93, 0.2) !important;
        background:
            radial-gradient(circle at 16% 50%, rgba(24, 61, 93, 0.11), rgba(24, 61, 93, 0) 34%),
            linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 250, 0.9)) !important;
        box-shadow: 0 14px 28px rgba(16, 38, 61, 0.1), inset 3px 0 0 rgba(24, 61, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
        transform: translateY(-1px) !important;
    }
}

/* Final desktop hover layer for shared header brand marks. */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top .desktop-hero-header .hero-brand__link:hover .hero-brand__mark,
    body#top .desktop-hero-header .hero-brand__link:focus-visible .hero-brand__mark,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link:hover .hero-brand__mark,
    body#top .header.header--desktop-hero.internal-legacy-header .header-top.header-top--compact .hero-brand__link:focus-visible .hero-brand__mark,
    body#top .header-top--compact .logo-link:hover .logo-main--image,
    body#top .header-top--compact .logo-link:focus-visible .logo-main--image {
        transform: translateY(-3px) !important;
        border-color: rgba(var(--theme-accent-rgb), 0.16) !important;
        background: linear-gradient(180deg, rgba(252, 253, 255, 1) 0%, rgba(221, 229, 239, 0.96) 100%) !important;
        box-shadow:
            0 14px 28px rgba(15, 23, 42, 0.1),
            0 2px 8px rgba(24, 61, 93, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
    }
}

/* Home hero collision guard: keep brand, menu and phone in separate tracks on small desktop canvases. */
@media (min-width: 1102px) and (max-width: 1499.98px) {
    body#top .hero-scene > .hero-header.hero-header--desktop-home {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) max-content !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "brand phone"
            "nav nav" !important;
        gap: clamp(10px, 1.1vw, 16px) !important;
        top: clamp(12px, 1.2vw, 18px) !important;
        right: clamp(18px, 2vw, 28px) !important;
        left: clamp(18px, 2vw, 28px) !important;
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        pointer-events: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__topbar {
        grid-area: brand !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: max-content !important;
        max-width: min(100%, 330px) !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-row {
        display: contents !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        pointer-events: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home :is(.hero-brand, .hero-scene__nav, .hero-header-stack) {
        pointer-events: auto !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__nav {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        grid-area: nav !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        justify-self: center !important;
        align-self: center !important;
        width: max-content !important;
        max-width: calc(100vw - clamp(36px, 4vw, 56px)) !important;
        min-width: 0 !important;
        max-height: none !important;
        gap: clamp(3px, 0.45vw, 6px) !important;
        padding: 5px 6px !important;
        margin: 0 !important;
        overflow: visible !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-nav__link,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-nav__link:visited {
        min-height: 28px !important;
        padding: 5px clamp(4px, 0.55vw, 8px) !important;
        font-size: clamp(10.6px, 0.84vw, 12.2px) !important;
        line-height: 1.08 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-stack,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-stack--compact {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        grid-area: phone !important;
        display: flex !important;
        justify-self: end !important;
        align-self: center !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: clamp(190px, 17vw, 232px) !important;
        max-width: clamp(190px, 17vw, 232px) !important;
        min-height: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--secondary,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-address {
        display: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary:visited,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary:hover,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary:focus-visible {
        display: inline-grid !important;
        grid-template-columns: 16px minmax(0, 1fr) !important;
        align-items: center !important;
        column-gap: 7px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 34px !important;
        padding: 6px 9px !important;
        margin: 0 !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary i {
        width: 16px !important;
        height: 16px !important;
        flex-basis: 16px !important;
        font-size: 0.86rem !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary .hero-header-main {
        font-size: clamp(13px, 1.05vw, 15px) !important;
        line-height: 1.06 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-link--primary .hero-header-sub {
        display: none !important;
    }
}

@media (min-width: 1500px) {
    body#top .hero-scene > .hero-header.hero-header--desktop-home {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) max-content !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "brand phone"
            "nav nav" !important;
        row-gap: clamp(12px, 1vw, 18px) !important;
        pointer-events: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__topbar {
        grid-area: brand !important;
        grid-column: auto !important;
        grid-row: auto !important;
        align-self: center !important;
        justify-self: start !important;
        pointer-events: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-row {
        display: contents !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home :is(.hero-brand, .hero-scene__nav, .hero-header-stack) {
        pointer-events: auto !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-scene__nav {
        grid-area: nav !important;
        position: static !important;
        inset: auto !important;
        justify-self: center !important;
        align-self: center !important;
        width: max-content !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-stack,
    body#top .hero-scene > .hero-header.hero-header--desktop-home .hero-header-stack--compact {
        grid-area: phone !important;
        position: static !important;
        inset: auto !important;
        justify-self: end !important;
        align-self: center !important;
        margin: 0 !important;
        transform: none !important;
    }
}

@media (min-width: 1222px) and (max-width: 1499.98px) {
    body#top .hero-copy {
        top: clamp(218px, 15vw, 236px) !important;
    }
}
