/*
 * The Hive - What We Offer sections
 * Bookable spaces (tabs), additional amenities.
 * Sizes follow the 1440px Figma frame through --u (see app.css).
 */

/* ------------------------------------------------------------------ Spaces */

/* Mist fading into the navy page over the first 952px */
.spaces {
    padding-top: max(64px, calc(84 * var(--u)));
    background: linear-gradient(180deg, var(--mist), rgba(245, 243, 245, 0)) top / 100% max(700px, calc(952 * var(--u))) no-repeat;
}

.spaces__intro {
    color: #000;
    text-align: center;
}

.spaces__eyebrow {
    font-weight: 600;
    font-size: max(16px, calc(20 * var(--u)));
    line-height: 1.95;
    text-transform: uppercase;
}

.spaces__title {
    margin-top: max(20px, calc(39 * var(--u)));
    font-family: var(--font-display);
    font-weight: 400;
    font-size: max(24px, calc(37 * var(--u)));
    line-height: 1.054;
}

.spaces__rooms {
    margin-top: max(56px, calc(120 * var(--u)));
}

.spaces__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: 20px;
}

.spaces__tabs[hidden] {
    display: none;
}

.spaces__tabs .btn {
    min-width: 112px;
    padding: 0 24px;
    font-size: 18px;
}

/* The selected tab drops the blend: solid navy with its grey border */
.spaces__tabs .btn.is-active::before {
    mix-blend-mode: normal;
}

.spaces__tabs .btn.is-active:hover {
    transform: none;
}

/* Room card: grey in soft-light blend, lightening whatever it sits on */
.room {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 579fr) minmax(0, 652fr);
    column-gap: max(32px, calc(71 * var(--u)));
    min-height: max(560px, calc(711 * var(--u)));
    padding: 13px 0 13px 16px;
    border-radius: var(--radius);
    color: var(--mist);
}

.room::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #c4c4c4;
    mix-blend-mode: soft-light;
}

.room + .room {
    margin-top: 20px;
}

.room[hidden] {
    display: none;
}

.room.is-entering .room__media,
.room.is-entering .room__body {
    animation: room-in 0.45s var(--ease);
}

@keyframes room-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.room__media {
    position: relative;
}

.room__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* The booking button shares the opening hours row, on the right */
.room__body {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    padding: calc(82 * var(--u)) max(24px, calc(44 * var(--u))) 32px 0;
}

.room__name,
.room__details {
    grid-column: 1 / -1;
}

.room__name {
    max-width: 626px;
    margin-left: -5px;
    padding: 0 0 calc(53 * var(--u)) 5px;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: max(44px, calc(70 * var(--u)));
    line-height: 1;
}

/* Seated and standing capacity side by side, then room type and hours */
.room__details {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 255fr) minmax(0, 366fr);
    row-gap: max(36px, calc(77 * var(--u)));
    margin-top: max(28px, calc(44 * var(--u)));
}

.room__detail--type,
.room__detail--hours {
    grid-column: 1 / -1;
}

.room__detail dt {
    font-size: max(18px, calc(24 * var(--u)));
    line-height: 25px;
}

/* Room type copy carries its designed line breaks */
.room__detail dd {
    margin-top: 15px;
    font-weight: 600;
    font-size: max(22px, calc(30 * var(--u)));
    line-height: 1;
}

/* Laid over the right of the hours row, centred on the value */
.room__book {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    min-width: 221px;
    margin: 0 calc(21 * var(--u)) -2px 0;
    padding: 0 12px;
}

/* ------------------------------------------------------------------ Amenities */

/* The last row sits 80px above the photo banner (21px here + the banner's 59px) */
.amenities {
    padding: max(48px, calc(61 * var(--u))) 0 max(16px, calc(21 * var(--u)));
}

.amenities__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 46px;
    margin-top: max(56px, calc(75 * var(--u)));
    padding-left: calc(100 * var(--u));
}

/* Icon centred in a 96px slot left of the label */
.amenity {
    position: relative;
    padding-left: 96px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    line-height: 25px;
}

.amenity__icon {
    position: absolute;
    top: 50%;
    left: 48px;
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ------------------------------------------------------------------ Laptop */

@media (max-width: 1199px) {
    .amenity {
        padding-left: 76px;
    }

    .amenity__icon {
        left: 38px;
    }
}

/* ------------------------------------------------------------------ Tablet */

@media (max-width: 1023px) {
    /* Too narrow to share the hours row - the button goes under it */
    .room__book {
        grid-row: 3;
        grid-column: 1 / -1;
        justify-self: start;
        margin: 32px 0 0;
    }

    .amenities__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 0;
    }
}

/* ------------------------------------------------------------------ Phone */

@media (max-width: 767px) {
    .spaces__eyebrow {
        line-height: 1.3;
    }

    .spaces__title br {
        display: none;
    }

    .spaces__tabs .btn {
        min-width: 0;
        padding: 0 18px;
        font-size: 16px;
    }

    .room {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 12px;
    }

    .room__media {
        aspect-ratio: 4 / 3;
    }

    .room__body {
        display: block;
        padding: 28px 8px 16px;
    }

    .room__name {
        padding-bottom: 20px;
    }

    .room__details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
    }

    .room__detail dd br {
        display: none;
    }

    .amenities__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 40px;
    }

    .amenity {
        padding-left: 64px;
        font-size: 14px;
        line-height: 20px;
    }

    .amenity__icon {
        left: 28px;
    }
}
