/*
|--------------------------------------------------------------------------
| Widows Sons — Shared Chapter Design System
|--------------------------------------------------------------------------
|
| Public-facing styles shared across independently deployed chapters.
| No external fonts, scripts or tracking dependencies.
|
*/

:root {
    color-scheme: dark;

    --colour-background: #0b0d10;
    --colour-surface: #15191e;
    --colour-surface-raised: #1c2228;

    --colour-accent: #c8a45a;
    --colour-accent-hover: #e1c58a;

    --colour-text: #f1eee7;
    --colour-text-muted: #a6a8ab;

    --colour-border: rgba(200, 164, 90, 0.22);

    --colour-glow: rgba(200, 164, 90, 0.06);
    --colour-header-background: rgba(11, 13, 16, 0.96);
    --colour-footer-background: #090b0d;

    --content-width: 1200px;
    --header-height: 88px;
}


/* Surrey Chapter Theme */

body[data-chapter-theme="surrey"] {
    --colour-background: #090e18;
    --colour-surface: #101d30;
    --colour-surface-raised: #172c46;

    --colour-accent: #f3c856;
    --colour-accent-hover: #ffe08b;

    --colour-text: #f5f7fb;
    --colour-text-muted: #b8c4d4;

    --colour-border: rgba(243, 200, 86, 0.25);
    --colour-glow: rgba(34, 82, 139, 0.24);

    --colour-header-background: rgba(9, 15, 25, 0.96);
    --colour-footer-background: #080d16;
}

/* Base */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            ellipse at 50% 0%,
            var(--colour-glow),
            transparent 55%
        ),
        var(--colour-background);

    color: var(--colour-text);

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--colour-accent-hover);
    outline-offset: 4px;
}

::selection {
    background: var(--colour-accent);
    color: var(--colour-background);
}

/* Accessibility */

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;

    z-index: 1000;

    padding: 12px 18px;

    background: var(--colour-accent);
    color: var(--colour-background);

    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

/* Shared Container */

.container {
    width: min(100% - 40px, var(--content-width));
    margin-inline: auto;
}

/* Header */

.site-header {
    position: relative;
    z-index: 10;

    background: var(--colour-header-background);
    border-bottom: 1px solid var(--colour-border);
}

.site-header__inner {
    width: min(100% - 40px, var(--content-width));
    min-height: var(--header-height);

    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

/* Chapter Branding */

.site-brand {
    display: inline-flex;
    align-items: center;

    gap: 14px;
}

.site-brand__mark {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: 1px solid var(--colour-accent);

    color: var(--colour-accent);
    background: var(--colour-surface);

    font-size: 17px;
    font-weight: 900;
    letter-spacing: 2px;
}

.site-brand__name {
    color: var(--colour-text);

    font-size: 15px;
    font-weight: 800;

    letter-spacing: 1.5px;
    line-height: 1.35;

    text-transform: uppercase;
}

/* Navigation */

.site-navigation {
    display: flex;
    align-items: center;

    gap: 28px;
}

.site-navigation a {
    color: var(--colour-text-muted);

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;

    transition: color 180ms ease;
}

.site-navigation a:hover {
    color: var(--colour-accent-hover);
}

/* Main Content */

main {
    flex: 1;
}

/* Shared Content Elements */

.section {
    padding-block: 100px;
}

.section__eyebrow {
    color: var(--colour-accent);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 3px;
    text-transform: uppercase;
}

.section__title {
    margin: 16px 0 24px;

    font-size: clamp(32px, 5vw, 64px);
    font-weight: 900;

    line-height: 1.1;
    letter-spacing: -1.5px;
}

.section__description {
    max-width: 650px;

    color: var(--colour-text-muted);

    font-size: 17px;
    line-height: 1.85;
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 13px 28px;

    border: 1px solid var(--colour-accent);

    background: var(--colour-accent);
    color: var(--colour-background);

    font: inherit;
    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;

    transition:
        background 180ms ease,
        color 180ms ease;
}

.button:hover {
    background: var(--colour-accent-hover);
}

.button--outline {
    background: transparent;
    color: var(--colour-accent-hover);
}

.button--outline:hover {
    background: var(--colour-accent);
    color: var(--colour-background);
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--colour-border);

    background: var(--colour-footer-background);
}

