/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease;
}

.nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 5);
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
}

.nav-logo .nav-logo-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    margin-right: calc(var(--space-unit) * 2);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-active .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle-active .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-active .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: calc(var(--space-unit) * 3);
    list-style: none;
    z-index: 105;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: color 0.2s ease;
    position: relative;
    padding: calc(var(--space-unit)) 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: #fff;
    background: var(--color-accent);
    padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 3);
    text-decoration: none;
    transition: background 0.2s ease;
}

.nav-cta:hover {
    background: var(--color-ink);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        top: 64px;
        background: color-mix(in srgb, var(--color-bg) 96%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        align-items: flex-start;
        padding: calc(var(--space-unit) * 6) calc(var(--space-unit) * 5);
        gap: calc(var(--space-unit) * 4);
        transform: translateY(-120%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        pointer-events: none;
    }

    .nav-links.nav-open {
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .nav-cta {
        display: none;
    }
}

/* Hero Section — cinematic opening frame */
.hero {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    background: #0a0908;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.hero-bg-img {
    position: absolute;
    inset: -10%;
    background: url('../assets/hero.png') center 42% / cover no-repeat;
    filter: saturate(0.82) contrast(1.04) brightness(0.95);
    transform: scale(1);
    animation: hero-scale 24s ease-out forwards;
    will-change: transform;
}

.hero-bg-video {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center 42%;
    filter: saturate(0.82) contrast(1.04) brightness(0.95);
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: opacity, transform;
}

.hero-bg.video-ready .hero-bg-video {
    opacity: 1;
}

.hero-bg.video-ready .hero-bg-img {
    opacity: 0;
}

/* Dark overlay — ~55% so monumental type stays readable */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 7, 6, 0.82) 0%, rgba(8, 7, 6, 0.55) 42%, rgba(8, 7, 6, 0.25) 100%),
        linear-gradient(180deg, rgba(8, 7, 6, 0.45) 0%, rgba(8, 7, 6, 0.15) 40%, rgba(8, 7, 6, 0.65) 100%);
}

/* Soft vignette — quiet, abandoned edge falloff */
.hero-bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 30% 45%, transparent 40%, rgba(6, 5, 4, 0.55) 100%);
    pointer-events: none;
}

/* Tiny drifting particles — nature reclaiming, very subtle */
.hero-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 18% 32%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 46% 64%, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1px 1px at 72% 28%, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1.5px 1.5px at 82% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 60% 18%, rgba(255, 255, 255, 0.3), transparent);
    background-repeat: no-repeat;
    opacity: 0.7;
    animation: hero-drift 26s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes hero-scale {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.03);
    }
}

@keyframes hero-drift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(0, -14px, 0);
    }
}

:root[data-theme='light'] .hero-bg-img {
    filter: saturate(0.8) contrast(1.02) brightness(1.05);
}

:root[data-theme='light'] .hero-bg-video {
    filter: saturate(0.8) contrast(1.02) brightness(1.05);
}

/* Full-bleed hero content — left-weighted, large negative space on right */
.hero-content-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: calc(var(--space-unit) * 6) calc(var(--space-unit) * 5);
    padding-bottom: calc(var(--space-unit) * 14);
    max-width: var(--max-width);
    margin: 0 auto;
    animation: hero-fade 1.4s ease-out 0.2s both;
}

@keyframes hero-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: calc(var(--space-unit) * 5);
}

.hero-title {
    text-shadow: 0 2px 60px rgba(0, 0, 0, 0.55);
    font-size: clamp(5rem, 21vw, 19rem);
    line-height: 0.82;
    font-weight: 900;
    letter-spacing: -0.05em;
    /* occupy ~40-50% of viewport height */
    margin: 0;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.75rem);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-top: calc(var(--space-unit) * 5);
    margin-bottom: calc(var(--space-unit) * 7);
    color: var(--color-text);
    max-width: 16ch;
    text-shadow: 0 1px 22px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: calc(var(--space-unit) * 5);
    flex-wrap: wrap;
}

