/* =================================================================
   YOUNGO Food & Agriculture - Academy Page & Site-wide Add-ons
   Additive stylesheet only: extends style.css design tokens,
   never overrides core site sections (hero, papers, about, footer...)
   ================================================================= */

/* ===== EXTRA COLOR TOKENS =====
   Warmer, more varied section washes so the middle of the page
   doesn't flatten into repeated white/gray banding, plus a richer
   gradient for solid badges that echoes the hero/footer gradients. */
:root {
    --color-bg-tint-lime: #eef6e0;
    --color-bg-tint-slate: #e6eef0;
    --color-bg-tint-warm: #f6efdf;
    --color-icon-box: #eaf3da;
    --gradient-badge: linear-gradient(135deg, var(--color-forest), var(--color-slate-dark));
    --gradient-accent-1: linear-gradient(135deg, var(--color-lime), var(--color-forest));
    --gradient-accent-2: linear-gradient(135deg, var(--color-forest), var(--color-slate));
    --gradient-accent-3: linear-gradient(135deg, var(--color-slate), var(--color-lime-dark));
    --gradient-accent-4: linear-gradient(135deg, var(--color-forest-dark), var(--color-lime-dark));
    --gradient-accent-5: linear-gradient(135deg, var(--color-forest), var(--color-lime));
    --gradient-accent-6: linear-gradient(135deg, var(--color-slate-dark), var(--color-forest));
}

/* ===== LOCK THE SITE TO THE LIGHT THEME =====
   style.css defines a prefers-color-scheme:dark block that swaps
   backgrounds to near-black and text to light gray. The new sections
   (tinted backgrounds, white cards, etc.) were designed against the
   light values only and were never paired with dark equivalents, so
   on a dark-mode device text was rendering light-on-light and cards
   were turning solid black against light section backgrounds. Rather
   than hand-pair every component for two themes, pin the whole site
   to its light values — this file loads after style.css so it wins
   the cascade inside the same media query. */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-primary: #ffffff;
        --color-bg-secondary: #f9fafb;
        --color-bg-tertiary: #f3f4f6;
        --color-border-light: #e5e7eb;
        --color-border-medium: #d1d5db;
        --color-text-primary: #111827;
        --color-text-secondary: #374151;
        --color-text-tertiary: #4b5563;

        --gradient-card-1: linear-gradient(
            135deg,
            rgba(164, 198, 57, 0.1) 0%,
            rgba(90, 125, 94, 0.05) 100%
        );
        --gradient-card-2: linear-gradient(
            135deg,
            rgba(90, 125, 94, 0.1) 0%,
            rgba(74, 107, 124, 0.05) 100%
        );
        --gradient-card-3: linear-gradient(
            135deg,
            rgba(74, 107, 124, 0.1) 0%,
            rgba(164, 198, 57, 0.05) 100%
        );

        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        --shadow-md:
            0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        --shadow-lg:
            0 10px 15px -3px rgba(0, 0, 0, 0.1),
            0 4px 6px -2px rgba(0, 0, 0, 0.05);
        --shadow-xl:
            0 20px 25px -5px rgba(0, 0, 0, 0.1),
            0 10px 10px -5px rgba(0, 0, 0, 0.04);
        --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

/* =================================================================
   HOMEPAGE: PHOTO GALLERY
   Auto-advancing crossfade carousel over every group/action photo.
   Images use data-src and are loaded just-in-time (current + a
   1-slide preload buffer) by initGallery() in app.js, rather than
   all ~22 loading at once when the section scrolls into view.
   To add a photo later: copy a .gallery__slide block, point data-src
   at the new file, update the caption. No other change needed.
   ================================================================= */
.gallery {
    padding: var(--space-24) 0;
    background: var(--color-bg-tint-warm);
}

.gallery__viewer {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16 / 8;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--color-bg-tertiary);
}

.gallery__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    margin: 0;
}

.gallery__slide--active {
    opacity: 1;
    z-index: 1;
}

.gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--color-bg-tertiary);
}

