/* =========================================================
   About page (about.html) — loads after css/theme.css.
   Hero geometry follows the Figma "About Page" (1u = 1px at a
   1280px viewport via --u); the sections below flow normally
   so content can grow. Motion: js/about-animations.js.
   ========================================================= */

body.page-about {
    --font-ui: 'Plus Jakarta Sans', 'Lexend Exa', sans-serif;
}

/* ---------- Hero ---------- */

body.page-about .page-hero {
    height: calc(1150 * var(--u));
}

body.page-about .page-helix--about {
    left: calc(374 * var(--u));
    top: calc(267 * var(--u));
    width: calc(1325.64 * var(--u));
    height: calc(794.28 * var(--u));
}

body.page-about .page-helix--about img {
    transform: rotate(-51.13deg);
}

body.page-about .page-sphere--about-1 {
    left: calc(582 * var(--u));
    top: calc(-60 * var(--u));
    width: calc(343 * var(--u));
}

body.page-about .page-sphere--about-2 {
    left: calc(393 * var(--u));
    top: calc(580 * var(--u));
    width: calc(189 * var(--u));
}

body.page-about .page-body {
    padding: 0 0 calc(40 * var(--u));
}

/* ---------- Sections ---------- */

body.page-about .about-section {
    position: relative;
    z-index: 3;
    width: min(calc(1118 * var(--u)), 92vw);
    margin: 0 auto;
    padding: calc(70 * var(--u)) 0;
}

body.page-about .about-heading {
    margin: 0 0 calc(28 * var(--u));
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(24px, calc(44 * var(--u)), 52px);
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-align: center;
    color: #ffffff;
    text-wrap: balance;
}

body.page-about .about-lede {
    max-width: calc(1118 * var(--u));
    margin: 0 auto;
    font-size: max(17px, calc(24 * var(--u)));
    line-height: 1.45;
    text-align: center;
    color: #ffffff;
    text-wrap: pretty;
}

/* ---------- Fact spheres (flip on hover / focus / tap) ---------- */

body.page-about .fact-grid {
    display: flex;
    justify-content: space-between;
    gap: calc(40 * var(--u));
    list-style: none;
    margin: calc(60 * var(--u)) 0 0;
    padding: 0;
}

body.page-about .fact-card {
    display: block;
    width: calc(228 * var(--u));
    height: calc(228 * var(--u));
    padding: 0;
    border: 0;
    background: none;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    perspective: 1200px;
    -webkit-tap-highlight-color: transparent;
}

body.page-about .fact-card:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 8px;
    border-radius: 50%;
}

body.page-about .fact-card-inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-about .fact-card:hover .fact-card-inner,
body.page-about .fact-card:focus-visible .fact-card-inner,
body.page-about .fact-card.is-flipped .fact-card-inner {
    transform: rotateY(180deg);
}

body.page-about .fact-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(30 * var(--u));
    border-radius: 50%;
    background: linear-gradient(180deg, #0c0f1c 0%, #445497 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    font-family: var(--font-body);
    font-size: max(15px, calc(20 * var(--u)));
    line-height: 1.3;
    text-align: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    text-wrap: balance;
}

body.page-about .fact-face--back {
    transform: rotateY(180deg);
    background: linear-gradient(180deg, #121628 0%, #3d4b8b 100%);
    font-size: max(13px, calc(15 * var(--u)));
    line-height: 1.35;
}

/* ---------- Timeline ---------- */

body.page-about .timeline {
    position: relative;
    list-style: none;
    max-width: calc(1118 * var(--u));
    margin: calc(60 * var(--u)) auto 0;
    padding: calc(20 * var(--u)) 0;
}

body.page-about .timeline::before,
body.page-about .timeline-progress {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
}

body.page-about .timeline::before {
    background: rgba(255, 255, 255, 0.22);
}

body.page-about .timeline-progress {
    background: #ffffff;
    transform-origin: 50% 0;
}

body.page-about .timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr calc(200 * var(--u)) 1fr;
    align-items: center;
    min-height: calc(150 * var(--u));
    margin: 0;
}

