/* -----------------------------------------------------------------------------
   Custom element styles. Bootstrap utility classes do the heavy lifting in the
   markup; this file only covers what utilities can't express.
   ----------------------------------------------------------------------------- */

/* Reserve space for the fixed-top navbar so page content isn't hidden behind it.
   `scroll-padding-top` keeps in-page anchor jumps (#id links) landing below the
   header instead of underneath it. */
body {
    padding-top: var(--header-height);
    background-color: var(--page-bg);
    /* Guards against the tiny horizontal scroll a full-bleed section can cause:
       100vw includes the always-on vertical scrollbar width.
       `clip` (not `hidden`) so body doesn't become a vertical scroll container —
       `hidden` on one axis forces the other to `auto`, which produced a second
       scrollbar alongside html's overflow-y: scroll. */
    overflow-x: clip;

    /* Sticky footer: the page is at least one screen tall and <main> takes the
       spare height, so on a short page the footer sits at the bottom of the
       screen instead of floating mid-way; longer pages scroll as usual.
       (min-height includes the header padding — border-box.) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Full-bleed: break a section out of its container to span the viewport edge
   to edge, while its inner .container keeps the content aligned. */
.full-bleed {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}

html {
    scroll-padding-top: var(--header-height);
    /* Always show the vertical scrollbar so the layout width stays constant
       between pages that scroll and pages that don't — no horizontal shift. */
    overflow-y: scroll;
}

.show-now {
    opacity: 0;
    animation-fill-mode: forwards;
    animation-duration: 0.2s;
    animation-timing-function: ease-out;

    &.delay-1 {
        animation-delay: var(--animation-delay-1);
    }

    &.delay-2 {
        animation-delay: var(--animation-delay-2);
    }

    &.delay-3 {
        animation-delay: var(--animation-delay-3);
    }

    &.delay-4 {
        animation-delay: var(--animation-delay-4);
    }

    &.from-top {
        animation-name: show-from-top;
    }

    &.from-left {
        animation-name: show-from-left;
    }

    &.from-right {
        animation-name: show-from-right;
    }

    &.from-bottom {
        animation-name: show-from-bottom;
    }

    &.fade-in {
        animation-name: fade-in;
    }

    &:not([class*="delay-"]) {
        & + .show-now:not([class*="delay-"]) {
            animation-delay: 0.1s;

            & + .show-now:not([class*="delay-"]) {
                animation-delay: 0.2s;

                & + .show-now:not([class*="delay-"]) {
                    animation-delay: 0.3s;

                    & + .show-now:not([class*="delay-"]) {
                        animation-delay: 0.4s;

                        & + .show-now:not([class*="delay-"]) {
                            animation-delay: 0.5s;
                        }
                    }
                }
            }
        }
    }
}

.show-me {
    opacity: 0;
    animation-fill-mode: forwards;
    animation-duration: 0.2s;
    animation-timing-function: ease-out;

    &.on-screen {
        &.delay-1 {
            animation-delay: var(--animation-delay-1);
        }

        &.delay-2 {
            animation-delay: var(--animation-delay-2);
        }

        &.delay-3 {
            animation-delay: var(--animation-delay-3);
        }

        &.delay-4 {
            animation-delay: var(--animation-delay-4);
        }

        &.from-top {
            animation-name: show-from-top;
        }

        &.from-left {
            animation-name: show-from-left;
        }

        &.from-right {
            animation-name: show-from-right;
        }

        &.from-bottom {
            animation-name: show-from-bottom;
        }

        &.fade-in {
            animation-name: fade-in;
        }
    }
}

main.container {
    flex: 1 0 auto;
    padding-top: clamp(1.25rem, 4vw, 2rem);
    padding-bottom: clamp(2.5rem, 8vw, 5rem);
}

.page-home-index main.container {
    padding-top: 0;
    padding-bottom: 0;
}

/* Checkboxes hard-code their radius instead of reading --bs-border-radius. */
.form-check-input[type="checkbox"] {
    border-radius: 0;
}

/* Black Bootstrap button — a full variant, so it needs no .btn-primary underneath
   (whose blue border and disabled colours would otherwise show through). */
.btn-brand {
    --bs-btn-color: var(--white);
    --bs-btn-bg: var(--black);
    --bs-btn-border-color: var(--black);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: rgba(var(--black-rgb), 0.8);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--black);
    --bs-btn-active-border-color: var(--black);
    --bs-btn-disabled-color: var(--white);
    --bs-btn-disabled-bg: var(--black);
    --bs-btn-disabled-border-color: var(--black);
    --bs-btn-focus-shadow-rgb: var(--black-rgb);
}