.hero-action-link {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 40%, transparent);
    padding-bottom: 3px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-action-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

@media (max-width: 768px) {
    .hero-content-wrap {
        padding-left: calc(var(--space-unit) * 3);
        padding-right: calc(var(--space-unit) * 3);
    }
}

@media (min-width: 1440px) {
    .hero-content-wrap {
        padding-left: calc(var(--space-unit) * 6);
        padding-right: calc(var(--space-unit) * 6);
    }
}

/* Story Interlude — narrative transitions between chapters */
.story-interlude {
    padding: calc(var(--space-unit) * 6) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.story-interlude-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 calc(var(--space-unit) * 5);
    display: flex;
    align-items: center;
    gap: calc(var(--space-unit) * 4);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.story-interlude-label {
    font-weight: 700;
    color: var(--color-accent);
    white-space: nowrap;
}

.story-interlude-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .story-interlude-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--space-unit) * 2);
    }
}

/* Section Styling */
body>section:not(.hero),
.footer {
    --color-bg: #000;
    --color-paper: #111111;
    --color-ink: #000;
    --color-text: #f4f1ea;
    --color-text-secondary: #c3beb5;
    --color-text-muted: #827b70;
    --color-border: #282520;
    --color-grid: #15130f;
    --color-accent-soft: #351916;
    background-color: #000;
    color: var(--color-text);
}

body>section:not(.hero) {
    position: relative;
    overflow: hidden;
    background: #000;
    border-top: 1px solid #171513;
}

body>section:not(.hero)::after {
    display: none;
}

body>section:not(.hero)>*,
.footer>* {
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: calc(var(--space-unit) * 2);
    margin-bottom: calc(var(--space-unit) * 6);
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 80px;
    height: 3px;
    background: var(--color-accent);
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* Theme Cards — Asymmetric Swiss Layout */
.theme-card {
    --card-accent: var(--color-accent);
    background: #0c0c0c;
    border: 1px solid #1b1a18;
    padding: calc(var(--space-unit) * 6);
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.4s ease;
    cursor: pointer;
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.theme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-card:hover {
    transform: translateY(-4px);
    background: #141311;
    border-color: #3a342d;
}

.theme-card:hover::before {
    transform: scaleX(1);
}

.theme-card:nth-child(odd) {
    border-right: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .theme-card {
        grid-column: span 12;
    }
}

.theme-roman {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--card-accent);
    margin-bottom: calc(var(--space-unit) * 3);
    letter-spacing: 0.1em;
    font-weight: 700;
}

.theme-name {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin-bottom: calc(var(--space-unit) * 2);
}

.theme-latin {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: calc(var(--space-unit) * 4);
    font-size: 1rem;
    font-family: Georgia, 'Times New Roman', serif;
}

.theme-desc {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.theme-tags {
    margin-top: calc(var(--space-unit) * 4);
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space-unit));
}

/* Event Flow Timeline */
.timeline {
    position: relative;
    padding-left: calc(var(--space-unit) * 7);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: calc(var(--space-unit) * 8);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--space-unit) * -7);
    top: calc(var(--space-unit) * 0.5);
    width: calc(var(--space-unit) * 2);
    height: calc(var(--space-unit) * 2);
    background: var(--color-bg);
    border: 2px solid var(--color-text);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.timeline-item.active::before {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.timeline-phase {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-accent);
    margin-bottom: calc(var(--space-unit));
    font-weight: 700;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: calc(var(--space-unit) * 2);
}

/* Judging Criteria Table */
.criteria-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid var(--color-text);
}

.criteria-table th {
    text-align: left;
    padding: calc(var(--space-unit) * 3) 0;
    border-bottom: 1px solid var(--color-border);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    color: var(--color-text-muted);
}

.criteria-table td {
    padding: calc(var(--space-unit) * 4) 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.criteria-table tr {
    transition: background 0.3s ease;
}

.criteria-table tr:hover {
    background: var(--color-paper);
}

.criteria-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    width: 32%;
    letter-spacing: -0.01em;
}

