/**
 * Region meeting rooms band.
 *
 * Loaded by inc/region-page.php on region archives only (/texas/dallas/ and the rest), for
 * the band templates/region-template.php renders through
 * blocks/region-editorial-meeting-rooms.php, directly under #additional-services: a
 * photograph across the measure with the heading, the line under it and the booking button
 * set over its foot.
 *
 * It is section 8 of css/location-editorial.css on the `amenities-bar` branch, the rules the
 * same band takes on the Editorial location template, so the two read as one design. What
 * differs is only where the air around it comes from. There the band falls between two
 * sections that carry no padding where they meet it, so its 60px top margin is the whole gap
 * and it needs none underneath. Here #additional-services closes on the template's own
 * `.page-section` padding, which would have put 160px between the cards and the band, so that
 * padding is zeroed and the band carries it below instead — the same 60px above, and
 * everything under the band exactly where it was.
 *
 * No scoping rule of its own: every selector below is on the `.lmr-*` namespace, which
 * nothing else on the page carries, and `.entry-content` is only there to outrank the
 * site-wide heading and button rules.
 *
 * Nothing here may reach `.lmr-*`'s namesakes on the service template — blocks/location-
 * meeting-rooms.php and css/meeting-rooms.css are a different section entirely, the grid of
 * bookable `meeting_room` posts, and share no class with this one.
 *
 * @see blocks/region-editorial-meeting-rooms.php
 * @see templates/region-template.php
 */


/* blocks/region-editorial-meeting-rooms.php, directly under #additional-services: a
   photograph across the measure with the heading, the line under it and the booking button
   set over its foot.

   The copy sits on the picture rather than beside it, so everything here is about keeping it
   readable: the scrim is a gradient that only darkens the bottom half, and the type over it
   is cream rather than white, the same #EDEAE3 the cream panels use. */

/* The band is a bare section, not a `.wp-block-group`, so none of the site-wide group rules
   reach it: the measure is set here, to the same 1280px and 1rem gutter the inner container
   takes at style.css:7003, so the picture lines up with the cards above it at every width.

   On the Editorial template the sections either side carry no padding where they meet the
   band, so its top margin is the whole of the air above it. This template's sections do carry
   padding — `.page-section` closes on 100px, 60px below 881px — so #additional-services is
   zeroed at the foot of this file and the band takes that air on instead: 60px of its own
   above, and the 100/60 the section used to end on below, so the CTA under it keeps the gap
   it has always had. Written as the one `margin` rather than as an override further down,
   since the shipped `0` would otherwise read as deliberate. */
.lmr-band {
    position: relative;
    display: block;
    width: 100%;
    max-width: 1280px;
    margin: 60px auto 100px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.lmr-photo {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
    /* Every photograph on this template is squared off (section 3). */
    border-radius: 0;
}

/* Two gradients, not one. The upward one carries the button and the line above it; the one
   from the left carries the heading, which runs into the middle of the frame where a
   bottom-up scrim has already faded out. Neither reaches the top right, so the room is still
   a room: a scrim over the whole frame would flatten it into a grey field.

   Inset by the band's own gutter so it covers the picture and not the page margin. */
.lmr-scrim {
    position: absolute;
    top: 0;
    right: 1rem;
    bottom: 0;
    left: 1rem;
    display: flex;
    align-items: flex-end;
    padding: 0 40px 40px;
    box-sizing: border-box;
    background-image:
        linear-gradient(to top, rgba(18, 18, 15, 0.82) 0%, rgba(18, 18, 15, 0.45) 38%, rgba(18, 18, 15, 0) 72%),
        linear-gradient(to right, rgba(18, 18, 15, 0.62) 0%, rgba(18, 18, 15, 0.25) 38%, rgba(18, 18, 15, 0) 62%);
    pointer-events: none;
}

/* The scrim takes no pointer so the picture is not covered by a dead layer; the button
   inside it has to take one back. */
.lmr-copy {
    max-width: 560px;
    pointer-events: auto;
}

/* An unqualified h2 would take --fs-heading-lg from the heading scale: only
   `h2.wp-block-heading` carries the site's size override (style.css:23561), and this heading
   is not a block. 32px rising to 40px, a step under the section headings above it. */
.entry-content .lmr-title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--color-bg-inverse);
    /* Without this the line breaks after "kind of" and leaves "day." alone on the second
       row. Browsers that do not balance fall back to that same break, which is untidy
       rather than broken. */
    text-wrap: balance;
}

