/* =========================================================
   BRICS YSF — Home page styles
   ========================================================= */

:root {
    --navy: #0c1b33;
    --navy-2: #13284a;
    --ink: #17202e;
    --muted: #5b6575;
    --paper: #f7f4ee;
    --paper-2: #efe9df;
    --white: #ffffff;
    --line: rgba(12, 27, 51, 0.12);
    --accent: #e8892b;
    --accent-dark: #c96f14;

    --c1: #0039a6; /* blue  */
    --c2: #de2910; /* red   */
    --c3: #ff9933; /* saffron */
    --c4: #009c3b; /* green */
    --c5: #ffb612; /* gold  */

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 18px;
    --gutter: clamp(16px, 4vw, 40px);
    --shadow: 0 18px 40px -22px rgba(12, 27, 51, 0.45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h2 {
    font-size: clamp(2rem, 4.2vw, 3.25rem);
}

h2 em,
h1 em {
    font-style: italic;
    color: var(--accent-dark);
}

h3 {
    font-size: 1.3rem;
}

p {
    margin: 0 0 1em;
}

button {
    font: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.container {
    width: min(1220px, 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--navy);
    color: #fff;
    border-radius: 8px;
}
.skip-link:focus {
    top: 12px;
}

.eyebrow {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 0.9rem;
}

/* ---------- Buttons & links ---------- */

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85em 1.5em;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s, transform 0.2s, color 0.2s;
}
.button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}
.button.light {
    background: #fff;
    color: var(--navy);
}
.button.light:hover {
    background: var(--accent);
    color: #fff;
}
.button.small {
    padding: 0.6em 1.15em;
    font-size: 0.875rem;
}

.text-link {
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--navy);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: color 0.2s;
}
.text-link:hover {
    color: var(--accent-dark);
}

.outline-button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5em 1.1em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}
.outline-button:hover {
    border-color: var(--navy);
}

.color-bar {
    height: 6px;
    background: linear-gradient(
        90deg,
        var(--c1) 0 20%,
        var(--c2) 20% 40%,
        var(--c3) 40% 60%,
        var(--c4) 60% 80%,
        var(--c5) 80% 100%
    );
}

/* ---------- Top line & header ---------- */