.criteria-table tr:hover .criteria-name {
    color: var(--color-accent);
}

.criteria-desc {
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
}

/* Footer */
.footer {
    border-top: 2px solid var(--color-text);
    padding: calc(var(--space-unit) * 10) 0 calc(var(--space-unit) * 6);
    background: var(--color-ink);
    color: var(--color-text);
}

.footer .grid-container {
    color: var(--color-text);
}

.footer-col h4 {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--space-unit) * 3);
}

.footer-col a {
    display: block;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: calc(var(--space-unit));
    transition: color 0.2s, transform 0.2s ease;
}

.footer-col a:hover {
    color: var(--color-text);
    transform: translateX(4px);
}

.footer-statement {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: calc(var(--space-unit) * 4);
    color: var(--color-text);
}

.footer-col .t-caption {
    color: var(--color-text-muted);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.story-lead,
.blockquote,
.manifesto-list,
.theme-grid,
.timeline,
.criteria-table,
.team-grid,
.partners-grid,
#closing .grid-container {
    translate: var(--story-parallax-x, 0) var(--story-parallax-y, 0);
    will-change: translate, transform;
}

/* Section Color Transitions */
.section-transition {
    position: relative;
}

.section-transition::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-transition.in-view::before {
    opacity: 0;
}

/* Chapter 02 unified styling */
.story-interlude-label {
    font-weight: 700;
    color: var(--color-accent);
    white-space: nowrap;
}

.story-interlude-text {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

#philosophy .section-header {
    border-bottom-color: var(--color-accent);
}

#philosophy .section-number {
    color: var(--color-accent);
}

/* Blockquote — Swiss Style */
.blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: calc(var(--space-unit) * 4);
    margin: calc(var(--space-unit) * 6) 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    max-width: 50ch;
    color: var(--color-text);
}

/* Manifesto List */
.manifesto-list {
    list-style: none;
    border-top: 2px solid var(--color-text);
}

.manifesto-list li {
    padding: calc(var(--space-unit) * 3) 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: calc(var(--space-unit) * 4);
    transition: padding-left 0.3s ease;
}

.manifesto-list li:hover {
    padding-left: calc(var(--space-unit) * 2);
}

.manifesto-list li span:first-child {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.manifesto-list li span:last-child {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--color-border);
    width: 100%;
}

.divider-thick {
    height: 2px;
    background: var(--color-text);
}

/* Accent Line */
.accent-line {
    width: 72px;
    height: 5px;
    background: var(--color-accent);
    display: block;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--color-text-secondary);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-card:hover .tag {
    border-color: var(--card-accent);
    color: var(--card-accent);
}

.tag-active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* Partners Section */
.partners {
    padding: calc(var(--space-unit) * 8) 0;
}

.partners-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: calc(var(--space-unit) * 2);
    margin-bottom: calc(var(--space-unit) * 6);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #1b1a18;
    border: 1px solid var(--color-border);
}

.partners-grid-full {
    grid-column: 1 / -1;
}

.partner-card {
    background: #0c0c0c;
    padding: calc(var(--space-unit) * 6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.3s ease;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.partner-card:hover {
    background: #141311;
}

.partner-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: calc(var(--space-unit) * 2);
}

.partner-type {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: calc(var(--space-unit));
}

@media (max-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Partner Logo */
.partner-logo {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Partner Placeholder */
.partner-placeholder {
    border: 1px dashed var(--color-border);
    background: transparent;
}

.partner-placeholder:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
}

.partner-placeholder-icon {
    font-size: 2rem;
    color: var(--color-text-muted);
    line-height: 1;
    margin-bottom: calc(var(--space-unit) * 2);
    transition: color 0.3s ease;
}

.partner-placeholder:hover .partner-placeholder-icon {
    color: var(--color-text);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
    padding: 3px;
    border-radius: 999px;
    width: 46px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--color-text);
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 18px;
    display: block;
}

.theme-toggle-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease;
}