/* -----------------------------------------------------------------------------
   White card surface — shared by page detail, home page cards and form cards.
   ----------------------------------------------------------------------------- */
.page-detail,
.page-card,
.form-card {
    background-color: var(--white);
    box-shadow: 0 0.25rem 1rem rgba(var(--black-rgb), 0.05);
}

/* -----------------------------------------------------------------------------
   Form card (checkout, sign-in, code) — the page title and the form in one white
   card. Sections are split by a hairline; the actions row keeps Turnstile on
   the left and the submit button on the right.
   ----------------------------------------------------------------------------- */
.form-card {
    max-width: 1100px;
    margin-inline: auto;
    /* 1rem minimum leaves room for Turnstile's 300px minimum on a 360px phone. */
    padding: clamp(1rem, 4vw, 2.5rem);

    &.form-card--narrow {
        max-width: 560px;
    }

    .form-card__intro {
        margin-bottom: 2rem;
        color: rgba(var(--black-rgb), 0.65);
        font-weight: 300;
    }

    /* Every section gets a hairline unless it opens the card right under the
       title — also the first one inside the <form> after the checkout summary. */
    :not(.page-title) + .form-card__section,
    .form-card__section + form > .form-card__section:first-of-type {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(var(--black-rgb), 0.08);
    }

    .form-card__section-title {
        margin-bottom: 1.25rem;
        font-size: 1.25rem;
        font-weight: 400;
    }

    .form-card__actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        margin-top: 2rem;

        .cf-turnstile {
            margin-right: auto;
        }

        /* Flexible widget (narrow forms): its own full-width row above the button. */
        .cf-turnstile[data-size="flexible"] {
            flex-basis: 100%;
            margin-right: 0;
        }
    }

    .form-card__footnote {
        margin: 1.5rem 0 0;
        font-size: 0.875rem;
        color: rgba(var(--black-rgb), 0.6);
    }
}

/* Sign-in code: spaced, centred digits that read like the code in the email. */
.login-code-input {
    font-family: var(--bs-font-monospace);
    letter-spacing: 0.3em;
    text-align: center;
}

/* Selectable tile around a radio (payment method): the whole box is the label. */
.choice-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    margin: 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;

    .form-check-input {
        flex-shrink: 0;
        margin: 0;
    }

    .bi {
        font-size: 1.25rem;
    }

    &:hover {
        border-color: rgba(var(--black-rgb), 0.4);
    }

    &:has(:checked) {
        border-color: var(--black);
        box-shadow: inset 0 0 0 1px var(--black);
    }
}

/* Highlighted note inside a card (bank-transfer instructions, retry a card
   payment): warm page background with a brand-coloured edge. */
.notice-box {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--page-bg);
    border-left: 3px solid var(--brand-400);

    > :last-child {
        margin-bottom: 0;
    }

    .notice-box__title {
        margin-bottom: 0.75rem;
        font-size: 1.1rem;
        font-weight: 500;
    }

    .notice-box__details {
        padding: 1rem 1.25rem;
        background-color: var(--white);
        font-family: var(--bs-font-monospace);
        line-height: 1.8;
    }
}

/* Label/value list on the account order page. */
.order-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.75rem 2rem;
    align-items: center;
    margin: 0;

    dt {
        font-weight: 400;
        color: rgba(var(--black-rgb), 0.6);
    }

    dd {
        margin: 0;
    }
}