.topline {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
}
.topline .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 40px;
}
.social {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.social-label {
    margin-right: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.social a {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}
.social a:hover {
    background: var(--accent);
}
.social svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.2s;
}
.header::after {
    /* thin BRICS colour strip under the header */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--c1) 0 20%,
        var(--c2) 20% 40%,
        var(--c3) 40% 60%,
        var(--c4) 60% 80%,
        var(--c5) 80% 100%
    );
    opacity: 0;
    transition: opacity 0.2s;
}
.header.scrolled {
    box-shadow: 0 8px 24px -16px rgba(12, 27, 51, 0.4);
}
.header.scrolled::after {
    opacity: 1;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 84px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--navy);
}
.brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--accent-dark);
}
.brand-name {
    font-family: var(--serif);
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.nav-list > li > a,
.nav-disclosure {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.85rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.nav-list > li > a:hover,
.nav-disclosure:hover,
.nav-group.open > .nav-disclosure {
    background: var(--paper-2);
}
.nav-list > li > a[aria-current="page"] {
    color: var(--accent-dark);
}
.chev {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s;
}
.nav-group.open .chev {
    transform: translateY(1px) rotate(225deg);
}

.nav-group {
    position: relative;
}
.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 330px;
    padding: 0.7rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -20px rgba(12, 27, 51, 0.35);
}
.dropdown::before {
    /* invisible bridge so the menu stays open while the pointer moves down */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
}
.nav-group.open > .dropdown {
    display: block;
}
.dropdown a {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--ink);
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.dropdown a > span {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--muted);
}
.dropdown a:hover {
    background: var(--paper);
    color: var(--accent-dark);
}
.dropdown-eyebrow {
    margin: 0.35rem 0.85rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.dropdown-wide {
    min-width: 520px;
}
.conclave-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 6px;
}
.conclave-grid a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.conclave-grid a b {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    min-width: 2.6em;
}
.conclave-grid a > span {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}
.conclave-grid a:hover > span,
.conclave-grid a:hover b {
    color: var(--accent-dark);
}
.conclave-feature {
    grid-column: 1 / -1;
    margin-bottom: 0.35rem;
    padding: 0.85rem 1rem !important;
    background: var(--navy);
}
.conclave-grid .conclave-feature b {
    color: var(--c5);
    font-size: 1.4rem;
}
.conclave-grid .conclave-feature > span {
    color: #fff;
    font-size: 1rem;
}
.conclave-feature small {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}
.conclave-grid .conclave-feature:hover {
    background: var(--navy-2);
}
.conclave-grid .conclave-feature:hover > span {
    color: #fff;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
}
.menu-icon {
    display: grid;
    gap: 4px;
}
.menu-icon i {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Desktop: dropdowns also open on hover */
@media (hover: hover) and (min-width: 1181px) {
    .nav-group:hover > .dropdown {
        display: block;
    }
    .nav-group:hover > .nav-disclosure {
        background: var(--paper-2);
    }
    .nav-group:hover .chev {
        transform: translateY(1px) rotate(225deg);
    }
}
/* Keep the wide conclave panel inside the page on mid-size screens */
@media (max-width: 1400px) {
    .dropdown-wide {
        left: auto;
        right: -120px;
        transform: none;
    }
}

/* Tablet & phone: collapsible menu with accordion sub-menus */
@media (max-width: 1180px) {
    .menu-toggle {
        display: inline-flex;
    }
    #navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 84px);
        overflow-y: auto;
        padding: 0.75rem var(--gutter) 1.25rem;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 30px -20px rgba(12, 27, 51, 0.4);
    }
    #navigation.open {
        display: block;
    }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .nav-list > li > a,
    .nav-disclosure {
        width: 100%;
        justify-content: space-between;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        font-size: 1rem;
    }
    .dropdown,
    .dropdown-wide {
        position: static;
        transform: none;
        min-width: 0;
        margin: 0.15rem 0 0.5rem 1rem;
        padding: 0.25rem 0 0.25rem 0.75rem;
        border: 0;
        border-left: 2px solid var(--paper-2);
        border-radius: 0;
        box-shadow: none;
    }
    .dropdown::before {
        display: none;
    }
    .conclave-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topline-text,
    .social-label {
        display: none;
    }
    .topline .container {
        justify-content: flex-end;
        min-height: 36px;
    }
    .header-inner {
        min-height: 70px;
        gap: 0.75rem;
    }
    .brand {
        gap: 0.6rem;
        min-width: 0;
    }
    .brand img {
        width: 44px;
        height: 44px;
    }
    .brand-name {
        font-size: 1.05rem;
        white-space: normal;
    }
    .brand-kicker {
        font-size: 0.64rem;
    }
    .menu-label {
        display: none;
    }
    .menu-toggle {
        padding: 0.7rem;
    }
    #navigation {
        max-height: calc(100vh - 70px);
    }
}

/* =========================================================
   Carousels (shared)
   ========================================================= */

.carousel {
    position: relative;
}
.carousel .slides {
    position: relative;
    height: 100%;
}
.carousel .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.carousel .slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s ease, visibility 0s;
    z-index: 1;
}
.carousel .slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, center 35%);
}

/* broken / missing photo fallback (added by home.js) */
.carousel .slide.img-missing,
.card-image.img-missing,
.mega-image.img-missing {
    background: radial-gradient(circle at 30% 30%, var(--navy-2), var(--navy));
}
.img-missing > img {
    visibility: hidden;
}