:root[data-theme='dark'] .theme-toggle-thumb {
    transform: translateX(22px);
}

/* Storyline Rail — fixed chapter progress on the left edge */
.story-rail {
    position: fixed;
    top: 50%;
    left: calc(var(--space-unit) * 3);
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    align-items: center;
    gap: calc(var(--space-unit) * 2);
    pointer-events: none;
    opacity: var(--story-rail-opacity, 0.58);
}

.story-rail-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: calc(var(--space-unit) * 2);
}

.story-chapters {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: calc(var(--space-unit) * 3);
    padding: 0;
    margin: 0;
}

.story-chapters li {
    display: flex;
    align-items: center;
    gap: calc(var(--space-unit) * 2);
    opacity: 0.35;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-chapters li.active {
    opacity: 1;
    transform: translateX(8px);
}

.story-chapters li.complete {
    opacity: 0.55;
}

.story-chapters li span:first-child {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    min-width: 24px;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.story-chapters li.active span:first-child {
    color: var(--color-accent);
    text-shadow: 0 0 20px rgba(255, 59, 48, 0.48);
}

.story-chapter-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-secondary);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.42s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.story-chapters li.active .story-chapter-label {
    color: var(--color-text);
    clip-path: inset(0 0 0 0);
}

.story-progress {
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, var(--color-accent), rgba(255, 59, 48, 0.2));
    transition: height 0.1s linear;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    box-shadow: 0 0 24px rgba(255, 59, 48, 0.38);
}

/* Story Prologue */
.story-prologue {
    background: var(--color-bg);
}

.story-lead {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 3.4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text);
    max-width: 24ch;
}

/* Cinematic Story Mode */
body.story-ready {
    background:
        linear-gradient(180deg, #000 0%, #090806 45%, #000 100%);
}

.story-section {
    --section-progress: 0;
    --section-focus: 0;
    --section-depth: 0;
    --section-drift-y: 0px;
    --section-grid-x: 0px;
    --section-grid-y: 0px;
    --section-settle-y: 0px;
    --section-scale: 1;
    --section-glow-opacity: 0.18;
    --section-grid-opacity: 0.04;
    --section-saturation: 1;
    --section-accent-alpha: 0;
    --section-radial-x: 16%;
    --section-timeline-height: 0%;
    --section-line-width: 96px;
    min-height: auto;
    isolation: isolate;
}

.story-section.py-lg {
    padding-top: calc(var(--space-unit) * 10);
    padding-bottom: calc(var(--space-unit) * 10);
}

.story-section.py-xl {
    padding-top: calc(var(--space-unit) * 12);
    padding-bottom: calc(var(--space-unit) * 12);
}

.story-section::before {
    content: '';
    position: absolute;
    inset: -1px 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 59, 48, var(--section-accent-alpha)) 0%, transparent 28%),
        radial-gradient(90% 68% at var(--section-radial-x) 18%, rgba(255, 59, 48, 0.16), transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 24%, transparent 72%, rgba(255, 255, 255, 0.035));
    opacity: var(--section-glow-opacity);
    transform: translate3d(0, var(--section-drift-y), 0);
    transition: opacity 0.45s ease;
}

.story-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 72%, transparent);
    opacity: var(--section-grid-opacity);
    transform: translate3d(var(--section-grid-x), var(--section-grid-y), 0);
}

.story-section>.grid-container,
.story-section>.theme-grid {
    transform: translate3d(0, var(--section-settle-y), 0) scale(var(--section-scale));
    transition: transform 0.5s ease;
}

.story-section.story-active .section-header::after {
    width: var(--section-line-width);
    opacity: 1;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    opacity: 0;
    transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.story-ready .section-header,
.story-ready .story-lead,
.story-ready .blockquote,
.story-ready .manifesto-list,
.story-ready .timeline,
.story-ready .criteria-table,
.story-ready .team-grid,
.story-ready .partners-grid,
.story-ready #closing .grid-container {
    filter: saturate(var(--section-saturation, 1));
}