/* Plain text link (form consent, footnotes) — same look as links in rich text. */
.text-link,
.rich-text a {
    color: var(--black);
    text-underline-offset: 0.2em;
    transition: opacity 0.2s ease;

    &:hover {
        color: var(--black);
        opacity: 0.6;
    }
}

#header {
    .navbar {
        background-color: rgba(var(--white-rgb), 0.7);
        backdrop-filter: var(--backdrop-filter);
    }

    .navbar-brand {
        font-size: 24px;
    }

    .nav-link {
        position: relative;
        font-size: 14px;
        color: var(--black);
        transition: opacity 0.2s ease;

        &:hover {
            opacity: 0.7;
        }
    }

    .navbar__menu {
        gap: 0 0.75rem;

        .nav-link.active {
            font-weight: 500;

            &::after {
                content: "";
                position: absolute;
                bottom: 0.25rem;
                left: var(--bs-navbar-nav-link-padding-x);
                width: calc(100% - var(--bs-navbar-nav-link-padding-x) * 2);
                height: 1px;
                background-color: var(--black);
            }
        }
    }

    .navbar__languages .nav-link {
        font-size: 12px;
    }

    .navbar-toggler {
        font-size: 1rem;
    }
}

@media (max-width: 991.98px) {
    #header {
        .navbar__languages {
            border-left: 1px solid rgba(var(--black-rgb), 0.1);
            margin-left: 0.5rem;
            padding-left: 0.5rem;
        }

        .navbar__menu {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.5rem 0.75rem;

            .nav-link.active {
                &::after {
                    left: 0;
                    width: 100%;
                }
            }
        }

        .navbar__actions {
            flex-direction: row;
            flex-wrap: nowrap;
            justify-content: center;
            align-items: center;

            > .nav-item > .nav-link {
                padding-inline: 0.75rem;
            }
        }
    }
}

/* -----------------------------------------------------------------------------
   Banner slider (parts/banner-slider) — a Bootstrap fade carousel whose slides
   are stacked in one grid cell instead of display:none, so the section is as
   tall as its tallest slide and the page below never jumps. A slide that is not
   showing drops its show-now/show-me animation; it runs again when the slide
   comes in, so every banner enters with its own element transitions.
   ----------------------------------------------------------------------------- */
.banner-slider {
    .carousel-inner {
        display: grid;

        &::after {
            display: none; /* Bootstrap's float clearfix, not needed in a grid */
        }
    }

    .carousel-item {
        grid-area: 1 / 1;
        display: block;
        float: none;
        margin-right: 0;
        visibility: hidden;

        &.active,
        &.carousel-item-next,
        &.carousel-item-prev {
            visibility: visible;
        }

        &:not(.active, .carousel-item-next, .carousel-item-prev) :is(.show-now, .show-me) {
            animation-name: none;
        }

        /* Bootstrap keeps the outgoing slide fully shown until the incoming one
           has faded in; slides without their own background would overlap. */
        @media (prefers-reduced-motion: no-preference) {
            &.active.carousel-item-start,
            &.active.carousel-item-end {
                transition: opacity 0.3s ease;
            }
        }
    }

    /* Dots: the current one is larger. The transparent border is the click area. */
    .banner-slider__dots {
        align-items: center;
        margin-bottom: 1rem;

        [data-bs-target] {
            box-sizing: content-box;
            width: 0.5rem;
            height: 0.5rem;
            margin: 0;
            border: 0.5rem solid transparent;
            border-radius: 50%;
            background-color: var(--white);
            transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;

            &.active {
                width: 0.875rem;
                height: 0.875rem;
            }
        }
    }
}

/* -----------------------------------------------------------------------------
   Home hero banner — full-viewport image with centred title/description/CTA.
   Pulled up by the header height so the image sits BEHIND the translucent
   fixed navbar (unlike the rest of the site, whose content starts below it).
   ----------------------------------------------------------------------------- */
