/*
 * Homepage design version 2: styles for the sections few homepages use (forms,
 * staff, downloads, sponsors, testimonials, social, video, map, spacers,
 * season cards),
 * plus two-column sections and version 1 galleries and slideshows. Loaded
 * after hub-v2.css, and only on pages that have one of them
 * (hub_design.EXTRAS and EXTRAS_LAYOUTS).
 *
 * Same rules as hub-v2.css: no !important, hex colors only as custom-property
 * values, every selector scoped to html.hub-v2. The release gate keeps this
 * file under 24 KB.
 */

/* Spacers and dividers sit on the section before them, with no band padding. */
html.hub-v2 .hub2-band[data-hub2-thin] {
    padding-block: 0;
}
html.hub-v2 .hub2-spacer {
    display: flex;
    align-items: center;
    justify-content: center;
}
html.hub-v2 .hub2-rule {
    width: var(--w, 100%);
    margin: 0;
    border: 0;
    border-top: var(--t, 1px) var(--st, solid) color-mix(in oklab, var(--s-text) 30%, transparent);
    opacity: 1;
}

/* Registration options: one card per open season. */
html.hub-v2 .hub2-reg-option {
    padding: 1.25rem;
    border: 1px solid var(--s-line);
    border-radius: var(--hub2-r-lg);
    background: var(--s-card);
}
html.hub-v2 .hub2-reg-option.is-first {
    border-color: var(--s-accent);
    box-shadow: inset 0 0 0 1px var(--s-accent);
}
html.hub-v2 .hub2-reg-option .hub2-hero-actions {
    margin-top: 1rem;
}
html.hub-v2 .hub2-reg-option .hub2-action {
    display: inline-flex;
    margin-top: 0.85rem;
}
html.hub-v2 .hub2-donate {
    max-width: 32rem;
}

/* Sign-up form: labelled fields stacked in the card beside the copy. */
html.hub-v2 .hub2-lead .hub2-reg-card {
    gap: 0.85rem;
}
html.hub-v2 .hub2-field {
    display: grid;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--s-text);
}
html.hub-v2 .hub2-field :is(input, select) {
    border-radius: var(--hub2-r);
    font-weight: 400;
}
html.hub-v2 .hub2-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--s-text);
}
html.hub-v2 .hub2-lead .hub2-hero-actions {
    align-items: center;
    margin-top: 0.25rem;
}
html.hub-v2 .hub2-lead .hub-lead-form-status {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--s-text);
}

/* Embeds: a social feed, a video, a map. */
html.hub-v2 :is(.hub2-embed iframe, .hub2-map) {
    display: block;
    width: 100%;
    border: 0;
    border-radius: var(--hub2-r-lg);
}
html.hub-v2 .hub2-embed {
    margin-bottom: 1.5rem;
}
html.hub-v2 .hub2-embed iframe {
    min-height: 400px;
}
html.hub-v2 .hub2-video {
    overflow: hidden;
    border-radius: var(--hub2-r-lg);
    background: var(--hub2-dark);
}
html.hub-v2 .hub2-video :is(iframe, video) {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}
/* Small and Medium videos: the player narrows, centred under a centred heading,
   so the section still sits on the page's grid. */
html.hub-v2 .hub2-video-wrap {
    max-width: 48.75rem;
    margin-inline: auto;
    text-align: center;
}
html.hub-v2 .hub2-video-wrap[data-size="small"] {
    max-width: 33.75rem;
}
html.hub-v2 .hub2-video-wrap .hub2-sh {
    align-items: center;
}
html.hub-v2 .hub2-video-wrap .hub2-hero-actions {
    justify-content: center;
}

/* Season Cards: each season's photo across the top of its card, "Registration
   open" on the photo so every title starts level, and the buttons level along
   the bottom. */
