/* Official Google Fonts build; see fonts/LICENSE-Waterfall.txt. */
@font-face {
    font-family: "Waterfall";
    src: url("../fonts/Waterfall-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/* Preserve the lettering's fine, connected strokes in the hero tagline only. */
.hero .hero-en {
    font-family: "Waterfall", cursive;
    font-size: clamp(46px, 4.4vw, 60px);
    font-style: normal;
    font-weight: 400;
    font-synthesis: none;
    font-kerning: normal;
    font-variant-ligatures: normal;
    letter-spacing: 0;
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: normal;
}

/* The reference treatment is scoped to the top-page photo collage only. */
.hero-photos.hero-photos--reference {
    --reference-gap: 4px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 32fr) minmax(0, 26fr) minmax(0, 10fr) minmax(0, 32fr);
    grid-template-rows: minmax(0, 55fr) minmax(0, 45fr);
    gap: var(--reference-gap);
    min-width: 0;
    background: #fff;
    container-type: inline-size;
}

.hero-photos--reference .photo {
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: #f4f4ee;
}

.hero-photos--reference .hero-photo-1 {
    grid-column: 1;
    grid-row: 1 / 3;
}

.hero-photos--reference .hero-photo-2 {
    grid-column: 2 / 4;
    grid-row: 1;
}

.hero-photos--reference .hero-photo-3 {
    grid-column: 2;
    grid-row: 2;
}

.hero-photos--reference .hero-photo-4 {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
    /* The upper-left notch interlocks with the wider tennis photo.
       Gap compensation keeps the white gutter equal along both edges. */
    --notch-x: calc(23.809524% + var(--reference-gap) * .76190476);
    --notch-y: calc(55% + var(--reference-gap) * .45);
    clip-path: polygon(var(--notch-x) 0, 100% 0, 100% 100%, 0 100%, 0 var(--notch-y), var(--notch-x) var(--notch-y));
}

.hero-photos--reference .photo > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Keep all photo crops here, without inline object-position attributes. */
.hero-photos--reference .hero-photo-1 > img {
    object-position: 50% 28%;
}

.hero-photos--reference .hero-photo-2 > img {
    object-position: 50% 31%;
}

.hero-photos--reference .hero-photo-3 > img {
    object-position: 50% 32%;
}

.hero-photos--reference .hero-photo-4 > img {
    object-position: 100% 0;
}

/* This is an independent HTML element: remove it after the opening period. */
.hero-photos--reference .hero-open-badge {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    width: clamp(140px, 23cqw, 240px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 11px;
    background: linear-gradient(145deg, #f5c8b7, var(--coral));
    color: #633b30;
    text-align: center;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: .04em;
    pointer-events: none;
}

.hero-photos--reference .hero-open-badge::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255, 254, 250, .65);
    border-radius: inherit;
    pointer-events: none;
}

.hero-open-badge__clinic,
.hero-open-badge__floor {
    display: block;
    font-size: clamp(10px, 1.35cqw, 15px);
    white-space: nowrap;
}

.hero-open-badge__floor {
    margin-top: 1px;
    letter-spacing: .09em;
}

.hero-open-badge__title {
    display: block;
    margin-top: 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3.3cqw, 37px);
    line-height: 1.15;
    letter-spacing: .015em;
    white-space: nowrap;
}

.hero-open-badge__date {
    display: block;
    margin-top: 4px;
    font-size: clamp(11px, 1.7cqw, 18px);
    line-height: 1.3;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* Keep the same interlocking composition at every breakpoint. */
@media (min-width: 761px) and (max-width: 1050px) {
    .hero-photos--reference .hero-photo-1 > img {
        object-position: 40% 28%;
    }

    .hero-photos--reference .hero-photo-4 > img {
        object-position: 84% 0;
    }
}

@media (max-width: 1050px) {
    .hero-photos--reference .hero-open-badge {
        top: 10px;
        right: 10px;
        width: 26cqw;
        gap: 2px;
        padding: 6px;
    }

    .hero-open-badge__clinic,
    .hero-open-badge__floor {
        font-size: clamp(8px, 1.9cqw, 11px);
        letter-spacing: 0;
    }

    .hero-open-badge__clinic {
        display: none;
    }

    .hero-open-badge__title {
        margin-top: 1px;
        font-size: clamp(17px, 4.8cqw, 27px);
    }

    .hero-open-badge__date {
        margin-top: 2px;
        font-size: clamp(9px, 2.7cqw, 14px);
    }
}

@media (max-width: 760px) {
    .hero .hero-en {
        font-size: clamp(44px, 11vw, 52px);
    }

    .hero-photos.hero-photos--reference {
        --reference-gap: 2px;
        height: 68vw;
        min-height: 0;
        max-height: none;
    }

    .hero-photos--reference .hero-open-badge {
        top: 7px;
        right: 7px;
        width: 26cqw;
    }

    .hero-open-badge__clinic,
    .hero-open-badge__floor {
        font-size: clamp(7px, 1.9cqw, 12px);
    }

    .hero-open-badge__title {
        font-size: clamp(15px, 4.8cqw, 29px);
    }
}