.slide-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.slide-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.3s, background 0.3s;
}
.slide-dots button[aria-pressed="true"] {
    width: 28px;
    background: #fff;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    height: clamp(540px, 84vh, 820px);
    background: var(--navy);
    color: #fff;
    overflow: hidden;
}
.hero .slide img {
    transform: scale(1.06);
    transition: transform 7s ease-out;
}
.hero .slide.active img {
    transform: scale(1);
}
/* legibility overlay */
.hero .slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 18, 36, 0.82) 0%, rgba(8, 18, 36, 0.45) 45%, rgba(8, 18, 36, 0.05) 75%),
        linear-gradient(0deg, rgba(8, 18, 36, 0.75) 0%, rgba(8, 18, 36, 0) 40%);
}
.slide-copy {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: clamp(110px, 16vh, 150px);
}
.slide-copy > * {
    max-width: 620px;
}
.hero .slide-copy .eyebrow {
    color: var(--c5);
}
.hero h1,
.hero h2 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    color: #fff;
    margin-bottom: 0.35em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.slide-copy p:not(.eyebrow) {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1.6rem;
}
.hero .slide-copy > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero .slide.active .slide-copy > * {
    opacity: 1;
    transform: none;
}
.hero .slide.active .slide-copy > :nth-child(2) { transition-delay: 0.1s; }
.hero .slide.active .slide-copy > :nth-child(3) { transition-delay: 0.2s; }
.hero .slide.active .slide-copy > :nth-child(4) { transition-delay: 0.3s; }

.side-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.side-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
}
.side-arrow.left {
    left: 20px;
}
.side-arrow.right {
    right: 20px;
}

.hero .carousel-controls {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 40px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.slide-count {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}
.hero .slide-count {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.85);
}
.carousel .pause {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #fff;
    font-size: 0.8rem;
}
.hero .progress {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
}
.hero .progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
}
.hero .progress span.run {
    width: 100%;
    transition: width var(--interval, 6000ms) linear;
}

/* =========================================================
   Sections
   ========================================================= */

.section {
    padding-block: clamp(64px, 9vw, 120px);
}
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.section-heading h2 {
    margin-bottom: 0;
}
.heading-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.section-intro {
    color: var(--muted);
    max-width: 560px;
    margin-top: -0.75rem;
}
.image-caption {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

/* ---------- Welcome ---------- */

.welcome {
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}
.welcome-copy > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 520px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 2rem;
}
.quick-links a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 2.4rem 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.quick-links a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.quick-links a span {
    font-family: var(--serif);
    font-size: 0.9rem;
    color: var(--accent-dark);
    font-weight: 600;
}
.quick-links a i {
    position: absolute;
    right: 1rem;
    font-style: normal;
    color: var(--muted);
    transition: transform 0.2s, color 0.2s;
}
.quick-links a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.quick-links a:hover i {
    color: var(--accent-dark);
    transform: translate(2px, -2px);
}

/* Welcome gallery: whole photo always visible, blurred copy fills the frame */
.welcome-carousel {
    border-radius: 22px;
    overflow: hidden;
    background: var(--navy);
    box-shadow: 0 40px 70px -40px rgba(12, 27, 51, 0.7);
}
.welcome-carousel .slides {
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
}
.welcome-carousel .carousel-controls {
    position: relative;
    z-index: 2;
}
.welcome-carousel .slide img.photo {
    object-fit: contain;
    z-index: 1;
    cursor: zoom-in;
}
.welcome-carousel .slide img.backdrop {
    object-fit: cover;
    filter: blur(26px) brightness(0.55) saturate(1.2);
    transform: scale(1.2);
}
.welcome-carousel .enlarge {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
    font-size: 1.1rem;
}
.welcome-carousel .carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: var(--navy);
    color: #fff;
}
.welcome-carousel .carousel-controls .slide-dots {
    flex: 1;
    justify-content: center;
}
.welcome-carousel .carousel-controls > button:not(.pause) {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
}
.welcome-carousel .carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- Event band ---------- */

.event-band {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding-block: clamp(48px, 7vw, 80px);
    overflow: hidden;
}
.event-band::before {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 137, 43, 0.35), transparent 70%);
}
.event-band .container {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
}
.event-year {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 0.9;
    color: var(--c5);
}
.event-year span {
    display: block;
    margin-top: 0.6rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}
.event-band .eyebrow {
    color: var(--c3);
}
.event-band h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0;
}

/* ---------- Cards ---------- */