.gallery__slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-10) var(--space-6) var(--space-4);
    background: linear-gradient(to top, rgba(15, 20, 25, 0.75), transparent);
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.9375rem;
}

.gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--color-white);
    color: var(--color-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all var(--transition-fast);
}

.gallery__nav:hover {
    background: var(--color-lime);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.08);
}

.gallery__nav .icon {
    width: 24px;
    height: 24px;
}

@media (max-width: 640px) {
    .gallery__nav {
        width: 42px;
        height: 42px;
    }

    .gallery__nav .icon {
        width: 20px;
        height: 20px;
    }
}

.gallery__nav--prev {
    left: var(--space-4);
}

.gallery__nav--next {
    right: var(--space-4);
}

.gallery__counter {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2;
    background: rgba(15, 20, 25, 0.55);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

@media (max-width: 640px) {
    .gallery {
        padding: var(--space-16) var(--space-4);
    }

    .gallery__viewer {
        aspect-ratio: 4 / 5;
    }

    .gallery__slide figcaption {
        font-size: 0.8125rem;
        padding: var(--space-6) var(--space-4) var(--space-3);
    }
}

/* ===== HERO STATS SOURCE CITATION ===== */
.hero__stats-source {
    margin-top: var(--space-4);
    text-align: center;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* ===== PAPER CARD AS A DIRECT LINK =====
   Position papers used to be a clickable <article> that opened a PDF
   modal (which broke on Drive's embedding permissions) while the
   "Read Paper" link inside it ALSO opened its own new tab: a
   double-action bug. Now each card is one <a> straight to the Drive
   preview, opened in a new tab, no modal — the only sane way to scale
   to many more papers. This just resets default link styling since
   .paper-card is now an anchor. */
.paper-card {
    text-decoration: none;
    color: inherit;
}

/* ===== SHARED BUTTON MODIFIER (light backgrounds) ===== */
.btn--forest-outline {
    background: transparent;
    color: var(--color-forest);
    border-color: var(--color-forest);
}

.btn--forest-outline:hover {
    background: var(--color-forest);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 125, 94, 0.35);
}

/* ===== NAV ACTIVE STATE ===== */
.nav-link.active {
    color: var(--color-lime);
    background: rgba(164, 198, 57, 0.12);
}

/* ===== HERO COMPACT MODIFIER (sub-pages) ===== */
.hero--compact {
    min-height: 62vh;
    padding: calc(var(--space-24) + 20px) 0 var(--space-16);
}

/* Subtle photo texture layered into the hero via blend mode (the
   gradient below it is fully opaque, so a plain background image
   would just be hidden — mix-blend-mode lets it show through as
   texture instead of literally showing the photo). Separate images
   for the homepage hero and the Academy's compact hero — deliberately
   different photos, not the same one twice. */
.hero__background::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    opacity: 0.2;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero:not(.hero--compact) .hero__background::after {
    background-image: url("images/group/group-geneva-lobby.jpg");
}

.hero--compact .hero__background::after {
    background-image: url("images/group/group-team-indoor.jpg");
}

@media (max-width: 768px) {
    .hero--compact {
        min-height: auto;
        padding: calc(var(--space-16) + 56px) var(--space-4) var(--space-10);
    }
}

/* ===== HOMEPAGE: ACADEMY TEASER ===== */
.academy-teaser {
    padding: var(--space-24) 0;
    background: var(--color-bg-tint-slate);
}

.academy-teaser__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.academy-teaser__title {
    margin-bottom: var(--space-4);
    color: var(--color-forest);
}

.academy-teaser__text {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.academy-teaser__list {
    list-style: none;
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.academy-teaser__list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.academy-teaser__list li::before {
    content: "✓";
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-lime);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.academy-teaser__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.academy-teaser__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.academy-teaser__stat {
    background: var(--color-bg-primary);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.academy-teaser__stat:hover {
    border-color: var(--color-lime);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.academy-teaser__stat-number {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--color-forest);
    margin-bottom: var(--space-1);
}

.academy-teaser__stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .academy-teaser {
        padding: var(--space-20) var(--space-4);
    }

    .academy-teaser__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

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

    .academy-teaser__actions .btn {
        justify-content: center;
    }
}

/* ===== GET INVOLVED (3-card engagement hub) ===== */
.engage {
    padding: var(--space-24) 0;
    background: var(--color-bg-tint-lime);
}

.engage__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
}

.engage-card__step {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-text-tertiary);
    font-size: 0.75rem;
    font-weight: 800;
}

.engage-card {
    position: relative;
}

.engage-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--color-bg-primary);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

.engage-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-lime);
    box-shadow: var(--shadow-xl);
}