html.hub-v2 .hub2-feats--photos {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
html.hub-v2 .hub2-feats--photos .hub2-feat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
html.hub-v2 .hub2-feats--photos .hub2-feat > div {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}
html.hub-v2 .hub2-feat-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--hub2-r-lg);
    object-fit: cover;
}
html.hub-v2 .hub2-feat-img + div .hub2-eyebrow {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--hub2-dark) 72%, transparent);
    backdrop-filter: blur(8px);
    color: var(--hub2-on-dark);
}
html.hub-v2 .hub2-feats--photos .hub2-feat-title {
    margin-top: 0;
    font-family: var(--hub2-f-display);
    font-weight: var(--hub2-d-weight);
    font-size: 1.6rem;
    line-height: var(--hub2-d-lh);
    letter-spacing: var(--hub2-d-track);
    text-transform: var(--hub2-d-case);
}
html.hub-v2 .hub2-feats--photos .hub2-hero-actions {
    margin-top: auto;
    padding-top: 1.25rem;
}

/* Testimonials: each quote a card of its own, the words in reading type and
   the player signed along the bottom, so every card ends level. */
html.hub-v2 .hub2-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}
html.hub-v2 .hub2-quote {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--hub2-r-lg);
    background: var(--s-card);
    box-shadow: inset 0 0 0 1px var(--s-line);
}
html.hub-v2 .hub2-quote-mark {
    display: block;
    height: 2.4rem;
    font: 700 4.5rem/1 var(--hub2-f-display);
    color: var(--s-accent);
}
html.hub-v2 .hub2-quote-stars {
    display: flex;
    gap: 0.15rem;
    margin: 0 0 1rem;
    color: var(--s-accent);
}
html.hub-v2 .hub2-quote blockquote {
    margin: 0 0 1.5rem;
}
html.hub-v2 .hub2-quote blockquote p {
    margin: 0;
    font: 500 clamp(1.05rem, 1.5vw, 1.1875rem)/1.55 var(--hub2-f-body);
    text-wrap: pretty;
    color: var(--s-text);
}
/* One quote is the section: set large, in the kit's display type. */
html.hub-v2 .hub2-quotes[data-count="1"] .hub2-quote {
    padding: clamp(1.75rem, 5vw, 3.5rem);
}
html.hub-v2 .hub2-quotes[data-count="1"] blockquote p {
    max-width: 32ch;
    font: var(--hub2-d-weight) clamp(1.75rem, 3.6vw, 2.6rem)/1.15 var(--hub2-f-display);
    letter-spacing: var(--hub2-d-track);
}
html.hub-v2 .hub2-quote figcaption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--s-line);
}
html.hub-v2 .hub2-quote figcaption b {
    display: block;
    color: var(--s-text);
}
html.hub-v2 .hub2-quote figcaption span span {
    font-size: 0.85rem;
    color: var(--s-muted);
}

/* Sponsors: every partner on a tile of the same size, logo or name centred,
   so a row of wordmarks reads as a wall of logos, not a line of text. The
   presenting partner's tile is as tall as the tiles beside it. */
