:root {
    --midnight-walnut: #1e1a2e;
    --aged-linen: #f3ece0;
    --antique-brass: #c9a56e;
    --tarnished-teal: #4a7c7e;
    --venetian-rose: #c45b5b;
    --faded-violet: #7b6b8a;
    --warm-graphite: #3d3649;
}

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

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

.scroll-container {
    position: relative;
}

/* Panels */
.panel {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.panel--dark {
    background-color: var(--midnight-walnut);
    color: var(--aged-linen);
}

.panel--light {
    background-color: var(--aged-linen);
    color: var(--warm-graphite);
}

/* Diagonal clip-paths */
.panel--odd {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3vw), 0 100%);
}

.panel--even {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 3vw));
}

/* Section numbers */
.section-number {
    position: absolute;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 20vw;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.panel--dark .section-number {
    color: var(--aged-linen);
    opacity: 0.08;
}

.panel--light .section-number {
    color: var(--midnight-walnut);
    opacity: 0.06;
}

/* Content positioning */
.panel__content {
    position: relative;
    z-index: 2;
    padding: 4rem;
    max-width: 60%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.panel__content--left {
    margin-left: 8vw;
    margin-right: auto;
}

.panel__content--right {
    margin-left: auto;
    margin-right: 8vw;
    text-align: right;
}

.panel__content--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 70%;
}

/* Headlines */
.headline {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.headline--italic {
    font-style: italic;
}

.headline--verdict {
    font-size: clamp(2rem, 5vw, 4.5rem);
}

/* Body text */
.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    max-width: 38ch;
}

.body-text--centered {
    margin-left: auto;
    margin-right: auto;
}

/* Vintage rule */
.vintage-rule {
    margin: 1.5rem 0;
}

.panel__content--right .vintage-rule {
    display: flex;
    justify-content: flex-end;
}

.panel__content--center .vintage-rule {
    display: flex;
    justify-content: center;
}

/* Sunburst */
.sunburst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
}

.sunburst-svg {
    animation: sunburst-rotate 120s linear infinite;
}

@keyframes sunburst-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Double helix ribbons */
.helix {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60px;
    z-index: 1;
    pointer-events: none;
}

.helix--left {
    left: 2vw;
}

.helix--right {
    right: 2vw;
}

.helix-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-in-out;
}

.panel.active .helix-path {
    stroke-dashoffset: 0;
}

/* Rosettes */
.rosette {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.rosette--top-right {
    top: 3rem;
    right: 3rem;
}

.rosette--bottom-center {
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
}

/* Exhibit cards */
.exhibit-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.exhibit-card {
    border: 1px solid var(--antique-brass);
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(30, 26, 46, 0.3);
    background: rgba(30, 26, 46, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.exhibit-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.exhibit-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--antique-brass);
    margin-bottom: 0.75rem;
}

.exhibit-illustration {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 0.75rem;
}

.exhibit-caption {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--aged-linen);
    max-width: 38ch;
}

/* Merged braid */
.merged-braid {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Navigation pips */
.nav-pips {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.pip {
    background: none;
    border: none;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.2rem;
    color: var(--faded-violet);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0.25rem;
    line-height: 1;
}

.pip:hover {
    color: var(--tarnished-teal);
    transform: scale(1.3);
}

.pip--active {
    color: var(--venetian-rose);
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
    .panel__content {
        max-width: 85%;
        padding: 2rem;
    }

    .panel__content--left {
        margin-left: 5vw;
    }

    .panel__content--right {
        margin-right: 5vw;
    }

    .helix {
        display: none;
    }

    .nav-pips {
        right: 1rem;
    }

    .section-number {
        font-size: 30vw;
    }
}