.engage-card__icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    background: var(--color-icon-box);
    margin-bottom: var(--space-5);
    transition: all var(--transition-base);
}

.engage-card:hover .engage-card__icon {
    transform: scale(1.08) rotate(-4deg);
}

.engage-card__title {
    font-size: 1.25rem;
    color: var(--color-forest);
    margin-bottom: var(--space-3);
}

.engage-card__text {
    color: var(--color-text-tertiary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
    flex: 1;
}

.engage-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-lime);
    font-weight: 700;
    font-size: 0.9375rem;
}

.engage-card__cta svg {
    transition: transform var(--transition-base);
}

.engage-card:hover .engage-card__cta svg {
    transform: translateX(6px);
}

.engage-card--disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.engage-card--disabled:hover {
    transform: none;
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-md);
}

.engage-card--disabled:hover .engage-card__icon {
    transform: none;
}

.engage-card--disabled .engage-card__cta {
    color: var(--color-text-tertiary);
}

@media (max-width: 768px) {
    .engage {
        padding: var(--space-20) var(--space-4);
    }

    .engage__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* ===== ACADEMY PAGE: OFFERINGS GRID ===== */
.academy-offers {
    padding: var(--space-24) 0;
    background: var(--color-bg-tint-lime);
}

.academy-offers__lead {
    max-width: 900px;
    margin: 0 auto var(--space-12);
}

.academy-offers__lead-img {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    object-position: center 30%;
    border-radius: var(--radius-xl);
    display: block;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
    .academy-offers__lead-img {
        aspect-ratio: 4 / 3;
    }
}

.academy-offers__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
}

.academy-offers__grid .feature-card {
    background: var(--color-bg-primary);
}

/* ===== ACADEMY PAGE: SESSION SCHEDULE ===== */
.sessions {
    padding: var(--space-24) 0;
    background: var(--color-bg-primary);
}

.sessions__next {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-5);
    max-width: 780px;
    margin: 0 auto var(--space-6);
    padding: var(--space-4) var(--space-6);
    background: var(--color-lime);
    border-radius: var(--radius-xl);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(164, 198, 57, 0.4);
    transition: all var(--transition-base);
}

.sessions__next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(164, 198, 57, 0.5);
}

.sessions__next-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-forest-dark);
    flex-shrink: 0;
}

.sessions__next-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-forest-dark);
    animation: sessionsNextPulse 1.8s ease-in-out infinite;
}

@keyframes sessionsNextPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.sessions__next-title {
    flex: 1;
    min-width: 200px;
    font-weight: 700;
    color: var(--color-white);
}

.sessions__next-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 800;
    color: var(--color-white);
    flex-shrink: 0;
}

.sessions__next-cta .icon {
    width: 16px;
    height: 16px;
}

@media (prefers-reduced-motion: reduce) {
    .sessions__next-dot {
        animation: none;
    }
}

.sessions__note {
    max-width: 780px;
    margin: 0 auto var(--space-12);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-align: left;
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

.sessions__note .icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--color-lime-light);
}