.hero-banner {
    margin-top: calc(-1 * var(--header-height));
    overflow: hidden;

    .carousel-item {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .hero-banner__image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-banner__overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(var(--black-rgb), 0.4);
    }

    .hero-banner__content {
        position: relative; /* above the overlay */
        /* Keep content clear of the fixed navbar on short viewports. */
        padding-block: calc(var(--header-height) + 2rem);
        color: var(--white);
        max-width: 900px;
    }

    .hero-banner__title {
        font-size: clamp(2.5rem, 7vw, 5rem);
        font-weight: 600;
        margin-bottom: 1.5rem;
    }

    .hero-banner__description {
        font-size: clamp(1rem, 2.5vw, 1.4rem);
        font-weight: 300;
        max-width: 40rem;
        margin: 0 auto 2rem;
    }
}

/* -----------------------------------------------------------------------------
   Above-footer CTA banner — dark full-width band: text + button on the left,
   image on the right. Random active banner of type AboveFooter.
   ----------------------------------------------------------------------------- */
.cta-banner {
    background-color: var(--black);
    color: rgba(var(--white-rgb), 0.75);
    padding-block: clamp(3rem, 8vw, 6rem);

    .cta-banner__title {
        position: relative;
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 300;
        color: var(--white);
        padding-bottom: 1.25rem;
        margin-bottom: 1.5rem;

        /* Short underline accent — white variant of the section-title accent. */
        &::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 5rem;
            height: 1px;
            background-color: rgba(var(--white-rgb), 0.6);
        }
    }

    .cta-banner__description {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 2rem;
        font-weight: 300;
        color: var(--white);
    }

    .cta-banner__image {
        width: 100%;
        height: 100%;
        max-height: 32rem;
        object-fit: cover;
        object-position: center;
    }
}

/* -----------------------------------------------------------------------------
   Accent feature (home) — one random accent event type as a full-width hero.
   With an image: cover background + dark overlay + light text/CTA.
   Without an image: light-grey band with dark text/CTA.
   ----------------------------------------------------------------------------- */
.accent-feature {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    overflow: hidden;

    .accent-feature__image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .accent-feature__overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(var(--black-rgb), 0.45);
    }

    .accent-feature__content {
        position: relative; /* above the overlay */
        padding-block: 4rem;
        color: var(--white);
        max-width: 900px;
    }

    .accent-feature__title {
        font-size: clamp(2.5rem, 6vw, 4rem);
        font-weight: 500;
        margin-bottom: 1.5rem;
    }

    .accent-feature__description {
        font-size: clamp(1rem, 2.5vw, 1.3rem);
        font-weight: 300;
        max-width: 40rem;
        margin: 0 auto 2rem;
    }

    /* No-image fallback — light grey band, dark text. */
    &.accent-feature--plain {
        min-height: 0;
        background-color: #ECEAE4;

        .accent-feature__content {
            color: var(--black);
        }
    }
}

/* -----------------------------------------------------------------------------
   Upcoming events section (home) — white band spanning the full viewport width.
   ----------------------------------------------------------------------------- */
.upcoming-events {
    background-color: var(--white);
}

/* -----------------------------------------------------------------------------
   Page card (home) — a page flagged "show on home": title, short excerpt, main
   image and a "read more" link. Cards in a row align their images and links at
   the bottom. A card alone on its row (--wide) spans it with the image on the right.
   ----------------------------------------------------------------------------- */
