/*
 * The hospitality-group band.
 *
 * One quiet line at the foot of the footer: the group's name on the left, every
 * venue's mark on the right. It is a sign-off, not a section — the venue's own
 * footer is what the page is about, so the band stays smaller and dimmer than
 * anything above it and only a mark under the pointer comes up to full colour.
 *
 * COLOUR AND TYPE ARE FIXED, DELIBERATELY. They are not the host theme's
 * roles. Dr Goodes' footer is the page's own ink and the Kurrajong's is an
 * inverted band, so the same role resolves to different values on the two
 * sites and the band would not match itself across the group. Re-skinning a
 * venue must not move these.
 *
 * Only the column alignment follows the host: --container and --gutter are
 * read from the theme so the band lines up with whatever page it sits in, and
 * both carry fallbacks for a theme that defines neither.
 *
 * Written as plain CSS, not through a theme's build: the plugin has no build
 * step, and a stylesheet each venue compiles for itself is a copy that can
 * drift — which is the whole reason this moved out of the themes.
 */

.hhl-group {
    --hhl-group-text: #f6f2e9;
    /* 0.58, not lighter: at 0.45 the label measured 3.9:1 on the Kurrajong's
       #24282a. This is 5.5:1 there and 6.3:1 on Dr Goodes' black. */
    --hhl-group-text-muted: rgba(246, 242, 233, 0.58);
    --hhl-group-accent: #d0a35e;
    --hhl-group-border: rgba(246, 242, 233, 0.18);

    /* The height every mark is measured against. One number moves the whole
       row; a venue's own `scale` in the roster is a multiple of it. */
    --hhl-group-slot: 1.75rem;

    /* A mark at rest. Still over 5:1 on either ground, which a graphic needs
       only 3:1 of. */
    --hhl-group-rest: 0.62;

    border-top: 0.0625rem solid var(--hhl-group-border);
    margin-left: calc(-1 * var(--gutter, 1.5rem));
    margin-right: calc(-1 * var(--gutter, 1.5rem));
    padding-left: var(--gutter, 1.5rem);
    padding-right: var(--gutter, 1.5rem);
}

/* The label and the row share one line while they fit, and the row drops under
   the label, still right-aligned, once they do not. The break is wrapping, not
   a breakpoint, so it lands wherever this roster's width says it should — a
   venue added to the group moves it without anyone re-measuring. */
.hhl-group__container {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem 3rem;
    justify-content: space-between;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--container, 75rem);
    padding: 1.125rem 0;
    width: 100%;
}

/* Small tracked capitals in the host's sans — the one thing that follows the
   theme, because a venue's text face is the only part of this the group has no
   opinion about. Muted rather than gold: the accent is kept for the hover. */
.hhl-group__label {
    color: var(--hhl-group-text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.5;
    margin: 0;
    text-transform: uppercase;
}

/* margin-left: auto holds the row to the right on a line of its own, where
   space-between has nothing to push against. */
.hhl-group__venues {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem 2rem;
    justify-content: flex-end;
    list-style: none;
    margin: 0 0 0 auto;
    min-width: 0;
    padding: 0;
}

/* Without min-width: 0 an item's automatic minimum is its mark's declared
   width, and the mark's max-width could never clamp it. */
.hhl-group__venues li {
    margin: 0;
    min-width: 0;
}

/* One height for every cell, so marks of different scales centre on the same
   line. 1.3, because the tallest scale in the roster is 1.24. */
.hhl-group__venues a,
.hhl-group__venues > li > span {
    align-items: center;
    color: var(--hhl-group-text);
    display: flex;
    height: calc(var(--hhl-group-slot) * 1.3);
    opacity: var(--hhl-group-rest);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* The mark is currentColor, so it warms and brightens at once. */
.hhl-group__venues a:hover,
.hhl-group__venues a:focus-visible {
    color: var(--hhl-group-accent);
    opacity: 1;
}

/* The venue's mark, drawn as a mask: the file contributes only its alpha, so a
   black wordmark, a white script and a greyscale rule all arrive in
   --hhl-group-text. Sized from the ratio and scale the roster declares, never
   from the file's own dimensions. aspect-ratio is what keeps the height honest
   when max-width clamps a wide mark in a narrow row. */
.hhl-group__mark {
    aspect-ratio: var(--hhl-group-ratio, 1);
    background: currentColor;
    display: block;
    height: calc(var(--hhl-group-slot) * var(--hhl-group-scale, 1));
    max-width: 100%;
    width: calc(var(--hhl-group-slot) * var(--hhl-group-scale, 1) * var(--hhl-group-ratio, 1));
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Read, not shown: at this size a caption under every mark would double the
   band's height, and a suburb matters to someone choosing a venue by ear more
   than to someone who can see the marks. */
.hhl-group__suburb {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* A venue with no artwork says its name instead, sized to sit among the marks
   rather than over them. */
.hhl-group__name {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

/* On a phone the label always has a line to itself, so the row follows it from
   the left edge rather than hanging off the right under a left-set line. */
@media (max-width: 47.99rem) {
    .hhl-group {
        --hhl-group-slot: 1.4rem;
    }

    .hhl-group__venues {
        gap: 0.75rem 1.25rem;
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media print {
    .hhl-group {
        display: none;
    }
}