.sessions__note a {
    color: var(--color-lime-light);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sessions__note a:hover {
    color: var(--color-white);
}

@media (max-width: 640px) {
    .sessions__note {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.sessions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.session-card {
    position: relative;
    background: var(--color-bg-primary);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-6) var(--space-6) var(--space-6) var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
    --card-accent: var(--gradient-accent-1);
}

.sessions__grid .session-card:nth-child(6n + 2) {
    --card-accent: var(--gradient-accent-2);
}
.sessions__grid .session-card:nth-child(6n + 3) {
    --card-accent: var(--gradient-accent-3);
}
.sessions__grid .session-card:nth-child(6n + 4) {
    --card-accent: var(--gradient-accent-4);
}
.sessions__grid .session-card:nth-child(6n + 5) {
    --card-accent: var(--gradient-accent-5);
}
.sessions__grid .session-card:nth-child(6n + 6) {
    --card-accent: var(--gradient-accent-6);
}

.session-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: var(--card-accent);
    opacity: 0.75;
    transition: opacity var(--transition-base);
}

.session-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-lime);
    box-shadow: var(--shadow-lg);
}

.session-card:hover::before {
    opacity: 1;
}

.session-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.session-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-full);
    background: var(--card-accent);
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.8125rem;
}

.session-card__status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: rgba(164, 198, 57, 0.15);
    color: var(--color-lime-dark);
}

.session-card--past .session-card__status {
    background: var(--color-bg-tertiary);
    color: var(--color-text-tertiary);
}

.session-card--past {
    opacity: 0.8;
}

.session-card__title {
    font-size: 1.1875rem;
    color: var(--color-forest);
    margin-bottom: var(--space-2);
}

.session-card__speakers {
    font-size: 0.875rem;
    color: var(--color-slate);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.session-card__desc {
    color: var(--color-text-tertiary);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-bottom: var(--space-4);
}

.session-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    font-weight: 500;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-light);
}

@media (max-width: 768px) {
    .sessions {
        padding: var(--space-20) var(--space-4);
    }

    .sessions__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ACADEMY PAGE: PROGRAM ROADMAP =====
   Replaces the old flat date strip with a purposeful progress map:
   a connecting line that fills as the year progresses, clickable
   nodes that jump straight to each session card, and a live
   "Today" marker computed from the visitor's clock. */
.roadmap {
    padding: var(--space-16) 0 var(--space-20);
    background: var(--color-bg-secondary);
}

.roadmap__track {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4) 0;
    overflow-x: auto;
}

.roadmap__rail {
    position: relative;
    height: 28px;
    min-width: 760px;
    margin-bottom: var(--space-3);
}

.roadmap__line {
    position: absolute;
    left: calc(100% / 18);
    right: calc(100% / 18);
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--color-border-light);
    border-radius: var(--radius-full);
    overflow: visible;
}

.roadmap__line-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: var(--gradient-hero);
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
}

.roadmap__today {
    position: absolute;
    top: -26px;
    left: 0%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-forest);
    background: var(--color-bg-primary);
    padding: 2px 9px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-lime);
    white-space: nowrap;
    display: none;
    transition: left 1s ease-out;
}

.roadmap__today::after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 11px;
    background: var(--color-lime);
}

.roadmap__row {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    min-width: 760px;
}

.roadmap__rail .roadmap__row {
    position: relative;
    height: 100%;
    align-items: center;
    z-index: 1;
}

.roadmap__dot-cell {
    display: flex;
    justify-content: center;
}

.roadmap__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-bg-primary);
    border: 3px solid var(--color-border-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    display: block;
    text-decoration: none;
    padding: 0;
}

.roadmap__dot--done {
    background: var(--gradient-hero);
    border-color: transparent;
}

.roadmap__dot--next {
    background: var(--color-lime);
    border-color: var(--color-lime);
    box-shadow: 0 0 0 5px rgba(164, 198, 57, 0.22);
    animation: roadmapPulse 2.4s ease-in-out infinite;
}

a.roadmap__dot:hover {
    transform: scale(1.35);
    border-color: var(--color-lime);
}

@keyframes roadmapPulse {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(164, 198, 57, 0.22);
    }
    50% {
        box-shadow: 0 0 0 9px rgba(164, 198, 57, 0.08);
    }
}

.roadmap__label-cell {
    text-align: center;
    padding: 0 var(--space-1);
}

.roadmap__label-month {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-tertiary);
    margin-bottom: 2px;
}