.story-ready .story-lead {
    text-shadow: 0 18px 80px rgba(255, 59, 48, 0.14);
}

.story-ready .story-lead::first-letter {
    color: var(--color-accent);
}

.story-ready .manifesto-list li,
.story-ready .timeline-item,
.story-ready .criteria-table tr,
.story-ready .theme-card,
.story-ready .team-card,
.story-ready .partner-card {
    transition:
        transform 0.58s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.58s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        padding-left 0.3s ease;
}

.story-ready .story-active .manifesto-list li,
.story-ready .story-active .timeline-item,
.story-ready .story-active .criteria-table tr,
.story-ready .story-active .theme-card,
.story-ready .story-active .team-card,
.story-ready .story-active .partner-card {
    animation: story-stagger-rise 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.story-ready .manifesto-list li:nth-child(2),
.story-ready .timeline-item:nth-child(2),
.story-ready .criteria-table tr:nth-child(2),
.story-ready .theme-card:nth-child(2),
.story-ready .team-card:nth-child(2),
.story-ready .partner-card:nth-child(2) {
    animation-delay: 0.06s;
}

.story-ready .manifesto-list li:nth-child(3),
.story-ready .timeline-item:nth-child(3),
.story-ready .criteria-table tr:nth-child(3),
.story-ready .theme-card:nth-child(3),
.story-ready .partner-card:nth-child(3) {
    animation-delay: 0.12s;
}

.story-ready .manifesto-list li:nth-child(4),
.story-ready .timeline-item:nth-child(4),
.story-ready .criteria-table tr:nth-child(4),
.story-ready .theme-card:nth-child(4),
.story-ready .partner-card:nth-child(4) {
    animation-delay: 0.18s;
}

.story-ready .manifesto-list li:nth-child(5),
.story-ready .timeline-item:nth-child(5),
.story-ready .criteria-table tr:nth-child(5),
.story-ready .theme-card:nth-child(5) {
    animation-delay: 0.24s;
}

.story-ready .manifesto-list li:nth-child(6),
.story-ready .criteria-table tr:nth-child(6),
.story-ready .theme-card:nth-child(6) {
    animation-delay: 0.3s;
}

.story-ready .manifesto-list li:nth-child(7),
.story-ready .criteria-table tr:nth-child(7),
.story-ready .theme-card:nth-child(7) {
    animation-delay: 0.36s;
}

.story-ready .manifesto-list li:nth-child(8),
.story-ready .criteria-table tr:nth-child(8),
.story-ready .theme-card:nth-child(8) {
    animation-delay: 0.42s;
}

@keyframes story-stagger-rise {
    from {
        opacity: 0.2;
        transform: translate3d(0, 28px, 0) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.story-ready .timeline::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: var(--section-timeline-height, 0%);
    background: linear-gradient(180deg, var(--color-accent), transparent);
    transform: translateX(-50%);
    box-shadow: 0 0 24px rgba(255, 59, 48, 0.42);
}

.story-ready .timeline-item.active::before,
.story-ready .timeline-item:hover::before {
    box-shadow: 0 0 0 8px rgba(255, 59, 48, 0.1), 0 0 24px rgba(255, 59, 48, 0.32);
}

.story-ready .theme-card::after,
.story-ready .team-card::after,
.story-ready .partner-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 42%, transparent 70%);
    opacity: 0;
    transform: translateX(-120%);
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.story-ready .story-active .theme-card:hover::after,
.story-ready .story-active .team-card:hover::after,
.story-ready .story-active .partner-card:hover::after {
    opacity: 1;
    transform: translateX(120%);
}

.story-ready .criteria-table tbody tr:hover td {
    padding-left: calc(var(--space-unit) * 2);
}

.story-ready .section-transition.in-view {
    animation: chapter-breathe 3.8s ease-in-out infinite alternate;
}

@keyframes chapter-breathe {
    from {
        box-shadow: inset 0 0 0 rgba(255, 59, 48, 0);
    }

    to {
        box-shadow: inset 0 42px 90px rgba(255, 59, 48, 0.035);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-img,
    .hero-particles,
    .story-ready .section-transition.in-view,
    .story-ready .story-active .manifesto-list li,
    .story-ready .story-active .timeline-item,
    .story-ready .story-active .criteria-table tr,
    .story-ready .story-active .theme-card,
    .story-ready .story-active .team-card,
    .story-ready .story-active .partner-card {
        animation: none;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .story-chapters li,
    .story-chapter-label,
    .story-section>.grid-container,
    .story-section>.theme-grid,
    .section-header::after {
        transition-duration: 0.01ms;
    }

    .story-lead,
    .blockquote,
    .manifesto-list,
    .theme-grid,
    .timeline,
    .criteria-table,
    .team-grid,
    .partners-grid,
    #closing .grid-container {
        translate: 0 0;
    }

    .story-section>.grid-container,
    .story-section>.theme-grid {
        transform: none;
    }
}

/* Section Color Transitions */
.section-transition {
    position: relative;
}

.section-transition::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-transition.in-view::before {
    opacity: 0;
}

/* Chapter 02 unified styling */
#philosophy .section-header {
    border-bottom-color: var(--color-accent);
}

#philosophy .section-number {
    color: var(--color-accent);
}