.page-card {
    display: grid;
    grid-template-rows: 1fr auto auto;
    grid-template-areas: "text" "media" "link";
    height: 100%;
    padding: clamp(1.5rem, 6vw, 4.5rem);

    .page-card__text {
        grid-area: text;
    }

    .page-card__title {
        margin-bottom: 2rem;
    }

    .page-card__excerpt {
        font-weight: 300;
        line-height: 1.7;

        p {
            color: rgba(var(--black-rgb), 0.65);
        }

        ul,
        ol {
            padding-left: 1.25rem;
            font-size: 1.15rem;

            li {
                margin-bottom: 0.75rem;
            }
        }
    }

    .page-card__media {
        grid-area: media;
        display: block;
        overflow: hidden;
        aspect-ratio: 3 / 4;
        margin-top: 2rem;
    }

    .page-card__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .page-card__media:hover .page-card__image {
        transform: scale(1.03);
    }

    .page-card__link {
        grid-area: link;
        justify-self: start;
        margin-top: 2.5rem;
    }

    @media (min-width: 992px) {
        &.page-card--wide:has(.page-card__media) {
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr auto;
            grid-template-areas: "text media" "link media";
            column-gap: 4rem;

            .page-card__media {
                aspect-ratio: 4 / 3;
                margin-top: 0;
            }
        }
    }
}

/* -----------------------------------------------------------------------------
   Cart table — more vertical air, un-underlined product link, icon-only remove.
   ----------------------------------------------------------------------------- */
.cart-table {
    th,
    td {
        padding: 1rem;
        vertical-align: middle;
    }

    .cart-table__product {
        color: var(--black);
        font-weight: 600;
        text-decoration: none;
        transition: opacity 0.2s ease;

        &:hover {
            opacity: 0.7;
        }
    }

    .cart-table__remove .bi {
        font-size: 1.15rem;
    }
}

/* intl-tel-input wraps the <input> in `.iti` (inline-block by default), which
   breaks the stacked label-over-input layout used by the other fields. Force
   it block + full-width so the phone field matches the rest of the form. */
.iti {
    display: block;
    width: 100%;
}

/* -----------------------------------------------------------------------------
   Section header — large light title with a short underline accent, paired with
   an uppercase "see all" link with a trailing arrow.
   ----------------------------------------------------------------------------- */
/* Shared by section headers (.section-title) and standalone page headings
   (.page-title) — large light type with a short underline accent. */
.section-title,
.page-title {
    position: relative;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--black);
    padding-bottom: 1.25rem;

    &::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 5rem;
        height: 1px;
        background-color: var(--black);
    }
}

/* Standalone page titles get breathing room below the underline accent. */
.page-title {
    margin-bottom: 2.5rem;
}

.section-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--black);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.2s ease;

    &:hover {
        opacity: 0.7;
        color: var(--black);
    }

    .bi {
        font-size: 1.1rem;
    }
}

/* -----------------------------------------------------------------------------
   Event card
   ----------------------------------------------------------------------------- */
.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    background-color: var(--white);
    border: 1px solid rgba(var(--black-rgb), 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Lift the whole card on hover (in addition to the image zoom below). */
    &:hover {
        transform: translateY(-0.25rem);
        box-shadow: 0 0.5rem 1.25rem rgba(var(--black-rgb), 0.08);
    }

    .event-card__media {
        position: relative;
        display: block;
        overflow: hidden; /* clips the image zoom on hover */
        aspect-ratio: 3 / 4;
    }

    .event-card__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    /* Smooth zoom on hover. */
    &:hover .event-card__image {
        transform: scale(1.05);
    }

    .event-card__body {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        padding-top: 1.25rem;
    }

    .event-card__title {
        margin-bottom: 1rem;
        font-size: 1.5rem;
        font-weight: 500;

        a {
            color: var(--black);
            text-decoration: none;
            transition: opacity 0.2s ease;
        }

        a:hover {
            opacity: 0.7;
        }
    }

    .event-card__meta {
        margin-bottom: 1.25rem;
    }

    .event-card__meta-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.5rem;
        color: rgba(var(--black-rgb), 0.6);

        .bi {
            font-size: 1.1rem;
            flex-shrink: 0;
        }
    }

    .event-card__divider {
        margin: 0 0 1.25rem;
        border: 0;
        border-top: 1px solid rgba(var(--black-rgb), 0.1);
    }

    .event-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-top: auto; /* pins footer to the bottom for equal-height cards */
    }

    .event-card__current-price {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--black);
    }

    .event-card__old-price {
        margin-right: 0.5rem;
        color: rgba(var(--black-rgb), 0.5);
    }

    /* Past event: stays in the listing for reference, but reads as over. */
    &.event-card--past .event-card__current-price {
        color: rgba(var(--black-rgb), 0.5);
    }
}