.roadmap__label-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text-secondary);
}

.roadmap__label-cell {
    min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    .roadmap__dot--next {
        animation: none;
    }
}

/* =================================================================
   ICON BOX DEFINITION
   The original icon-wrapper tints (feature-card, paper-card,
   engage-card) are very pale washes that can flatten into a white
   card background. Adding a soft shadow + inner ring gives every
   icon box a visible edge without changing its brand color. */
.feature-card__icon,
.paper-card__icon,
.engage-card__icon {
    color: var(--color-forest);
    box-shadow:
        0 3px 8px rgba(90, 125, 94, 0.14),
        inset 0 0 0 1px rgba(90, 125, 94, 0.1);
}

/* =================================================================
   ICON SYSTEM
   Inline SVG sprite (see #icon-sprite) replaces decorative emoji.
   Icons inherit color and size in em units from their container.
   ================================================================= */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

/* =================================================================
   HEADER RIGHT-SIDE GROUP: nav links + "Join Us" CTA + mobile toggle
   ================================================================= */
.header__right {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.header__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-lime);
    color: var(--color-white) !important;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(164, 198, 57, 0.35);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.header__cta:hover {
    background: var(--color-lime-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(164, 198, 57, 0.45);
}

@media (max-width: 900px) {
    .header__cta span {
        display: none;
    }

    .header__cta {
        padding: var(--space-2);
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

/* =================================================================
   IMAGE PLACEHOLDERS
   Swap the <div class="img-placeholder"> for a real <img> later —
   every instance carries a data-placeholder="..." slug for easy grep.
   ================================================================= */
.img-placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: linear-gradient(
        120deg,
        rgba(164, 198, 57, 0.1),
        rgba(74, 107, 124, 0.12),
        rgba(164, 198, 57, 0.1)
    );
    background-size: 200% 200%;
    border: 2px dashed rgba(90, 125, 94, 0.35);
    border-radius: var(--radius-xl);
    color: var(--color-forest);
    text-align: center;
    padding: var(--space-4);
    overflow: hidden;
    animation: placeholderShimmer 7s ease-in-out infinite;
}

.img-placeholder .icon {
    width: 1.75rem;
    height: 1.75rem;
    opacity: 0.55;
}

.img-placeholder span {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.65;
    text-transform: uppercase;
}

.img-placeholder--banner {
    width: 100%;
    aspect-ratio: 16 / 5;
}

.img-placeholder--wide {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.img-placeholder--thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: var(--space-5);
}

.img-placeholder--poster {
    width: 100%;
    aspect-ratio: 16 / 8;
    margin-bottom: var(--space-4);
}

.session-card__poster-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    display: block;
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
}

@keyframes placeholderShimmer {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}


/* ===== HOMEPAGE: CTA BACKGROUND PHOTO =====
   A subtle, low-opacity photo layer behind the existing dark gradient
   (added via ::after so it doesn't fight the site's own ::before
   decorative overlay on .cta) — adds warmth/humanity without hurting
   text contrast. */
.cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("images/group/cop29-group.jpg");
    background-size: cover;
    background-position: center 30%;
    opacity: 0.16;
    mix-blend-mode: luminosity;
    pointer-events: none;
}

/* =================================================================
   HOMEPAGE: "WHERE WE SHOW UP" PHOTO MOSAIC
   A deliberate asymmetric layout (one large hero photo + four equal
   supporting photos filling the remaining grid) rather than a uniform
   grid of same-size boxes — the point is editorial composition, not
   just "a place to put images".
   ================================================================= */
.showup {
    padding: var(--space-24) 0;
    /* Distinct from .about (white) directly above it and .map-section
       (mint/blue gradient) directly below — otherwise two consecutive
       white-ish sections read as one undifferentiated blank area. */
    background: var(--color-bg-tint-warm);
}

.showup__mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 220px);
    gap: var(--space-4);
    max-width: 1200px;
    margin: 0 auto;
}