html.hub-v2 .hub2-sponsors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
}
html.hub-v2 .hub2-sponsors > div {
    display: flex;
    flex-direction: column;
}
html.hub-v2 .hub2-sponsor-label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--s-muted);
}
html.hub-v2 .hub2-sponsor-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
    gap: 0.75rem;
}
html.hub-v2 .hub2-sponsor {
    display: grid;
    place-items: center;
    min-height: 7.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--hub2-r-lg);
    background: var(--s-card);
    box-shadow: inset 0 0 0 1px var(--s-line);
    color: var(--s-text);
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.2s ease;
}
html.hub-v2 a.hub2-sponsor:hover {
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--s-text) 40%, transparent);
}
@media (max-width: 30rem) {
    html.hub-v2 .hub2-sponsor-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
html.hub-v2 .hub2-sponsor--title {
    flex: 1 1 auto;
    min-height: 10rem;
    padding: 2rem;
}
html.hub-v2 .hub2-sponsor-logo {
    max-width: 100%;
    max-height: 4.25rem;
    object-fit: contain;
}
html.hub-v2 .hub2-sponsor--title .hub2-sponsor-logo {
    max-height: 6.5rem;
}
/* A plain logo wall divides into even rows (--row-cols from the server: four
   partners read four across, seven read 4 + 3), each tile at most 16rem, so
   the logos are big without one partner stretched across the page. */
@media (min-width: 40rem) {
    html.hub-v2 .hub2-band > .hub-block-card .hub2-sponsor-row--cloud {
        --row-n: var(--row-cols-md, 3);
        grid-template-columns: repeat(var(--row-n), minmax(0, 1fr));
        max-width: calc(var(--row-n) * 16rem + (var(--row-n) - 1) * 0.75rem);
    }
}
@media (min-width: 64rem) {
    html.hub-v2 .hub2-band > .hub-block-card .hub2-sponsor-row--cloud {
        --row-n: var(--row-cols, 5);
    }
}
html.hub-v2 .hub2-sponsor-logo.is-gray {
    filter: grayscale(1);
}
html.hub-v2 .hub2-wordmark {
    font: var(--hub2-d-weight) 1.2rem/1.05 var(--hub2-f-display);
    letter-spacing: var(--hub2-d-track);
    text-transform: var(--hub2-d-case);
    text-wrap: balance;
}
html.hub-v2 .hub2-sponsor--title .hub2-wordmark {
    font-size: clamp(2rem, 4vw, 3rem);
}

/* Sponsor spotlight: the partner's mark on a panel above its details, and one
   partner alone gets the whole row, mark beside the words. */
html.hub-v2 .hub2-spots .hub2-tile {
    gap: 0;
    padding: 0;
    overflow: hidden;
}
html.hub-v2 .hub2-spot-mark {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 8rem;
    padding: 1.5rem;
    background: color-mix(in oklab, var(--s-text) 5%, transparent);
    color: var(--s-text);
    text-align: center;
}
html.hub-v2 .hub2-spot-mark .hub2-sponsor-logo {
    max-height: 4.5rem;
}
html.hub-v2 .hub2-spot-body {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 0.45rem;
    padding: 1.25rem;
}
/* Direct headings otherwise inherit the site's heading color, which can be
   dark even when this partner card is on a dark kit or section surface. */
html.hub-v2 .hub2-spots .hub2-tile-name {
    color: var(--s-text);
}
/* The brand text token is checked against the solid brand surface. Mixing a
   lighter card fill behind it can reduce small-heading contrast below 4.5. */
html.hub-v2 .hub2-surf-brand .hub2-spots .hub2-spot-body {
    background: var(--s-bg);
}
html.hub-v2 .hub2-spots[data-count="1"] {
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
    html.hub-v2 .hub2-band > .hub-block-card .hub2-spots[data-count="1"] .hub2-tile {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }
    html.hub-v2 .hub2-band > .hub-block-card .hub2-spots[data-count="1"] :is(.hub2-spot-mark, .hub2-spot-body) {
        min-height: 15rem;
        align-content: center;
    }
}
html.hub-v2 .hub2-spots[data-count="1"] .hub2-spot-mark .hub2-wordmark {
    font-size: clamp(2rem, 4vw, 3rem);
}
html.hub-v2 .hub2-spots[data-count="1"] .hub2-spot-body {
    padding: clamp(1.5rem, 4vw, 2.75rem);
}
html.hub-v2 .hub2-spots[data-count="1"] .hub2-tile-bio {
    max-width: 48ch;
    font-size: 1.0625rem;
}

/* Sign-up form: a white card on a light band, so the fields read as a form. */
html.hub-v2 .hub2-lead .hub2-reg-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 0;
    background: var(--s-card);
    box-shadow: inset 0 0 0 1px var(--s-line), 0 24px 48px -32px color-mix(in oklab, var(--hub2-dark) 45%, transparent);
}

/* One season open: its card runs the width, the buttons level with its name. */
@media (min-width: 48rem) {
    html.hub-v2 .hub2-band > .hub-block-card .hub2-feats[data-count="1"] > .hub2-reg-option {
        padding: clamp(1.5rem, 3vw, 2.25rem);
    }
    html.hub-v2 .hub2-band > .hub-block-card .hub2-feats[data-count="1"] > .hub2-reg-option > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 2rem;
    }
    html.hub-v2 .hub2-band > .hub-block-card .hub2-feats[data-count="1"] > .hub2-reg-option > div > * {
        grid-column: 1;
        justify-self: start;
    }
    html.hub-v2 .hub2-band > .hub-block-card .hub2-feats[data-count="1"] > .hub2-reg-option .hub2-hero-actions {
        grid-column: 2;
        grid-row: 1 / span 6;
        margin: 0;
    }
}