/* -----------------------------------------------------------------------------
   Shared media badge — translucent white label over an image (event card and
   event detail hero). `--tl` pins top-left, `--tr` top-right, `--br`
   bottom-right; `--dark` is the inverted (black) label.
   ----------------------------------------------------------------------------- */
.media-badge {
    position: absolute;
    padding: 0.5rem 1rem;
    background-color: rgba(var(--white-rgb), 0.92);
    backdrop-filter: var(--backdrop-filter);
    color: var(--black);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.media-badge--tl {
    top: 1rem;
    left: 1rem;
}

.media-badge--tr {
    top: 1rem;
    right: 1rem;
}

.media-badge--br {
    bottom: 1rem;
    right: 1rem;
}

.media-badge--dark {
    background-color: var(--black);
    color: var(--white);
}

/* -----------------------------------------------------------------------------
   Shared CTA button — solid black, uppercase. `--lg` is the larger variant used
   on detail pages; the base size suits cards.
   ----------------------------------------------------------------------------- */
.btn-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--black);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 0;
    border-radius: 0;
    transition: opacity 0.2s ease;

    &:hover {
        color: var(--white);
        opacity: 0.85;
    }

    &:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
}

.btn-cta--lg {
    padding: 1rem 2.5rem;
}

/* Light variant — white background, dark text. Used on dark imagery (hero,
   above-footer band). Hover turns it into a white outline: an opacity hover
   would not show, because the reveal animation (show-me/show-now, fill-mode
   forwards) holds opacity at 1. The inset shadow is the outline, so the size
   never changes. */
.btn-cta--light {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--white);
    color: var(--black);
    box-shadow: inset 0 0 0 1px var(--white);
    transition: background-color 0.25s ease, color 0.25s ease;

    .bi {
        transition: transform 0.25s ease;
    }

    &:hover {
        background-color: transparent;
        color: var(--white);

        .bi {
            transform: translateX(0.25rem);
        }
    }
}

/* -----------------------------------------------------------------------------
   Event detail (single event page)
   ----------------------------------------------------------------------------- */
.event-detail {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--white);
    border: 1px solid rgba(var(--black-rgb), 0.06);

    .event-detail__media {
        position: relative;
        overflow: hidden;
        aspect-ratio: 16 / 9;
    }

    .event-detail__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .event-detail__body {
        padding: clamp(1.25rem, 5vw, 2.5rem);
    }

    .event-detail__title {
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 300;
        color: var(--black);
        margin-bottom: 1.5rem;
    }

    .event-detail__divider {
        margin: 1.5rem 0;
        border: 0;
        border-top: 1px solid rgba(var(--black-rgb), 0.3);
    }

    .event-detail__meta {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1.5rem 2rem;
    }

    /* All sessions, listed one under another on the left. */
    .event-detail__sessions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin: 0;
    }

    .event-detail__meta-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: rgba(var(--black-rgb), 0.6);

        .bi {
            font-size: 1.1rem;
            flex-shrink: 0;
            color: var(--black);
        }
    }

    /* Right column — places remaining stacked above the price. */
    .event-detail__pricing {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.75rem;
        margin-left: auto;
        text-align: right;

        /* Phones: once it wraps under the dates, places left and price right on one line. */
        @media (max-width: 575.98px) {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            margin-left: 0;
        }
    }

    .event-detail__places {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: rgba(var(--black-rgb), 0.6);

        .bi {
            font-size: 1.1rem;
            flex-shrink: 0;
            color: var(--black);
        }
    }

    .event-detail__current-price {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--black);
    }

    .event-detail__old-price {
        margin-right: 0.5rem;
        color: rgba(var(--black-rgb), 0.5);
    }

    .event-detail__description {
        margin: 2rem 0;
        color: rgba(var(--black-rgb), 0.75);
        line-height: 1.7;
    }

    .event-detail__reserve {
        margin-top: 2rem;
    }
}