.showup__photo {
    position: relative;
    margin: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.showup__photo--hero {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.showup__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform var(--transition-slow);
}

/* For a photo where object-fit: cover still needs to trim some height
   even after the source was pre-cropped (see DEVELOPER_GUIDE.md,
   "Photo hero cropping"), bias the remaining crop toward where the
   subject's face actually is instead of a flat center. */
.showup__photo-img--top {
    object-position: center 30%;
}

.showup__photo:hover img {
    transform: scale(1.06);
}

.showup__photo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-6) var(--space-4) var(--space-3);
    background: linear-gradient(to top, rgba(15, 20, 25, 0.8), transparent);
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.8125rem;
}

.showup__photo--hero figcaption {
    padding: var(--space-8) var(--space-6) var(--space-5);
    font-size: 1.0625rem;
}

/* Captions stay in the markup (useful internally + for screen readers)
   but are hidden visually here until real titles are supplied. */
.showup--no-captions .showup__photo figcaption {
    display: none;
}

.showup__mosaic.showup__mosaic--six {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 180px);
}

@media (max-width: 900px) {
    .showup__mosaic.showup__mosaic--six {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 240px repeat(3, 150px);
    }

    .showup__mosaic.showup__mosaic--six .showup__photo--hero {
        grid-column: 1 / 3;
        grid-row: 1;
    }
}

@media (max-width: 560px) {
    .showup__mosaic.showup__mosaic--six {
        grid-template-columns: 1fr;
        grid-template-rows: 220px repeat(5, 160px);
    }

    .showup__mosaic.showup__mosaic--six .showup__photo--hero {
        grid-column: 1;
        grid-row: 1;
    }
}

@media (max-width: 900px) {
    .showup__mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 260px repeat(2, 160px);
    }

    .showup__photo--hero {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
}

@media (max-width: 560px) {
    .showup__mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: 220px repeat(4, 160px);
    }

    .showup__photo--hero {
        grid-column: 1;
        grid-row: 1;
    }
}

.showup--compact {
    padding: var(--space-20) 0;
    background: var(--color-bg-secondary);
}

.showup__mosaic--three {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 200px);
    max-width: 1000px;
}

.showup__mosaic--three .showup__photo--hero {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.showup__mosaic--three .showup__photo:not(.showup__photo--hero):nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
}

.showup__mosaic--three .showup__photo:not(.showup__photo--hero):nth-of-type(3) {
    grid-column: 3;
    grid-row: 2;
}

@media (max-width: 700px) {
    .showup__mosaic--three {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px repeat(2, 140px);
    }

    .showup__mosaic--three .showup__photo--hero {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .showup__mosaic--three .showup__photo:not(.showup__photo--hero):nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .showup__mosaic--three .showup__photo:not(.showup__photo--hero):nth-of-type(3) {
        grid-column: 2;
        grid-row: 2;
    }
}

/* Full-width lead photo on top, an equal row of supporting photos
   below — for exactly "hero + 3 supporting" (4 total), which doesn't
   divide evenly under the --three or --six corner-hero layouts
   without leaving an awkward empty cell. */
.showup__mosaic--banner {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 480px 180px;
    max-width: 1000px;
}

.showup__mosaic--banner .showup__photo--hero {
    grid-column: 1 / 4;
    grid-row: 1;
}

@media (max-width: 700px) {
    .showup__mosaic--banner {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 300px repeat(2, 140px);
    }

    .showup__mosaic--banner .showup__photo--hero {
        grid-column: 1 / 3;
        grid-row: 1;
    }
}

@media (max-width: 480px) {
    .showup__mosaic--banner {
        grid-template-columns: 1fr;
        grid-template-rows: 200px repeat(3, 160px);
    }

    .showup__mosaic--banner .showup__photo--hero {
        grid-column: 1;
        grid-row: 1;
    }
}

/* ===== HOMEPAGE: ABOUT VISION TAGLINE ===== */
.about__vision-tagline {
    font-size: 1.375rem;
    font-weight: 800;
    font-style: italic;
    color: var(--color-lime-dark);
    margin-bottom: var(--space-3);
    letter-spacing: -0.01em;
}

/* =================================================================
   HOMEPAGE: ABOUT SECTION PHOTO PAIR
   ================================================================= */
.about__photos {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.about__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    display: block;
    box-shadow: var(--shadow-md);
}

.about__photo--wide {
    aspect-ratio: 4 / 3;
}

.about__photo--tall {
    aspect-ratio: 3 / 4;
}

@media (max-width: 640px) {
    .about__photos {
        grid-template-columns: 1fr;
    }

    .about__photo--wide,
    .about__photo--tall {
        aspect-ratio: 16 / 10;
    }
}

/* =================================================================
   ACADEMY LOGO BADGE
   Reserved spot for the official Academy mark once supplied.
   ================================================================= */
.badge-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    object-fit: contain;
    background: var(--gradient-badge);
    padding: var(--space-2);
    flex-shrink: 0;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(255, 255, 255, 0.18);
}

