.home-page {
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    background: linear-gradient(to bottom, #fff 0 calc(100% - 11px), #f9f9f9 calc(100% - 11px));
}

.home-hero {
    --home-dark: #164845;
    --home-mid: #5b8f82;
    --home-light: #d9f2df;

    position: relative;
    width: 100%;
    height: clamp(731px, calc(64.45vw - 160px), 1078px);
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(90deg, var(--home-dark) 0%, #3e7169 38%, #94c3ab 67%, var(--home-light) 100%);
}

.home-bottom-strip {
    height: calc(var(--site-nav-height) / 2);
    background: #fff;
}

.home-house-image {
    position: absolute;
    z-index: 2;
    top: -160px;
    right: max(-1px, calc((100% - 1920px) / 2 - 1px));
    width: clamp(1320px, 95.52vw, 1834px);
    height: auto;
    aspect-ratio: 1834 / 1291;
    max-width: none;
    object-fit: contain;
    object-position: top left;
    pointer-events: none;
    user-select: none;
}

.home-hero-content {
    position: relative;
    z-index: 3;
    width: min(100%, 1920px);
    height: 100%;
    margin: 0 auto;
    padding: 84px 0 0 clamp(70px, 4vw, 80px);
}

.home-hero h1 {
    width: min(1116px, 62vw);
    margin: 0;
    color: #fafafa;
    font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
    font-size: clamp(76px, 6.67vw, 128px);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 0.94;
}

.home-hero h1 span {
    display: block;
    white-space: nowrap;
}

.home-actions {
    position: absolute;
    top: 477px;
    left: clamp(54px, 4.5vw, 87px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.home-action-row {
    display: flex;
    gap: 42px;
}

.home-button {
    min-width: 245px;
    height: 85px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 20px;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-family: "Azeret Mono", Consolas, monospace;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.home-button:hover,
.home-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 34px rgba(7, 49, 46, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    outline: none;
    transform: translateY(-3px);
}

.home-button:active {
    transform: translateY(-1px);
}

.home-database-icon {
    position: relative;
    width: 25px;
    height: 27px;
    display: inline-block;
    flex: 0 0 auto;
    border: 4px solid currentColor;
    border-top-width: 3px;
    border-radius: 50% / 20%;
}

.home-database-icon::before,
.home-database-icon::after {
    content: "";
    position: absolute;
    right: -4px;
    left: -4px;
    height: 8px;
    border-bottom: 4px solid currentColor;
    border-radius: 0 0 50% 50%;
}

.home-database-icon::before {
    top: 3px;
}

.home-database-icon::after {
    top: 11px;
}

.home-dot-field {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.43;
    background-image: radial-gradient(circle, #f4f4f0 0 2px, transparent 2.2px);
    background-size: 24px 24px;
}

.home-dot-field-top {
    top: 24px;
    left: 51.6%;
    width: 160px;
    height: 148px;
}

.home-dot-field-middle {
    top: 387px;
    left: 26.5%;
    width: 420px;
    height: 405px;
    background-size: 24px 24px;
    clip-path: polygon(35% 0, 70% 0, 100% 37%, 91% 100%, 0 100%, 0 32%);
}

.home-dot-field-bottom {
    top: 875px;
    left: 58.7%;
    width: 110px;
    height: 105px;
}

.home-video-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100svh;
    max-height: none;
    margin: 0;
    padding: clamp(70px, 9vh, 100px) 4vw 4vh;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
}

.home-video-dialog[open] {
    display: grid;
    place-items: center;
}

.home-video-dialog::backdrop {
    background: rgba(5, 23, 22, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.home-video-dialog-content {
    position: relative;
    display: inline-block;
    max-width: 92vw;
    max-height: 82svh;
}

.home-video {
    display: block;
    width: auto;
    max-width: 92vw;
    height: auto;
    max-height: 82svh;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.home-video-close {
    position: absolute;
    z-index: 1;
    top: -58px;
    right: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(13, 49, 46, 0.72);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.home-video-close:hover,
.home-video-close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: 2px solid #fff;
    outline-offset: 3px;
    transform: scale(1.05);
}

@media (max-width: 1320px) {
    .home-hero-content {
        padding-top: 70px;
    }

    .home-actions {
        top: 408px;
        gap: 18px;
    }

    .home-action-row {
        gap: 24px;
    }

    .home-button {
        min-width: 210px;
        height: 74px;
        font-size: 18px;
    }
}

@media (max-width: 1024px) {
    .home-hero {
        height: calc(100svh - var(--site-nav-height));
        min-height: 760px;
        background: linear-gradient(90deg, var(--home-dark) 0%, #4d8176 55%, var(--home-light) 100%);
    }

    .home-hero-content {
        padding: 52px 36px 0;
    }

    .home-hero h1 {
        width: 100%;
        font-size: clamp(54px, 9.3vw, 86px);
        line-height: 0.98;
    }

    .home-house-image {
        top: 190px;
        right: -470px;
        width: 1320px;
        height: auto;
    }

    .home-actions {
        top: auto;
        bottom: 48px;
        left: 36px;
        gap: 14px;
    }

    .home-action-row {
        gap: 16px;
    }

    .home-button {
        min-width: 205px;
        height: 70px;
        font-size: 17px;
    }

    .home-dot-field-middle {
        top: 340px;
        left: 5%;
    }
}

@media (max-width: 640px) {
    .home-hero {
        min-height: 720px;
    }

    .home-hero-content {
        padding: 36px 22px 0;
    }

    .home-hero h1 {
        font-size: clamp(42px, 13.4vw, 64px);
        letter-spacing: -0.06em;
        line-height: 1;
    }

    .home-hero h1 span {
        white-space: normal;
    }

    .home-house-image {
        top: 204px;
        right: clamp(-413px, calc(148vw - 990px), -43px);
        width: 990px;
    }

    .home-actions {
        right: 22px;
        bottom: 28px;
        left: 22px;
        align-items: stretch;
        gap: 12px;
    }

    .home-action-row {
        flex-direction: column;
        gap: 12px;
    }

    .home-button {
        width: 100%;
        min-width: 0;
        height: 62px;
        border-radius: 16px;
        background: rgba(22, 72, 69, 0.62);
        font-size: 16px;
    }

    .home-dot-field {
        background-size: 20px 20px;
    }

    .home-dot-field-top {
        left: 67%;
    }

    .home-dot-field-middle {
        top: 316px;
        left: -18%;
        width: 310px;
        height: 330px;
    }

    .home-dot-field-bottom {
        display: none;
    }

    .home-video-dialog {
        padding-right: 3vw;
        padding-left: 3vw;
    }

}

@media (prefers-reduced-motion: reduce) {
    .home-button,
    .home-video-close {
        transition: none;
    }
}