.card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.card-image {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--paper-2);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.6s ease;
}
.card:hover .card-image img {
    transform: scale(1.05);
}
.card-copy {
    padding: 1.4rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-copy .eyebrow {
    margin-bottom: 0.5rem;
}
.card-copy h3 {
    font-size: 1.3rem;
}
.card-copy h3 a {
    text-decoration: none;
}
.card-copy h3 a:hover {
    color: var(--accent-dark);
}
.card-copy p:not(.eyebrow) {
    color: var(--muted);
    font-size: 0.95rem;
}
.card-copy .text-link {
    margin-top: auto;
    align-self: flex-start;
}

/* ---------- Archive marquee ---------- */

.archive {
    background: var(--paper-2);
    overflow: hidden;
}
.marquee {
    margin-top: 2.5rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 48s linear infinite;
}
.marquee-group {
    display: flex;
    gap: 22px;
    padding-right: 22px;
}
.marquee .card {
    width: 320px;
    flex: none;
}
.marquee .card-image {
    aspect-ratio: 4 / 3;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track,
.marquee.paused .marquee-track {
    animation-play-state: paused;
}
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- Mission / keynotes ---------- */

.mission {
    position: relative;
    color: #fff;
    background: var(--navy);
    overflow: hidden;
    isolation: isolate;
}
.mission-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.mission::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, rgba(8, 18, 36, 0.92) 30%, rgba(8, 18, 36, 0.6));
}
.mission-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}
.mission .eyebrow {
    color: var(--c5);
}
.mission h2 em {
    color: var(--c3);
}
.mission h2 {
    margin-bottom: 1.5rem;
}
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.pillars article {
    padding: 1.6rem 1.4rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}
.pillars span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c3);
    margin-bottom: 2.5rem;
}
.pillars h3 {
    font-size: 1.35rem;
}
.pillars p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ---------- Story cards ---------- */

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

/* ---------- Documents ---------- */

.documents {
    background: #fff;
    border-top: 1px solid var(--line);
}
.resource-note {
    font-size: 0.85rem;
    color: var(--muted);
}
.document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.document {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    text-decoration: none;
    min-height: 240px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.document::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s;
}
.document:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.document:hover::before {
    transform: scaleY(1);
}
.document-year {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 1.2rem;
}
.document p {
    color: var(--muted);
    font-size: 0.95rem;
}
.document .text-link {
    margin-top: auto;
    align-self: flex-start;
}

.document-archive {
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.document-archive summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
}
.document-archive summary::-webkit-details-marker {
    display: none;
}
.document-archive summary span {
    font-size: 1.2rem;
    transition: transform 0.25s;
}
.document-archive[open] summary span {
    transform: rotate(45deg);
}
.archive-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 2rem;
    padding: 0 1.5rem;
}
.archive-links a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
    font-size: 0.93rem;
}
.archive-links a:hover {
    color: var(--accent-dark);
}
.source-note {
    padding: 1rem 1.5rem 1.4rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------- Footer ---------- */

footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.78);
    padding-top: clamp(56px, 8vw, 96px);
}
footer h2 {
    color: #fff;
}
footer .eyebrow {
    color: var(--c5);
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-top h2 {
    margin: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr;
    gap: 2rem;
    padding-block: 3rem;
}
.footer-intro strong {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
}
.footer-intro strong span {
    color: var(--c3);
}
.footer-intro p {
    margin: 0.75rem 0 1.25rem;
    max-width: 280px;
}
.footer-intro .color-bar {
    width: 160px;
    border-radius: 4px;
}
.footer-grid h3 {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
}
.footer-grid a {
    display: block;
    text-decoration: none;
    padding: 0.2rem 0;
    font-size: 0.93rem;
    word-break: break-word;
}
.footer-grid a:hover {
    color: var(--c5);
}
footer address {
    font-style: normal;
    font-size: 0.93rem;
    margin-bottom: 0.75rem;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-block: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.82rem;
}
.footer-bottom a {
    text-decoration: none;
    color: #fff;
}

/* ---------- Photo dialog ---------- */

#photo-dialog {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 94vw;
    max-height: 92vh;
    overflow: visible;
}
#photo-dialog::backdrop {
    background: rgba(5, 10, 20, 0.88);
}
#photo-dialog img {
    max-width: 94vw;
    max-height: 84vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}