.site-footer__inner {
    width: min(100% - 40px, var(--content-width));

    margin-inline: auto;
    padding-block: 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.site-footer p {
    margin: 0;

    color: var(--colour-text-muted);

    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Mobile Layout */

@media (max-width: 768px) {

    :root {
        --header-height: 76px;
    }

    .site-header__inner {
        padding-block: 16px;

        flex-direction: column;
        align-items: stretch;

        gap: 18px;
    }

    .site-brand {
        justify-content: center;
    }

    .site-navigation {
        justify-content: center;
        flex-wrap: wrap;

        gap: 12px 22px;
    }

    .site-navigation a {
        padding-block: 8px;
    }

    .section {
        padding-block: 64px;
    }

    .section__description {
        font-size: 16px;
    }

    .site-footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==========================================================
   Visual Design V2 - Hero and Brotherhood
   ========================================================== */

/* Hero */

.hero {
    position: relative;
    overflow: hidden;

    padding-block: clamp(64px, 8vw, 120px);

    border-bottom: 1px solid var(--colour-border);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);

    align-items: center;
    gap: clamp(36px, 6vw, 100px);
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__title {
    margin: 24px 0 30px;

    font-size: clamp(48px, 5.8vw, 94px);
    font-weight: 900;

    line-height: 0.99;
    letter-spacing: -0.055em;
}

.hero__title span {
    color: var(--colour-accent);
}

.hero__description {
    max-width: 590px;

    color: var(--colour-text-muted);

    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.85;
}

.hero__description strong {
    color: var(--colour-text);
    font-weight: 700;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 36px;
}

.hero__values {
    display: flex;
    flex-wrap: wrap;

    gap: 12px 24px;

    margin-top: 48px;
    padding-top: 22px;

    border-top: 1px solid var(--colour-border);
}

.hero__values span {
    color: var(--colour-text-muted);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.hero__values span::before {
    content: "";

    display: inline-block;

    width: 6px;
    height: 6px;

    margin-right: 10px;

    background: var(--colour-accent);

    vertical-align: middle;
}

/* Hero Visual */

.hero__feature {
    min-width: 0;
}

.hero__feature-frame {
    position: relative;
    isolation: isolate;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-height: 520px;
    padding: clamp(28px, 4vw, 56px);

    overflow: hidden;

    border: 1px solid var(--colour-border);

    background:
        linear-gradient(
            140deg,
            transparent 38%,
            var(--colour-glow) 100%
        ),
        var(--colour-surface);
}

.hero__feature-frame::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 520px;
    height: 520px;

    top: -190px;
    right: -270px;

    border: 90px solid var(--colour-border);
    border-radius: 50%;

    transform: rotate(-25deg);
}

.hero__feature-frame::after {
    content: "";

    position: absolute;
    z-index: -1;

    inset: auto -20% 12% 16%;
    height: 2px;

    background: var(--colour-accent);

    opacity: 0.65;
    transform: rotate(-28deg);
}

.hero__feature-label {
    margin: 0;

    color: var(--colour-accent);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero__feature-heading {
    margin: auto 0;

    color: var(--colour-text);

    font-size: clamp(60px, 6.5vw, 110px);
    font-weight: 900;

    line-height: 0.88;
    letter-spacing: -0.07em;
}

.hero__feature-rule {
    width: 80px;
    height: 4px;

    background: var(--colour-accent);
}

.hero__feature-description {
    margin: 24px 0 0;

    color: var(--colour-text-muted);

    font-size: 14px;
    font-weight: 600;

    letter-spacing: 0.5px;
    line-height: 1.7;
}

.hero__feature-mark {
    position: absolute;
    right: 24px;
    bottom: 6px;

    color: var(--colour-accent);

    font-size: 95px;
    font-weight: 900;
    letter-spacing: -8px;

    opacity: 0.12;

    pointer-events: none;
}

/* Brotherhood */

.section--about {
    background: var(--colour-background);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    align-items: center;
    gap: clamp(40px, 8vw, 120px);
}

.about-grid__content {
    padding-left: 28px;

    border-left: 2px solid var(--colour-accent);
}

.about-grid__content .section__description {
    margin-top: 0;
}

.about-grid__values {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 32px;
}

.about-grid__values span {
    padding: 9px 13px;

    border: 1px solid var(--colour-border);

    background: var(--colour-surface);

    color: var(--colour-text);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Responsive Hero and Brotherhood */

@media (max-width: 960px) {

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero__title {
        max-width: 780px;
    }

    .hero__feature-frame {
        min-height: 390px;
    }

    .hero__feature-heading {
        font-size: clamp(64px, 10vw, 100px);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 600px) {

    .hero {
        padding-block: 56px;
    }

    .hero__title {
        font-size: clamp(42px, 10vw, 62px);
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .button {
        width: 100%;
    }

    .hero__values {
        margin-top: 36px;
        gap: 12px 18px;
    }

    .hero__feature-frame {
        min-height: 360px;
        padding: 30px;
    }

    .hero__feature-heading {
        font-size: clamp(58px, 13vw, 80px);
    }

    .hero__feature-mark {
        font-size: 70px;
    }

    .about-grid__content {
        padding-left: 20px;
    }
}

/* ==========================================================
   Visual Design V2 - Chapter Highlights
   ========================================================== */

.section--highlights {
    background: var(--colour-surface);
    border-block: 1px solid var(--colour-border);
}

.section-intro {
    max-width: 760px;
    margin-bottom: 48px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.highlight-card {
    min-width: 0;
    overflow: hidden;

    border: 1px solid var(--colour-border);
    background: var(--colour-background);

    transition:
        border-color 180ms ease,
        transform 180ms ease;
}

.highlight-card:hover {
    border-color: var(--colour-accent);
    transform: translateY(-4px);
}

.highlight-card__visual {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: flex-end;

    min-height: 220px;
    padding: 24px;

    border-bottom: 1px solid var(--colour-border);

    background:
        linear-gradient(
            135deg,
            var(--colour-surface-raised),
            var(--colour-background)
        );
}

.highlight-card__visual::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 230px;
    height: 230px;

    right: -90px;
    top: -80px;

    border: 48px solid var(--colour-border);
    border-radius: 50%;
}

.highlight-card__visual span {
    color: var(--colour-accent);

    font-size: 64px;
    font-weight: 900;
    line-height: 1;

    letter-spacing: -4px;
    opacity: 0.8;
}

.highlight-card__visual--remembrance {
    background:
        linear-gradient(
            150deg,
            var(--colour-surface-raised),
            var(--colour-surface)
        );
}

.highlight-card__visual--charity {
    background:
        linear-gradient(
            210deg,
            var(--colour-glow),
            transparent
        ),
        var(--colour-surface-raised);
}

.highlight-card__content {
    padding: 28px;
}

.highlight-card__label {
    margin: 0 0 14px;

    color: var(--colour-accent);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.highlight-card h3 {
    margin: 0 0 16px;

    color: var(--colour-text);

    font-size: clamp(20px, 2vw, 26px);
    font-weight: 800;
    line-height: 1.25;
}

.highlight-card__description {
    margin-bottom: 0;

    color: var(--colour-text-muted);

    font-size: 15px;
    line-height: 1.75;
}

/* Responsive Cards */

@media (max-width: 980px) {

    .highlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {

    .section-intro {
        margin-bottom: 32px;
    }

    .highlight-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .highlight-card__visual {
        min-height: 180px;
    }

    .highlight-card__content {
        padding: 24px;
    }
}

/* ==========================================================
   Visual Design V2 - Contact Panel
   ========================================================== */

.section--contact {
    padding-block: clamp(64px, 9vw, 128px);
}

.contact-panel {
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);

    align-items: center;
    gap: clamp(32px, 5vw, 80px);

    padding: clamp(32px, 5vw, 72px);

    overflow: hidden;

    border: 1px solid var(--colour-border);

    background:
        linear-gradient(
            115deg,
            var(--colour-surface-raised),
            var(--colour-surface)
        );
}

.contact-panel::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 360px;
    height: 360px;

    top: -180px;
    right: -180px;

    border: 70px solid var(--colour-border);
    border-radius: 50%;

    pointer-events: none;
}

.contact-panel .section__title {
    margin-bottom: 0;

    font-size: clamp(32px, 4.5vw, 58px);
}

.contact-panel__content {
    max-width: 420px;

    padding-left: 24px;

    border-left: 2px solid var(--colour-accent);

    color: var(--colour-text-muted);

    font-size: 16px;
    line-height: 1.8;
}

.contact-panel__content > p:first-child {
    margin-top: 0;
}

.contact-panel__tagline {
    color: var(--colour-text);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* Responsive Contact Panel */

@media (max-width: 800px) {

    .contact-panel {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {

    .contact-panel {
        padding: 28px;
    }

    .contact-panel__content {
        padding-left: 18px;
    }

    .contact-panel .section__title {
        font-size: clamp(30px, 8vw, 44px);
    }
}

/* ==========================================================
   Visual Design V2.1 - Mobile Refinements
   ========================================================== */

@media (max-width: 600px) {

    /* Compact mobile header */

    .site-header__inner {
        gap: 10px;
        padding-block: 12px;
    }

    .site-brand {
        gap: 10px;
    }

    .site-brand__mark {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .site-brand__name {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .site-navigation {
        gap: 10px 18px;
    }

    .site-navigation a {
        font-size: 12px;
    }

    /* Improve hero proportions */

    .hero {
        padding-block: 44px 56px;
    }

    .hero__grid {
        gap: 36px;
    }

    .hero__title {
        margin-block: 20px 24px;
        font-size: clamp(38px, 10vw, 54px);
    }

    .hero__description {
        line-height: 1.7;
    }

    .hero__feature-frame {
        min-height: 300px;
    }

    .hero__feature-heading {
        font-size: clamp(52px, 12vw, 76px);
    }

    /* Cleaner contact panel */

    .contact-panel::before {
        display: none;
    }

    .contact-panel__content {
        max-width: 100%;
    }

    /* Better section spacing */

    .section {
        padding-block: 56px;
    }

    .section--contact {
        padding-block: 64px;
    }
}

/* ==========================================================
   Visual Design V2.2 - Brotherhood Photography
   ========================================================== */

.section--photo {
    padding-block: clamp(64px, 8vw, 110px);

    background: var(--colour-background);
    border-bottom: 1px solid var(--colour-border);
}

.section--photo .section__title {
    max-width: 900px;
}

.chapter-photo {
    margin: 40px 0 0;
}

.chapter-photo__image {
    display: block;

    width: 100%;
    height: auto;

    border: 1px solid var(--colour-border);

    background: var(--colour-surface);
}

.chapter-photo__caption {
    margin-top: 18px;
    padding-left: 18px;

    border-left: 3px solid var(--colour-accent);

    color: var(--colour-text-muted);

    font-size: 14px;
    line-height: 1.7;
}

/* Mobile Brotherhood Photography */

@media (max-width: 600px) {

    .section--photo {
        padding-block: 56px;
    }

    .chapter-photo {
        margin-top: 28px;
    }

    .chapter-photo__caption {
        margin-top: 14px;
        padding-left: 12px;

        font-size: 13px;
    }
}

/* ==========================================================
   Visual Design V2.3 - Chapter Life Photography
   ========================================================== */

/*
   Photographic highlight cards.
   The existing numbered designs remain the fallback.
*/

.highlight-card__visual--photo {
    display: block;

    min-height: 0;
    padding: 0;

    aspect-ratio: 16 / 10;

    background: var(--colour-surface);
}

/* Remove decorative circle from photographic cards. */

.highlight-card__visual--photo::before {
    content: none;
}

/* Preserve consistent photographic card proportions. */

.highlight-card__photo {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    background: var(--colour-surface);
}

/* Keep images responsive without introducing overflow. */

@media (max-width: 650px) {

    .highlight-card__visual--photo {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

}

/* ==========================================================
   Visual Design V2.4 - Chapter Shield Branding
   ========================================================== */

/*
   Chapter-specific shield.
   The existing WS placeholder remains the fallback.
*/

.site-brand__logo {
    display: block;

    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    object-fit: contain;

    background: transparent;
}

/* Preserve the existing compact mobile header. */

@media (max-width: 600px) {

    .site-brand__logo {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }

}

/* ==========================================================
   V2.4 - Events and Galleries Layout
   ========================================================== */

.events-heading,
.event-detail__header {
    max-width: 800px;
    margin-bottom: 44px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.event-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--colour-border);
    background: var(--colour-surface);
}

.event-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.event-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--colour-background);
}

.event-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 250ms ease;
}

.event-card__link:hover .event-card__image {
    transform: scale(1.035);
}

.event-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--colour-accent);
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 5px;
}

.event-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
}

.event-card__date,
.event-detail__metadata {
    color: var(--colour-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.event-card__title {
    margin: 0;
    color: var(--colour-text);
    font-size: clamp(22px, 2.3vw, 29px);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-card__summary {
    flex: 1;
    margin: 0;
    color: var(--colour-text-muted);
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.event-card__action {
    align-self: flex-start;
    margin-top: 10px;
    color: var(--colour-accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.event-card__link:hover .event-card__action {
    text-decoration: underline;
}

.events-empty {
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--colour-border);
    background: var(--colour-surface);
}

.events-empty h2 {
    margin-top: 0;
    color: var(--colour-text);
}

.events-empty p {
    max-width: 640px;
    margin-bottom: 0;
    color: var(--colour-text-muted);
    line-height: 1.75;
}

.event-breadcrumb {
    margin-bottom: 36px;
}

.event-breadcrumb a {
    color: var(--colour-accent);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.event-breadcrumb a:hover {
    text-decoration: underline;
}

.event-detail__metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-bottom: 24px;
}

.event-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.event-gallery__item {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--colour-border);
    background: var(--colour-surface);
}

.event-gallery__item a {
    display: block;
    overflow: hidden;
}

.event-gallery__item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 250ms ease;
}

.event-gallery__item a:hover img {
    transform: scale(1.035);
}

.event-gallery__item figcaption {
    padding: 16px 20px;
    color: var(--colour-text-muted);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.event-card__link:focus-visible,
.event-gallery__item a:focus-visible,
.event-breadcrumb a:focus-visible {
    outline: 3px solid var(--colour-accent);
    outline-offset: 3px;
}

/* Tablets */

@media (max-width: 980px) {
    .events-grid,
    .event-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones */

@media (max-width: 640px) {
    .events-grid,
    .event-gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .events-heading,
    .event-detail__header {
        margin-bottom: 30px;
    }

    .event-card__content {
        padding: 22px;
    }

    .event-breadcrumb {
        margin-bottom: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card__image,
    .event-gallery__item img {
        transition: none;
    }

    .event-card__link:hover .event-card__image,
    .event-gallery__item a:hover img {
        transform: none;
    }
}


/* V2.4 - Homepage Event Gallery Links */

.highlight-card__gallery-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 20px;

    color: var(--colour-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.5;
    text-decoration: none;
    text-transform: uppercase;
}

.highlight-card__gallery-link:hover {
    text-decoration: underline;
}

.highlight-card__gallery-link:focus-visible {
    outline: 3px solid var(--colour-accent);
    outline-offset: 4px;
}

/* V2.6 - Accessible Event Lightbox */

html.event-lightbox-open {
    overflow: hidden;
}

.event-lightbox {
    width: min(1100px, calc(100vw - 32px));
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    margin: auto;
    padding: 0;
    overflow-y: auto;

    color: #f4f6fa;
    background: #08111e;
    border: 1px solid #39475c;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .75);
}

.event-lightbox::backdrop {
    background: rgba(0, 0, 0, .9);
}

.event-lightbox__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.event-lightbox__top,
.event-lightbox__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-lightbox__counter {
    color: #d7b458;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
}

.event-lightbox__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
}

.event-lightbox__photo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 68vh;
    max-height: 68dvh;
    object-fit: contain;
}

.event-lightbox__figure figcaption {
    width: 100%;
    color: #bdcbe0;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

.event-lightbox button {
    min-height: 44px;
    padding: 10px 18px;

    color: #f4f6fa;
    background: #14243b;
    border: 1px solid #52617a;
    border-radius: 4px;

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.event-lightbox button:hover {
    background: #263e60;
    border-color: #d7b458;
}

.event-lightbox button:focus-visible {
    outline: 3px solid #f4c447;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .event-lightbox {
        width: calc(100vw - 12px);
        max-height: 96vh;
        max-height: 96dvh;
    }

    .event-lightbox__inner {
        gap: 12px;
        padding: 12px;
    }

    .event-lightbox__photo {
        max-height: 58vh;
        max-height: 58dvh;
    }

    .event-lightbox__controls button {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-lightbox *,
    .event-lightbox *::before,
    .event-lightbox *::after {
        scroll-behavior: auto;
        transition: none;
        animation: none;
    }
}


/* Chapter Account Forms */

.chapter-account {
    padding: clamp(32px, 6vw, 72px) 20px;
}

.chapter-account__inner {
    width: min(100%, 640px);
    margin-inline: auto;
    padding: clamp(24px, 5vw, 44px);

    background: var(--colour-surface);
    border: 1px solid var(--colour-border);
    border-radius: 10px;

    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.chapter-account h1 {
    margin: 0 0 16px;
    color: var(--colour-text);
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    line-height: 1.2;
}

.chapter-account p {
    color: var(--colour-text-muted);
    overflow-wrap: anywhere;
}

.chapter-account form {
    display: grid;
    gap: 20px;
    margin-block: 28px;
}

.chapter-account .form-field label {
    display: block;
    margin-bottom: 8px;

    color: var(--colour-text);
    font-weight: 650;
}

.chapter-account .form-field input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 14px;

    color: var(--colour-text);
    background: var(--colour-background);

    border: 1px solid var(--colour-text-muted);
    border-radius: 5px;

    font: inherit;
}

.chapter-account .form-field input:focus-visible {
    outline: 3px solid var(--colour-accent-hover);
    outline-offset: 3px;
}

.chapter-account .form-field p {
    margin: 9px 0 0;
    font-size: 0.9rem;
}

.chapter-account form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 12px 22px;

    color: var(--colour-background);
    background: var(--colour-accent);

    border: 1px solid transparent;
    border-radius: 5px;

    font: inherit;
    font-weight: 750;
    text-align: center;

    cursor: pointer;
}

.chapter-account form button[type="submit"]:hover {
    background: var(--colour-accent-hover);
}

.chapter-account .form-errors {
    padding: 14px 18px;

    background: var(--colour-surface-raised);
    border-left: 4px solid #f18d8d;
    border-radius: 4px;
}

.chapter-account .form-errors p,
.chapter-account .form-errors li {
    color: var(--colour-text);
}

.chapter-account .form-errors p {
    margin: 0 0 8px;
    font-weight: 700;
}

.chapter-account .form-errors ul {
    margin: 0;
    padding-left: 22px;
}

.chapter-account__alternate {
    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--colour-border);
}

.chapter-account__alternate p {
    margin: 0 0 14px;
    text-align: center;
}

.chapter-account__google-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;
    padding: 12px 18px;

    background: var(--colour-surface-raised);
    color: var(--colour-text);

    border: 1px solid var(--colour-accent);
    border-radius: 5px;

    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.chapter-account__google-link:hover {
    background: var(--colour-accent);
    color: var(--colour-background);
}

.chapter-account__google-link:focus-visible {
    outline: 3px solid var(--colour-accent-hover);
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .chapter-account {
        padding: 24px 14px;
    }

    .chapter-account__inner {
        padding: 24px 18px;
    }

    .chapter-account form button[type="submit"] {
        width: 100%;
    }
}


/* Surrey mobile account navigation - Step 214 */

.site-mobile-navigation {
    display: none;
}

@media (max-width: 1080px) {
    /* Keep shield, chapter name and menu on one row. */
    .site-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 12px;
        padding-block: 12px;
    }

    .site-brand {
        justify-content: flex-start;
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-brand__logo,
    .site-brand__mark {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .site-brand__name {
        min-width: 0;
        font-size: clamp(10px, 2.6vw, 12px);
        letter-spacing: 0.4px;
        line-height: 1.25;
        overflow-wrap: break-word;
    }

    .site-navigation {
        display: none;
    }

    .site-mobile-navigation {
        display: block;
        position: relative;
        z-index: 30;
        margin-left: auto;
        flex-shrink: 0;
    }

    .site-mobile-navigation summary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 44px;
        padding: 10px 18px;
        border: 1px solid var(--colour-accent-hover, #c9a65b);
        border-radius: 4px;
        background: #15191d;
        color: #f5f1e9;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        list-style: none;
        cursor: pointer;
    }

    .site-mobile-navigation summary::-webkit-details-marker {
        display: none;
    }

    .site-mobile-navigation summary::before {
        content: "\2630";
        font-size: 20px;
        line-height: 1;
    }

    .site-mobile-navigation summary:focus-visible,
    .site-mobile-navigation nav a:focus-visible {
        outline: 2px solid var(--colour-accent-hover, #c9a65b);
        outline-offset: 3px;
    }

    .site-mobile-navigation nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        display: grid;
        width: min(280px, calc(100vw - 40px));
        padding: 8px;
        border: 1px solid rgba(201, 166, 91, 0.4);
        border-radius: 6px;
        background: #15191d;
        box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
    }

    .site-mobile-navigation nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 10px 14px;
        color: #f5f1e9;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.7px;
        text-decoration: none;
        text-transform: uppercase;
    }

    .site-mobile-navigation nav a:hover,
    .site-mobile-navigation nav a:focus-visible {
        color: var(--colour-accent-hover, #c9a65b);
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Surrey membership button - Step 414 */
.chapter-account__join > button[disabled] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 5px;
    background: var(--colour-accent);
    color: var(--colour-background);
    font: inherit;
    font-weight: 750;
    text-align: center;
    opacity: 0.55;
    cursor: not-allowed;
}

.chapter-account__join form {
    margin: 16px 0;
}

/* STEP 457 - COMPACT FOOTER */
.site-footer {
    padding-block: 1.25rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1.5rem;
    text-align: center;
}

.site-footer__inner > p {
    margin: 0;
}

@media (max-width: 640px) {
    .site-footer__inner {
        flex-direction: column;
        gap: 0.35rem;
    }
}
