/* header.css */

.l-header {
    --header-height: 100px;
    --header-top-background-opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 8px rgb(0 0 0 / 8%);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Top-page header overlays the first-view image. Change only this value to add a translucent background. */
.l-header--top,
body.home .l-header {
    background-color: rgb(255 255 255 / var(--header-top-background-opacity));
    box-shadow: none;
}

.l-header--top.is-scrolled,
.l-header--top.is-menu-open,
body.home .l-header.is-scrolled,
body.home .l-header.is-menu-open {
    background-color: #fff;
    box-shadow: 0 1px 8px rgb(0 0 0 / 8%);
}

.l-header:not(.l-header--top)+#content {
    /* The header variable is not inherited by its sibling content element. */
    padding-top: 100px;
}

body.home .l-header+#content {
    padding-top: 0;
}

.l-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    /* Keep the 20px inner gutter at every width so the 1000px menu switch has no horizontal jump. */
    max-width: calc(var(--site-content-max-width) + (var(--site-content-padding) * 2));
    padding-right: var(--site-content-padding);
    padding-left: var(--site-content-padding);
}

.l-header__logo {
    font-weight: 700;
    font-size: 1.125rem;
}

.c-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.c-hamburger__box {
    display: inline-flex;
    width: 24px;
    height: 16px;
    position: relative;
}

.c-hamburger__inner,
.c-hamburger__inner::before,
.c-hamburger__inner::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #222;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.c-hamburger__inner {
    top: 50%;
    transform: translateY(-50%);
}

.c-hamburger__inner::before {
    top: -7px;
}

.c-hamburger__inner::after {
    bottom: -7px;
}

.c-hamburger.is-active .c-hamburger__inner {
    background-color: transparent;
}

.c-hamburger.is-active .c-hamburger__inner::before {
    transform: translateY(7px) rotate(45deg);
}

.c-hamburger.is-active .c-hamburger__inner::after {
    transform: translateY(-7px) rotate(-45deg);
}

.l-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #ddd;
    transform: translateY(-100%);
    visibility: hidden;
    opacity: 0;
    /* Navigation is static while a breakpoint changes. The open state enables its own motion. */
    transition: none;
}

.l-header__nav--desktop {
    display: none;
}

.l-header__nav.is-active {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

.c-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem;
}

.c-nav-list__item {
    margin-bottom: 0.75rem;
}

.c-nav-list__link {
    display: block;
    padding: 0.5rem 0;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-btn__icon {
    width: 1.6rem;
    height: auto;
    flex: 0 0 auto;
}

@media screen and (min-width: 1001px) {
    .c-hamburger {
        display: none;
    }

    .l-header__nav--mobile {
        display: none;
    }

    .l-header__nav--desktop {
        display: block;
        position: static;
        transform: none;
        visibility: visible;
        opacity: 1;
        border-top: none;
        background: transparent;
        width: auto;
    }

    .c-nav-list {
        display: flex;
        gap: 3rem;
        padding: 0;
        align-items: center;
    }

    .c-nav-list__item {
        margin: 0;
    }

    .c-nav-list__link {
        padding: 0;
        font-size: 1.4rem;
        font-weight: bold;
    }

    .c-nav-list__link.contact-btn {
        background-color: #ddc31b;
        color: #fff;
        padding: 1.1rem 2.2rem;
        border-radius: 50px;
    }
}

@media screen and (max-width: 1000px) {
    .l-header {
        --header-height: 72px;
    }

    .l-header:not(.l-header--top)+#content {
        padding-top: 72px;
    }

    .l-header.is-menu-open .l-header__nav {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
}

@media screen and (max-width: 480px) {
    .l-header {
        --header-height: 64px;
    }

    .l-header:not(.l-header--top)+#content {
        padding-top: 64px;
    }

    /* The logo keeps its own size (188 x 32) on smartphones too. */

    .l-header__nav .c-nav-list__link {
        font-size: 1.4rem;
    }
}

@media screen and (min-width: 783px) {
    body.admin-bar .l-header {
        top: 32px;
    }
}

@media screen and (max-width: 782px) {
    body.admin-bar .l-header {
        top: 46px;
    }
}