.lmr-text {
    margin: 12px 0 0;
    max-width: 560px;
    font-size: var(--fs-body-md-ui);
    line-height: 1.5;
    color: rgba(237, 234, 227, 0.9);
}

/* Cream fill, dark label: the one solid light button on the page, and the only thing that
   reads as a button against a photograph. Typeset like every other call to action on the
   site - uppercase and letterspaced - a size up from the small ones, since it carries a
   whole band on its own. */
.entry-content a.lmr-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 24px;
    min-height: 56px;
    padding: 0 36px;
    border-radius: var(--radius-sm, 4px);
    background: var(--color-bg-inverse);
    color: var(--color-text-inverse);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    /* A two-line button looks like a broken one. The phone sizes below keep the label
       inside the column rather than relying on this to hide an overflow. */
    white-space: nowrap;
    transition: background var(--transition-ease-in-out), color var(--transition-ease-in-out);
}

.entry-content a.lmr-btn:hover {
    background: var(--color-text-accent);
    color: var(--color-text-inverse);
}

.entry-content a.lmr-btn:focus-visible {
    outline: 2px solid var(--color-bg-inverse);
    outline-offset: 3px;
}

@media only screen and (max-width: 1100px) {

    .lmr-photo {
        height: 440px;
    }

    .lmr-scrim {
        padding: 0 32px 32px;
    }

    .lmr-band {
        margin-top: 48px;
    }
}

@media only screen and (max-width: 880px) {

    /* Taller, not shorter: at this width the picture is narrow enough that 440px would crop
       the room to a strip, and the copy over it needs the room to breathe. */
    .lmr-photo {
        height: 480px;
    }

    /* 60px below, because that is what `.page-section` closes on at this width and the band
       is carrying the section's air (see the note on .lmr-band above). */
    .lmr-band {
        margin-top: 36px;
        margin-bottom: 60px;
    }

    .lmr-scrim {
        padding: 0 24px 28px;
        /* A narrow column puts more type over the picture, so the upward scrim reaches
           higher and the one from the left is dropped: at this width it would cover the
           frame rather than one side of it. */
        background-image: linear-gradient(to top, rgba(18, 18, 15, 0.86) 0%, rgba(18, 18, 15, 0.55) 55%, rgba(18, 18, 15, 0.12) 90%);
    }

    /* "Reserve a Meeting Room" is 22 letterspaced capitals; at the desktop size it comes to
       within a few pixels of the column and wraps. A step down in both the type and the
       padding leaves it a comfortable margin at 390px. */
    .entry-content a.lmr-btn {
        margin-top: 20px;
        min-height: 52px;
        padding: 0 24px;
        font-size: 12px;
    }
}

/* Phones: a square rather than a 480px strip. At 390px the column is ~358px wide, so the
   fixed height read as a tall portrait; a 1:1 frame keeps the room recognisable and still
   leaves the heading, line and button room over the bottom half. Stops at 600px because a
   square at tablet widths would run past 800px tall. */
@media only screen and (max-width: 600px) {

    .lmr-photo {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}



/* The band belongs to the section above it, so the two meet on the band's own 60px rather
   than on that plus the section's closing padding, which came to 160px at this width and read
   as a break between them. The air is not lost: the band carries it below instead
   (`margin-bottom` on .lmr-band), so everything under this point sits exactly where it did.

   Scoped to `region-meeting-rooms-band`, which inc/region-page.php adds on region archives
   only. `.tax-region` would be wrong here: the region service subpages carry it too, and
   their own #additional-services is the shared card row with no band under it to take the
   padding on. */
.region-meeting-rooms-band #additional-services.page-section {
    padding-bottom: 0;
}