body.page-about .timeline-text {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: calc(20 * var(--u)) calc(20 * var(--u));
    font-size: max(16px, calc(22 * var(--u)));
    line-height: 1.4;
    text-align: center;
    color: #ffffff;
    text-wrap: pretty;
}

body.page-about .timeline-item.is-right .timeline-text {
    grid-column: 3;
}

body.page-about .timeline-marker {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

body.page-about .timeline-dot {
    width: calc(14 * var(--u));
    height: calc(14 * var(--u));
    min-width: 10px;
    min-height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 calc(6 * var(--u)) rgba(255, 255, 255, 0.14);
}

body.page-about .timeline-year {
    position: absolute;
    top: 50%;
    right: calc(50% + 26 * var(--u));
    transform: translateY(-50%);
    font-size: max(16px, calc(24 * var(--u)));
    letter-spacing: 0.02em;
    color: #ffffff;
    white-space: nowrap;
}

body.page-about .timeline-item.is-right .timeline-year {
    right: auto;
    left: calc(50% + 26 * var(--u));
}

body.page-about .timeline-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 200ms ease;
}

body.page-about .timeline-link:hover,
body.page-about .timeline-link:focus-visible {
    text-decoration-color: rgba(255, 255, 255, 0.45);
}

body.page-about .timeline-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* ---------- Jamboree ---------- */

body.page-about .jamboree-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: calc(30 * var(--u));
    list-style: none;
    margin: calc(50 * var(--u)) 0 0;
    padding: 0;
}