.dialog-caption {
    color: #fff;
    text-align: center;
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}
.dialog-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--navy);
    font-size: 1.4rem;
    line-height: 1;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1080px) {
    .welcome,
    .mission-layout {
        grid-template-columns: 1fr;
    }
    .event-band .container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .cards-three,
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .hero {
        height: clamp(520px, 82svh, 700px);
    }
    .hero .slide::after {
        background: linear-gradient(0deg, rgba(8, 18, 36, 0.92) 0%, rgba(8, 18, 36, 0.55) 50%, rgba(8, 18, 36, 0.15) 100%);
    }
    .slide-copy {
        bottom: 96px;
    }
    .side-arrow {
        display: none;
    }
    .hero .carousel-controls {
        bottom: 28px;
        gap: 0.75rem;
    }
    .hero .slide-dots button {
        width: 7px;
        height: 7px;
    }
    .hero .slide-dots button[aria-pressed="true"] {
        width: 20px;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }
    .welcome-carousel .carousel-controls {
        gap: 0.5rem;
        padding: 0.7rem;
    }
    .welcome-carousel .slide-dots button {
        width: 7px;
        height: 7px;
    }
    .welcome-carousel .slide-dots button[aria-pressed="true"] {
        width: 18px;
    }

    .pillars,
    .cards-three,
    .document-grid,
    .archive-links,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .pillars span {
        margin-bottom: 1rem;
    }
    .marquee .card {
        width: 260px;
    }
    .heading-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .marquee-track {
        animation: none;
    }
    .marquee {
        overflow-x: auto;
    }
}

/* Header: highlight the menu item for the current section */
.nav-disclosure.is-current {
    color: var(--accent-dark);
}
.dropdown a[aria-current="page"] {
    background: var(--paper);
    color: var(--accent-dark);
}

/* Hero: whole-photo slides — add data-fit="contain" to a .slide in index.html.
   The full photo is shown (nothing cropped) over a soft blurred copy that fills the sides. */
.hero .slide.fit-contain img.photo {
    object-fit: contain;
    object-position: center;
    transform: none;
}
.hero .slide.fit-contain img.backdrop {
    object-fit: cover;
    filter: blur(30px) brightness(0.45) saturate(1.15);
    transform: scale(1.15);
}
.hero .slide.fit-contain::after {
    /* lighter overlay so the photo stays clear; darker only behind the text */
    background:
        linear-gradient(90deg, rgba(8, 18, 36, 0.75) 0%, rgba(8, 18, 36, 0.35) 35%, rgba(8, 18, 36, 0) 60%),
        linear-gradient(0deg, rgba(8, 18, 36, 0.7) 0%, rgba(8, 18, 36, 0) 35%);
}
@media (max-width: 680px) {
    .hero .slide.fit-contain::after {
        background: linear-gradient(0deg, rgba(8, 18, 36, 0.92) 0%, rgba(8, 18, 36, 0.5) 40%, rgba(8, 18, 36, 0) 70%);
    }
}

/* =========================================================
   A Look Back — photo gallery (replaces the scrolling strip)
   ========================================================= */

.archive {
    overflow: visible;
}
.archive .section-intro {
    margin-bottom: 0;
}

/* Year bar */
.lb-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 2rem 0 1.5rem;
    padding: 0;
    list-style: none;
}
.lb-timeline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--c4), var(--c1), var(--c4), var(--c5), var(--c2), var(--c3));
    opacity: 0.35;
}
.lb-timeline button {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}
.lb-timeline button::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--flag);
    align-self: center;
}
.lb-timeline b {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
}
.lb-timeline span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.lb-timeline button:hover,
.lb-timeline button.is-hot {
    border-color: var(--flag);
    transform: translateY(-2px);
}