/*-------------------------------------------
SP menu (1000px and below)
-------------------------------------------*/
@media screen and (max-width: 1000px) {
    html.is-menu-locked {
        overflow: hidden;
    }

    .l-header__nav.l-header__nav--mobile {
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        overscroll-behavior: contain;
        border-top: 1px solid #e6eaf0;
        transform: translateX(100%);
    }

    .l-header__nav.l-header__nav--mobile.is-active {
        transform: translateX(0);
    }

    body.admin-bar .l-header__nav.l-header__nav--mobile {
        height: calc(100dvh - var(--header-height) - 46px);
    }

    .c-sp-menu {
        max-width: 56rem;
        margin: 0 auto;
        padding: 2.4rem var(--site-content-padding) 4rem;
        color: #1d2230;
    }

    .c-sp-menu > * {
        opacity: 0;
        transform: translateY(0.8rem);
        transition: opacity 0.36s ease, transform 0.36s ease;
    }

    .l-header__nav--mobile.is-active .c-sp-menu > * {
        opacity: 1;
        transform: none;
    }

    .l-header__nav--mobile.is-active .c-sp-menu > :nth-child(2) {
        transition-delay: 0.06s;
    }

    .l-header__nav--mobile.is-active .c-sp-menu > :nth-child(3) {
        transition-delay: 0.12s;
    }

    .c-sp-menu__label {
        display: flex;
        align-items: baseline;
        gap: 0.8rem;
        margin: 0 0 0.4rem;
        color: #0c166f;
        font-size: 1.8rem;
        font-weight: 700;
    }

    .c-sp-menu__label span {
        color: #ddc31b;
        font-size: 1.1rem;
        letter-spacing: 0.16em;
    }

    .c-sp-menu__group {
        margin-top: 1.6rem;
    }

    .c-sp-menu__group-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .c-sp-menu__group-title {
        margin: 0;
        padding-left: 1rem;
        border-left: 3px solid #0c166f;
        color: #1d2230;
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .c-sp-menu .c-sp-menu__see-all {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        color: #0c166f;
        font-size: 1.3rem;
        font-weight: 700;
    }

    .c-sp-menu__see-all::after {
        width: 0.6rem;
        height: 0.6rem;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: rotate(45deg);
        content: "";
    }

    .c-sp-menu__tiles {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.8rem;
        margin: 1rem 0 0;
        padding: 0;
        list-style: none;
    }

    .c-sp-menu .c-sp-menu__tile {
        display: grid;
        gap: 0.6rem;
        padding: 1.4rem 0.4rem 1.1rem;
        border: 1px solid #dbe6f1;
        border-radius: 1rem;
        background: #eef4fa;
        color: #0c166f;
        font-size: 1.3rem;
        font-weight: 700;
        text-align: center;
        place-items: center;
    }

    /* Property type icons are shown at their own size. */
    .c-sp-menu__tile-icon {
        display: block;
        width: auto;
        height: auto;
    }

    .c-sp-menu__pages {
        margin: 2.8rem 0 0;
        padding: 0;
        border-top: 1px solid #e6eaf0;
        list-style: none;
    }

    .c-sp-menu .c-sp-menu__pages a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 0.4rem;
        border-bottom: 1px solid #e6eaf0;
        color: #1d2230;
        font-size: 1.5rem;
        font-weight: 500;
    }

    .c-sp-menu__pages a::after {
        width: 0.6rem;
        height: 0.6rem;
        border-top: 1.5px solid #6b7484;
        border-right: 1.5px solid #6b7484;
        transform: rotate(45deg);
        content: "";
    }

    .c-sp-menu__cta {
        display: grid;
        gap: 1rem;
        margin-top: 2.8rem;
    }

    .c-sp-menu .c-sp-menu__contact,
    .c-sp-menu .c-sp-menu__tel {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 5.6rem;
        border-radius: 999px;
        font-weight: 700;
    }

    .c-sp-menu .c-sp-menu__contact {
        gap: 1rem;
        background: #ddc31b;
        color: #fff;
        font-size: 1.5rem;
    }

    /* cta-mail-icon (22 x 16) shown at its own size. */
    .c-sp-menu__contact-icon {
        width: auto;
        height: auto;
    }

    .c-sp-menu .c-sp-menu__tel {
        flex-direction: column;
        border: 1.5px solid #0c166f;
        background: #fff;
        color: #0c166f;
        line-height: 1.25;
    }

    .c-sp-menu__tel-number {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        font-size: 1.9rem;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.04em;
    }

    .c-sp-menu__tel-icon {
        width: 1.6rem;
        height: auto;
    }

    .c-sp-menu__tel small {
        color: #6b7484;
        font-size: 1.1rem;
        font-weight: 500;
    }
}

@media screen and (max-width: 1000px) and (prefers-reduced-motion: reduce) {
    .l-header.is-menu-open .l-header__nav,
    .c-sp-menu > * {
        transition: none;
    }
}