/* -----------------------------------------------------------------------------
   Page detail (CMS page) — white card. With a main image the title sits on it
   (dark overlay, centred white type); the body carries the lead, the rich
   content and the gallery.
   ----------------------------------------------------------------------------- */
.page-detail {
    max-width: 1100px;
    margin-inline: auto;

    .page-detail__hero {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        /* Height, not aspect-ratio: with a min-height the ratio would widen the
           hero past the card on phones. */
        height: clamp(16rem, 35vw, 30rem);
        overflow: hidden;
        text-align: center;
    }

    .page-detail__hero-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .page-detail__hero-overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(var(--black-rgb), 0.45);
    }

    .page-detail__hero-content {
        position: relative; /* above the overlay */
        padding: clamp(1.25rem, 5vw, 2rem);
        color: var(--white);
    }

    .page-detail__hero-title {
        font-size: clamp(2.25rem, 6vw, 4rem);
        font-weight: 500;
        margin: 0;
    }

    .page-detail__hero-subtitle {
        margin: 1rem 0 0;
        font-size: clamp(1rem, 2.5vw, 1.3rem);
        font-weight: 300;
    }

    .page-detail__body {
        padding: clamp(1.25rem, 5vw, 2.5rem);
    }

    .page-detail__subtitle {
        margin-top: -1rem;
        margin-bottom: 2.5rem;
        font-size: 1.3rem;
        font-weight: 300;
        color: rgba(var(--black-rgb), 0.65);
    }

    .page-detail__date {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 2rem;
        color: rgba(var(--black-rgb), 0.6);
    }

    /* Page look on top of .rich-text: bold section headings, light copy and
       bullet-free top-level lists (nested lists keep an indent). */
    .page-detail__content {
        font-weight: 300;
        line-height: 1.7;
        color: rgba(var(--black-rgb), 0.8);

        h2,
        h3,
        h4,
        h5,
        h6 {
            margin: 3rem 0 1.5rem;
            font-weight: 600;
            color: var(--black);
        }

        h2 {
            font-size: clamp(1.5rem, 3vw, 1.85rem);
        }

        h3 {
            font-size: clamp(1.3rem, 2.5vw, 1.6rem);
        }

        h4 {
            font-size: 1.2rem;
        }

        h5 {
            font-size: 1.05rem;
        }

        h6 {
            font-size: 0.85rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        > :first-child {
            margin-top: 0;
        }

        > ul {
            list-style: none;
            padding-left: 0;
        }

        li {
            margin-bottom: 0.35rem;
        }
    }

}

/* -----------------------------------------------------------------------------
   Contact info (Contacts page, under the content) — address + email, social
   links and the Google Maps embed from `common.contacts.map_embed`.
   ----------------------------------------------------------------------------- */
.contact-info {
    margin-top: 3rem;
    font-weight: 300;
    line-height: 1.7;

    .contact-info__address {
        margin-bottom: 0.5rem;
        font-style: normal;
    }

    .contact-info__heading {
        margin: 2rem 0 1rem;
        font-size: 0.85rem;
        font-weight: 400;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(var(--black-rgb), 0.5);
    }

    .contact-info__social {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.5rem;
        margin: 0;
    }

    .contact-info__link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--black);
        text-decoration: none;
        transition: opacity 0.2s ease;

        &:hover {
            opacity: 0.6;
        }
    }

    .contact-info__map {
        margin-top: 2.5rem;

        iframe {
            display: block;
            width: 100%;
        }
    }
}

/* -----------------------------------------------------------------------------
   Rich text — admin-authored HTML rendered with `safe_html` (page content, home
   card excerpts). The editor (Tiptap) wraps every list item and table cell in
   a <p>; those inner paragraphs get no margin so lists and tables stay tight.
   ----------------------------------------------------------------------------- */