body.page-about .jamboree-card {
    padding: calc(36 * var(--u)) calc(26 * var(--u));
    border-radius: calc(8 * var(--u));
    background: linear-gradient(180deg, #4a5aa1 14.9%, #547284 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

body.page-about .jamboree-card h3 {
    margin: 0 0 calc(14 * var(--u));
    font-family: var(--font-body);
    font-weight: 500;
    font-size: max(16px, calc(20 * var(--u)));
    line-height: 1.3;
    color: #ffffff;
}

body.page-about .jamboree-card p {
    margin: 0;
    font-size: max(15px, calc(17 * var(--u)));
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

body.page-about .jamboree-feature {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: calc(70 * var(--u));
    align-items: center;
    margin: calc(90 * var(--u)) 0 0;
}

body.page-about .jamboree-feature p {
    margin: 0;
    font-size: max(16px, calc(20 * var(--u)));
    line-height: 1.5;
    color: #ffffff;
    text-wrap: pretty;
}

body.page-about .jamboree-feature figure {
    margin: 0;
}

body.page-about .jamboree-feature img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(12 * var(--u));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

body.page-about .jamboree-feature figcaption {
    margin-top: calc(16 * var(--u));
    font-size: max(14px, calc(16 * var(--u)));
    line-height: 1.45;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Subteams ---------- */

body.page-about .subteam-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: calc(20 * var(--u));
    list-style: none;
    margin: 0 0 calc(40 * var(--u));
    padding: 0;
}

body.page-about .subteam-tabs li {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}

body.page-about .subteam-tab {
    width: 100%;
    min-height: calc(83 * var(--u));
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: max(14px, calc(18 * var(--u)));
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
    cursor: pointer;
    transition: background-color 220ms ease, border-color 220ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-about .subteam-tab:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

body.page-about .subteam-tab[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.4);
}

body.page-about .subteam-tab:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

body.page-about .subteam-panel {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: calc(50 * var(--u));
    align-items: center;
    padding: calc(60 * var(--u)) calc(70 * var(--u));
    border-radius: min(calc(125 * var(--u)), 64px);
    background: rgba(255, 255, 255, 0.1);
    font-family: var(--font-ui);
}

body.page-about .subteam-panel[hidden] {
    display: none;
}

body.page-about .subteam-panel p,
body.page-about .subteam-panel li {
    font-family: var(--font-ui);
    font-size: max(16px, calc(20 * var(--u)));
    line-height: 1.5;
    color: #ffffff;
}

body.page-about .subteam-panel p {
    margin: 0 0 1em;
}

body.page-about .subteam-panel p:last-child {
    margin-bottom: 0;
}

body.page-about .subteam-panel ul {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

body.page-about .subteam-panel li {
    margin-bottom: 0.3em;
}

body.page-about .subteam-panel img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(24 * var(--u));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* Subteam photo pair: hard-cuts between the regular and the fun shot every 3s, like the Team banner (js/about-animations.js). */
body.page-about .subteam-photos {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: calc(24 * var(--u));
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

body.page-about .subteam-photos img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
    border-radius: 0;
    box-shadow: none;
    display: none;
}

body.page-about .subteam-photos img.is-active {
    display: block;
}

/* ---------- Narrow screens ---------- */

@media screen and (max-width: 860px) {
    body.page-about .page-hero {
        height: auto;
        min-height: 120vw;
    }

    body.page-about .page-helix--about {
        --u: calc(100vw / 640);
        left: -30vw;
        top: 30vw;
    }

    body.page-about .page-sphere--about-1 {
        left: 62vw;
        top: 40vw;
        width: 36vw;
    }

    body.page-about .page-sphere--about-2 {
        left: 6vw;
        top: 100vw;
        width: 24vw;
    }

    body.page-about .about-section {
        width: 92vw;
        padding: 12vw 0;
    }

    body.page-about .fact-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6vw;
        margin-top: 10vw;
    }

    body.page-about .fact-card {
        width: 56vw;
        height: 56vw;
        max-width: 240px;
        max-height: 240px;
    }

    body.page-about .fact-face {
        font-size: max(15px, 4.6vw);
        padding: 7vw;
    }

    body.page-about .fact-face--back {
        font-size: max(13px, 3.6vw);
    }

    /* Timeline: line at the left, everything in one column */
    body.page-about .timeline::before,
    body.page-about .timeline-progress {
        left: 22px;
    }

    body.page-about .timeline-item,
    body.page-about .timeline-item.is-right {
        grid-template-columns: 44px 1fr;
        min-height: 0;
        margin-bottom: 8vw;
    }

    body.page-about .timeline-marker {
        grid-column: 1;
        align-items: flex-start;
        padding-top: 0.55em;
    }

    body.page-about .timeline-year {
        position: static;
        transform: none;
        display: block;
        margin-bottom: 0.2em;
        font-size: max(15px, 4.5vw);
        opacity: 0.85;
    }

    body.page-about .timeline-text,
    body.page-about .timeline-item.is-right .timeline-text {
        grid-column: 2;
        padding: 0 0 0 4vw;
        text-align: left;
        font-size: max(16px, 4.2vw);
    }

    body.page-about .jamboree-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4vw;
    }

    body.page-about .jamboree-card {
        padding: 6vw 5vw;
        border-radius: 3vw;
    }

    body.page-about .jamboree-feature {
        grid-template-columns: 1fr;
        gap: 6vw;
        margin-top: 12vw;
    }

    body.page-about .subteam-tabs {
        flex-wrap: wrap;
        gap: 3vw;
    }

    body.page-about .subteam-tabs li {
        flex: 0 1 auto;
    }

    body.page-about .subteam-tab {
        width: auto;
        min-height: 0;
        padding: 10px 16px;
        font-size: max(14px, 3.8vw);
    }

    body.page-about .subteam-panel {
        grid-template-columns: 1fr;
        gap: 6vw;
        padding: 8vw 6vw;
        border-radius: 32px;
    }

    body.page-about .subteam-photos {
        aspect-ratio: 4 / 5;
        max-width: 420px;
        margin: 0 auto;
        border-radius: 5vw;
    }
}

@media screen and (max-width: 520px) {
    body.page-about .jamboree-grid {
        grid-template-columns: 1fr;
    }
}