/* Mosaic: each row's columns are sized to its photos' shapes, so nothing is cropped */
.lb-gallery {
    display: grid;
    gap: 16px;
}
.lb-row {
    display: grid;
    gap: 16px;
    align-items: start;
}
.lb-tile {
    position: relative;
    margin: 0;
    aspect-ratio: var(--ar);
    border-radius: 18px;
    overflow: hidden;
    background: var(--navy);
    box-shadow: 0 22px 40px -30px rgba(12, 27, 51, 0.65);
    isolation: isolate;
}
.lb-tile::before {
    /* country colour accent along the top */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    height: 5px;
    background: var(--flag);
}
.lb-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.lb-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s;
}
.lb-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(8, 18, 36, 0.78) 0%, rgba(8, 18, 36, 0) 38%);
    transition: opacity 0.3s;
}
.lb-tile figcaption {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: calc(100% - 28px);
    padding: 0.5rem 0.9rem 0.5rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
}
.lb-tile figcaption::before {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--flag);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.lb-expand {
    position: absolute;
    top: 16px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s, transform 0.25s;
}
.lb-expand::before {
    content: "";
    width: 16px;
    height: 16px;
    background: var(--navy);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lb-tile:hover img,
.lb-tile.is-hot img,
.lb-open:focus-visible img {
    transform: scale(1.04);
}
.lb-tile:hover .lb-expand,
.lb-tile.is-hot .lb-expand,
.lb-open:focus-visible .lb-expand {
    opacity: 1;
    transform: scale(1);
}
.lb-open:focus-visible {
    outline: none;
}
.lb-tile:has(.lb-open:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Gentle reveal as the gallery scrolls into view (added by home.js) */
.lb-reveal .lb-tile {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.lb-reveal .lb-tile.is-in {
    opacity: 1;
    transform: none;
}

/* Lightbox: previous / next and counter */
.dialog-nav {
    position: fixed;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-size: 1.2rem;
}
.dialog-nav:hover {
    background: #fff;
}
.dialog-prev {
    left: 20px;
}
.dialog-next {
    right: 20px;
}
.dialog-nav[hidden] {
    display: none;
}
.dialog-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}
.dialog-count {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
.dialog-count[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .lb-timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .lb-timeline::before {
        display: none;
    }
}
@media (max-width: 680px) {
    .lb-timeline {
        display: flex;
        gap: 8px;
        margin-inline: calc(-1 * var(--gutter));
        padding-inline: var(--gutter);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .lb-timeline::-webkit-scrollbar {
        display: none;
    }
    .lb-timeline li {
        flex: none;
    }
    .lb-timeline button {
        padding-inline: 0.9rem;
    }
    .lb-row {
        grid-template-columns: 1fr !important;
    }
    .lb-tile figcaption {
        left: 10px;
        bottom: 10px;
        font-size: 0.8rem;
    }
    .lb-expand {
        opacity: 1;
        transform: none;
        width: 34px;
        height: 34px;
    }
    .dialog-nav {
        top: auto;
        bottom: 18px;
        margin-top: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lb-reveal .lb-tile {
        opacity: 1;
        transform: none;
    }
}

/* Homepage welcome block: longer heading */
.welcome .welcome-title {
    font-size: clamp(1.9rem, 3.3vw, 2.6rem);
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

/* Keynote Addresses & Speakers (homepage block 5) */
.mission .keynote-heading {
    margin-bottom: 2.25rem;
}
.keynotes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.keynote {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 1.35rem 1.4rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.keynote:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 179, 18, 0.55);
    transform: translateY(-3px);
}
.keynote time {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c3);
}
.keynote h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #fff;
}
.keynote-speaker {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: auto 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.keynote-speaker strong {
    font-size: 0.98rem;
    color: var(--c5);
}
.keynote-speaker span {
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}
@media (max-width: 1180px) {
    .keynotes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .keynotes {
        grid-template-columns: 1fr;
    }
}

/* Placeholder block ("TO BE UPDATED SOON") */
.coming-soon {
    margin: 0;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    border: 1px dashed rgba(12, 27, 51, 0.22);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent-dark);
}

/* Footer contact columns */
.footer-contact .footer-org {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.45;
    color: var(--c5);
}
.footer-contact .footer-name {
    margin: 0 0 0.3rem;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: #fff;
}
.footer-contact address {
    margin-bottom: 0.6rem;
    line-height: 1.55;
}

/* Hero slide with no text: lighter shading so the photo stays bright */
.hero .slide.no-copy::after {
    background: linear-gradient(0deg, rgba(8, 18, 36, 0.55) 0%, rgba(8, 18, 36, 0) 30%);
}

/* Homepage block 2 heading: black instead of orange */
.welcome .welcome-plain em {
    color: var(--ink);
}

/* Documents: year sort buttons */
.doc-sort {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--paper-2);
}
.doc-sort button {
    padding: 0.3rem 0.75rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.doc-sort button[aria-pressed="true"] {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(12, 27, 51, 0.15);
}
.archive-sort {
    margin: 0 1.5rem 0.75rem;
}