.rich-text {
    li > p,
    th > p,
    td > p {
        margin: 0;
    }

    > :last-child {
        margin-bottom: 0;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    blockquote {
        margin: 2.5rem 0;
        padding: 0.25rem 0 0.25rem 1.5rem;
        border-left: 2px solid var(--black);
        font-size: 1.25rem;
        font-style: italic;
        color: var(--black);
    }

    table {
        width: 100%;
        margin: 2rem 0;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(var(--black-rgb), 0.1);
        text-align: left;
        vertical-align: top;
    }

    th {
        font-weight: 500;
        color: var(--black);
        border-bottom-color: var(--black);
    }

    code {
        padding: 0.1em 0.35em;
        font-size: 0.9em;
        color: var(--black);
        background-color: var(--page-bg);
    }

    pre {
        margin: 2rem 0;
        padding: 1.25rem 1.5rem;
        background-color: var(--page-bg);

        code {
            padding: 0;
            background: none;
        }
    }

    /* Wide tables scroll sideways on phones instead of breaking the layout. */
    @media (max-width: 767.98px) {
        table {
            display: block;
            overflow-x: auto;
        }
    }
}

/* -----------------------------------------------------------------------------
   Gallery (frontend/parts/gallery) — light title over square tiles that fill
   the row and keep one size; links open in GLightbox. Pages and events.
   ----------------------------------------------------------------------------- */
.gallery {
    margin-top: 3rem;

    .gallery__title {
        margin-bottom: 1.5rem;
        font-size: clamp(1.5rem, 3vw, 1.85rem);
        font-weight: 300;
    }

    .gallery__grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(10rem, 45%), 1fr));
        gap: 0.5rem;
    }

    .gallery__item {
        display: block;
        aspect-ratio: 1;
        overflow: hidden;
    }

    .gallery__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .gallery__item:hover .gallery__image {
        transform: scale(1.05);
    }
}

/* -----------------------------------------------------------------------------
   Footer — dark full-width band.
   ----------------------------------------------------------------------------- */
#footer {
    background-color: var(--footer-bg);
    color: rgba(var(--white-rgb), 0.7);

    .footer__brand {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--white);
        margin-bottom: 1rem;
    }

    .footer__about {
        margin: 0;
        max-width: 300px;
        color: rgba(var(--white-rgb), 0.5);
        font-weight: 300;
    }

    .footer__heading {
        font-size: 0.9rem;
        font-weight: 300;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(var(--white-rgb), 0.5);
        margin-bottom: 1.25rem;
    }

    .footer__address {
        margin-bottom: 0.75rem;
        font-style: normal;
        line-height: 1.7;
    }

    .footer__social {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.5rem;
        margin: 0;
    }

    /* Muted like the footer copy; hover lights them up to the page background colour. */
    .footer__link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: rgba(var(--white-rgb), 0.7);
        text-decoration: none;
        transition: color 0.2s ease;

        &:hover {
            color: var(--page-bg);
        }
    }

    /* Content pages + contacts, one row between two dividers above the bottom bar. */
    .footer__pages {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 2rem;
        margin: 0;
        font-weight: 300;
    }

    .footer__divider {
        margin: 2.5rem 0 1.5rem;
        border: 0;
        border-top: 1px solid rgba(var(--white-rgb), 0.1);
    }

    .footer__pages + .footer__divider {
        margin-top: 1.5rem;
    }

    .footer__bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer__copy {
        font-weight: 300;
        color: rgba(var(--white-rgb), 0.4);
    }

    .footer__legal {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    /* bd.fyi dog, drawn as a mask so it takes the link colour (and its hover). */
    .footer__credit-icon {
        display: block;
        width: 2rem;
        height: 2rem;
        background-color: currentColor;
        mask: url("../images/bd-fyi-dog.svg") center / contain no-repeat;
    }
}