/* Chapter header refinement (shared) */
.section-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* Team Section */
.team-headline {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.95;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #1b1a18;
    border: 1px solid var(--color-border);
}

.team-grid-full {
    grid-column: 1 / -1;
}

.team-card {
    background: #0c0c0c;
    padding: calc(var(--space-unit) * 8);
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 340px;
    transition: background 0.3s ease;
    overflow: hidden;
}

.team-card-wide {
    grid-column: span 2;
    background: #0c0c0c;
}

.team-card:hover {
    background: #141311;
}

.team-card-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--space-unit) * 4);
}

.team-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.team-logo {
    max-height: 56px;
    max-width: 160px;
    object-fit: contain;
    align-self: flex-start;
    margin-bottom: calc(var(--space-unit) * 4);
    filter: grayscale(20%);
}

.team-name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: calc(var(--space-unit) * 2);
}

.team-role {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent);
    margin-bottom: calc(var(--space-unit) * 3);
}

.team-desc {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 52ch;
}

.team-card-tag {
    position: absolute;
    top: calc(var(--space-unit) * 8);
    right: calc(var(--space-unit) * 8);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.18em;
    border: 1px solid var(--color-border);
    padding: calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 2);
    color: var(--color-text-muted);
}

.team-card-cta .team-name {
    text-transform: none;
}

.team-cta-link {
    margin-top: calc(var(--space-unit) * 3);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent);
    align-self: flex-start;
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.team-cta-link:hover {
    opacity: 0.7;
}

/* Supporting Partners CTA */
.partners-cta {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: calc(var(--space-unit) * 1);
    transition: color 0.2s ease;
}

.partners-cta:hover {
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .story-rail {
        display: none;
    }

    .hero-title {
        font-size: clamp(4rem, 26vw, 11rem);
    }

    .hero-actions {
        gap: calc(var(--space-unit) * 3);
    }

    .team-card {
        padding: calc(var(--space-unit) * 5);
    }

    .team-card-tag {
        right: calc(var(--space-unit) * 5);
        top: calc(var(--space-unit) * 5);
    }
}

@media (min-width: 769px) and (max-width: 1320px) {
    .story-rail {
        left: calc(var(--space-unit) * 1.5);
    }

    .story-chapter-label {
        display: none;
    }

    .story-chapters li.active {
        transform: translateX(4px);
    }
}

/* Desktop Enhancements */
@media (min-width: 1440px) {
    .theme-card {
        padding: calc(var(--space-unit) * 8);
    }

    .partner-card {
        padding: calc(var(--space-unit) * 8);
        min-height: 200px;
    }

    .team-card {
        padding: calc(var(--space-unit) * 10);
    }
}