/* ---------- Two-column sections (hub_design.EXTRAS_LAYOUTS) ---------- */

/* Both columns as tall as the taller one, each section filling its column and
   sized by the column's width, so a half-width section reads like a phone. */
html.hub-v2 .hub2-band .hub-container-col {
    align-self: stretch;
    container-type: inline-size;
}
html.hub-v2 .hub2-band .hub-container-col > .hub-block-card > .hub-mobile-block {
    flex: 1 1 auto;
}
html.hub-v2 .hub2-band .hub-container-col .hub2-reg {
    height: 100%;
}
/* A photo-only Image & Text set to fill takes its column's full height. */
html.hub-v2 .hub2-band .hub-container-col .hub2-reg--photo [data-fit="cover"],
html.hub-v2 .hub2-band .hub-container-col .hub2-reg--photo [data-fit="cover"] img {
    height: 100%;
}
html.hub-v2 .hub2-band .hub-container-col .hub2-reg--photo [data-fit="cover"] img {
    min-height: 16rem;
    aspect-ratio: auto;
}
/* A Call to Action in a column is a card of its own, filling the column: its
   photo (or the kit's dark color) behind its words, not across the whole row. */
html.hub-v2 .hub2-band .hub-container-col .hub-mobile-block:has(> .hub2-cta) {
    --s-text: var(--hub2-on-dark);
    --s-muted: color-mix(in oklab, var(--hub2-on-dark) 80%, var(--hub2-deep));
    --s-accent: var(--hub2-brand-text-on-dark);
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: center;
    min-height: 16rem;
    overflow: hidden;
    padding: clamp(1.75rem, 7cqi, 3rem);
    border-radius: var(--hub2-r-lg);
    background: var(--hub2-deep);
}
html.hub-v2 .hub2-band .hub-container-col :is(.hub2-cta-photo, .hub2-cta-photo + .hub2-hero-scrim) {
    inset: 0;
    width: 100%;
}
html.hub-v2 .hub2-band .hub-container-col .hub2-cta .hub2-title--xl {
    font-size: clamp(1.9rem, 8cqi, 2.75rem);
}
@container (max-width: 40rem) {
    /* News in a column: the lead story, then the rest under it, never a list
       squeezed beside the photo one word to a line. */
    html.hub-v2 :is(.hub2-reg, .hub2-news) {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
    html.hub-v2 .hub2-news-lead .hub2-news-title {
        font-size: clamp(1.5rem, 6cqi, 2rem);
    }
    /* Four numbers two by two, never three and a lone one. */
    html.hub-v2 .hub2-facts[data-count="4"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    html.hub-v2 .hub2-reg-media {
        order: -1;
    }
    html.hub-v2 .hub2-reg .hub2-title--xl {
        font-size: clamp(1.9rem, 8cqi, 2.75rem);
    }
    /* A narrow registration card has its photo across the top, edge to edge,
       and its words centred in the rest of the column's height. */
    html.hub-v2 .hub-container-col .hub2-reg--banner:has(> .hub2-reg-media) {
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
    }
    html.hub-v2 .hub-container-col .hub2-reg--banner > .hub2-reg-copy {
        align-self: center;
    }
    html.hub-v2 .hub-container-col .hub2-reg--banner > .hub2-reg-media {
        margin: calc(-1 * var(--hub2-card-pad)) calc(-1 * var(--hub2-card-pad)) 0;
    }
    html.hub-v2 .hub-container-col .hub2-reg--banner > .hub2-reg-media img {
        aspect-ratio: 16 / 9;
        border-radius: 0;
        object-position: 50% 25%;
    }
}
/* A registration banner in a column is a card of its own, filling the column,
   on the brand color the section has at full width. Nothing sits behind its
   words: a photo behind them in a column was muddy and hard to read. */
html.hub-v2 .hub2-band .hub-container-col .hub2-reg--banner {
    --s-text: var(--hub2-on-brand);
    --s-muted: color-mix(in oklab, var(--hub2-on-brand) 84%, var(--hub2-brand));
    --s-accent: var(--hub2-on-brand);
    --hub2-card-pad: clamp(1.5rem, 6cqi, 2.75rem);
    align-content: center;
    overflow: hidden;
    padding: var(--hub2-card-pad);
    border-radius: var(--hub2-r-lg);
    background: var(--hub2-brand);
    color: var(--s-text);
}
/* On a brand band the card is a shade of the band. Its button is dark either way. */
html.hub-v2 .hub2-surf-brand .hub-container-col .hub2-reg--banner {
    background: var(--s-card);
}
html.hub-v2 .hub2-band .hub-container-col .hub2-reg--banner .hub2-btn--primary {
    background: var(--hub2-dark);
    color: var(--hub2-on-dark);
}
/* Beside a photo the card is words only: the photo next to it is the picture,
   so the same photo never shows twice in one row. */
html.hub-v2 .hub2-band .hub-container-row:has(.hub2-reg--photo, .hub-block-card--split-gallery, .hub-block-card--split-slideshow) .hub2-reg--banner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-content: center;
}
html.hub-v2 .hub2-band .hub-container-row:has(.hub2-reg--photo, .hub-block-card--split-gallery, .hub-block-card--split-slideshow) .hub2-reg--banner > .hub2-reg-media {
    display: none;
}

/* ---------- Version 1 galleries on a band ---------- */

/* Three photos: the big one beside two stacked ones. Version 1 stretches the
   stacked photos to the row and keeps them 16:10, so they grew wider than their
   track and ran off the page; here they keep their track's width. */
html.hub-v2 .gallery-grid--mosaic.trio-images:not([data-image-fit="contain"]) .gallery-item:not(:first-child) {
    align-self: start;
    min-width: 0;
}
/* The big photo fills the height of the two beside it, whatever its own shape. */
html.hub-v2 .gallery-grid--mosaic.trio-images:not([data-image-fit="contain"]) .gallery-item:first-child img {
    position: absolute;
    inset: 0;
}

/* Compose the rendered tiles, including the view-all tile when uploads exceed
   the gallery cap: five as a feature, six three across, seven four over three.
   Eight visible tiles keep version 1's four across. Phones keep two across. */
html.hub-v2 .hub2-band .hub-gallery-composition:not([data-image-fit="contain"]) > .gallery-item:first-child:nth-last-child(5) {
    grid-column: span 2;
    grid-row: span 2;
    align-self: stretch;
}
html.hub-v2 .hub2-band .hub-gallery-composition:not([data-image-fit="contain"]) > .gallery-item:first-child:nth-last-child(5) img {
    position: absolute;
    inset: 0;
}
@media (min-width: 769px) {
    html.hub-v2 .hub2-band .hub-gallery-composition[data-visible-count="5"] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    html.hub-v2 .hub2-band .hub-gallery-composition[data-visible-count="6"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    html.hub-v2 .hub2-band .hub-gallery-composition[data-visible-count="7"] {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    html.hub-v2 .hub2-band .hub-gallery-composition[data-visible-count="7"] > .gallery-item {
        grid-column: span 3;
    }
    html.hub-v2 .hub2-band .hub-gallery-composition[data-visible-count="7"] > .gallery-item:nth-child(n+5) {
        grid-column: span 4;
    }
}

/* ---------- Version 1 slideshows on a band ---------- */

/* The title in the kit's display type like every other section, and the
   photo on a dark frame: a photo narrower than the frame is framed, instead
   of floating on the band. */
html.hub-v2.hub-page .hub2-band .hub-block-card--slideshow:has(> .hub-slideshow-composition[data-hero-mode="standard"]) > .hub-slideshow-heading .hub-slideshow-heading__title {
    font-family: var(--hub2-f-display);
    font-weight: var(--hub2-d-weight);
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    line-height: var(--hub2-d-lh);
    letter-spacing: var(--hub2-d-track);
    text-transform: var(--hub2-d-case);
    color: var(--s-text);
}
html.hub-v2 .hub2-band .hub-block-card--slideshow > .hub-slideshow-composition[data-frame-style="simple"] {
    border-radius: var(--hub2-r-lg);
    background: var(--hub2-dark);
}

html.hub-v2 .hub2-address {
    white-space: pre-line;
}

/* Staff and partner tiles: a photo or logo at the top of the tile. */
html.hub-v2 .hub2-tile .hub2-sponsor-logo {
    margin-bottom: 0.25rem;
}