.engage-card__icon img,
.feature-card__icon img,
.paper-card__icon img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}

/* =================================================================
   SESSION CARD ADD-ONS: poster placeholder, coordinator line,
   expandable details (native <details>, no JS required)
   ================================================================= */
.session-card__actions:not(:empty) {
    margin-top: var(--space-4);
}

.session-card__action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.session-card__action--register {
    background: var(--color-lime);
    color: var(--color-white);
}

.session-card__action--register:hover {
    background: var(--color-lime-dark);
    transform: translateY(-1px);
}

.session-card__action--watch {
    background: var(--gradient-badge);
    color: var(--color-white);
}

.session-card__action--watch:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.session-card__details {
    margin-top: var(--space-3);
}

.session-card__details summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-forest);
}

.session-card__details summary::-webkit-details-marker {
    display: none;
}

.session-card__details summary .icon {
    transition: transform var(--transition-fast);
}

.session-card__details[open] summary .icon {
    transform: rotate(90deg);
}

.session-card__details-body {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-border-light);
}

.session-card__details-body ul {
    list-style: none;
    display: grid;
    gap: var(--space-2);
}

.session-card__details-body li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
}

.session-card__details-body li .icon {
    margin-top: 3px;
    color: var(--color-lime-dark);
}

/* =================================================================
   MOTION: staggered reveal + reduced-motion support
   ================================================================= */
.papers__grid .paper-card:nth-child(2) {
    transition-delay: 0.08s;
}
.papers__grid .paper-card:nth-child(3) {
    transition-delay: 0.16s;
}

.engage__grid .engage-card:nth-child(2) {
    transition-delay: 0.08s;
}
.engage__grid .engage-card:nth-child(3) {
    transition-delay: 0.16s;
}

.about__features .feature-card:nth-child(even),
.academy-offers__grid .feature-card:nth-child(3n + 2) {
    transition-delay: 0.08s;
}
.about__features .feature-card:nth-child(4),
.academy-offers__grid .feature-card:nth-child(3n + 3) {
    transition-delay: 0.16s;
}

.sessions__grid .session-card:nth-child(even) {
    transition-delay: 0.1s;
}

/* =================================================================
   MOBILE NAV TOGGLE
   ================================================================= */
.header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--color-forest);
    flex-shrink: 0;
}

.header__toggle:hover {
    background: rgba(164, 198, 57, 0.12);
}

.header__toggle .icon {
    width: 22px;
    height: 22px;
}

.header__toggle .icon-close {
    display: none;
}

.header__toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.header__toggle[aria-expanded="true"] .icon-close {
    display: block;
}

@media (max-width: 900px) {
    .header__toggle {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-bg-primary);
        border-top: 1px solid var(--color-border-light);
        box-shadow: var(--shadow-lg);
        padding: var(--space-4);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition:
            opacity var(--transition-fast),
            transform var(--transition-fast),
            visibility var(--transition-fast);
    }

    .header__nav.open {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .header__nav .nav-link {
        width: 100%;
        padding: var(--space-3) var(--space-2);
        border-radius: 0;
        border-bottom: 1px solid var(--color-border-light);
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
