:root {
    --color-primary-bg: #2B2D42;
    --color-secondary-bg: #EDF2F4;
    --color-primary-text: #D6D8DE;
    --color-secondary-text: #2B2D42;
    --color-accent: #EF233C;
    --color-secondary-accent: #8D99AE;
    --color-tertiary: #9B8FB4;
    --color-copper: #7D8471;
    --color-gold: #C4A35A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    background-color: var(--color-primary-bg);
    color: var(--color-primary-text);
    overflow-x: hidden;
}

/* Scroll Snap Configuration */
html {
    scroll-snap-type: y mandatory;
}

/* Frame Structure */
.frame {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    transition: background-color 0.2s ease-out;
}

.frame-dark {
    background-color: var(--color-primary-bg);
    color: var(--color-primary-text);
}

.frame-light {
    background-color: var(--color-secondary-bg);
    color: var(--color-secondary-text);
}

.frame-content {
    width: 100%;
    max-width: 1400px;
    padding: 0 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Typography System */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 0.08em;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    font-family: 'Lora', serif;
    font-weight: 400;
    line-height: 1.75;
    margin-bottom: 1.5em;
}

/* Frame 1: Entry Frame */
#frame-entry {
    height: 100vh;
}

.entry-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 2 / 7;
}

.title-monumental {
    font-family: 'Playfair Display SC', serif;
    font-size: 11.25rem;
    font-weight: 900;
    letter-spacing: 0.4em;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--color-primary-text);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.thesis-statement {
    font-size: 1.125rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Frame 2: Proposition Frame */
#frame-proposition {
    height: 100vh;
}

.proposition-content {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 32px;
    align-items: center;
    width: 100%;
}

.proposition-text {
    grid-column: 1 / 5;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.proposition-text h2 {
    margin-bottom: 1.5rem;
}

.proposition-text p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.proposition-3d {
    grid-column: 5 / 8;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    animation: fadeInScale 0.8s ease-out 0.4s both;
}

#geometric-primitive {
    animation: rotateY 20s linear infinite;
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

/* Frame 3: Evidence Frame */
#frame-evidence {
    height: 110vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.evidence-content {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.evidence-heading {
    grid-column: 3 / 7;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.evidence-band {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    height: 200px;
    background-color: var(--color-secondary-accent);
    z-index: 0;
}

.evidence-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    width: 100%;
    max-width: 1200px;
    z-index: 1;
    position: relative;
}

.evidence-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out both;
}

.evidence-card:nth-child(1) {
    animation-delay: 0.3s;
}

.evidence-card:nth-child(2) {
    animation-delay: 0.4s;
}

.evidence-card:nth-child(3) {
    animation-delay: 0.5s;
}

.evidence-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evidence-label {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

/* Frame 4: Depth Frame */
#frame-depth {
    height: 100vh;
    perspective: 1200px;
}

.depth-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.depth-panel {
    width: 80vw;
    height: 60vh;
    background-color: rgba(141, 153, 174, 0.15);
    border: 1px solid var(--color-secondary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    perspective: 1200px;
    animation: fadeInScale 0.8s ease-out 0.2s both;
}

#mechanical-diagram {
    animation: rotateY 15s linear infinite;
}

/* Frame 5: Narrative Frame */
#frame-narrative {
    height: 120vh;
}

.narrative-content {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 32px;
    align-items: flex-start;
    padding-top: 60px;
    padding-bottom: 60px;
    width: 100%;
}

.narrative-3d-element {
    grid-column: 1 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#staircase {
    animation: rotateY 25s linear infinite;
}

.narrative-text {
    grid-column: 5 / 9;
    font-size: 1rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.narrative-text p {
    margin-bottom: 1.5em;
}

/* Frame 6: Gallery Frame */
#frame-gallery {
    height: 100vh;
}

.gallery-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item {
    position: absolute;
    background-color: transparent;
    border: none;
    cursor: grab;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
}

.gallery-item-large {
    width: 45vw;
    height: 45vw;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 3;
}

.gallery-item-medium {
    width: 30vw;
    height: 30vw;
    top: 45%;
    right: 15%;
    transform: translateY(-50%);
    z-index: 2;
}

.gallery-item-small {
    width: 20vw;
    height: 20vw;
    bottom: 10%;
    right: 25%;
    z-index: 1;
}

.gallery-caption {
    margin-top: 1.5rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    margin-bottom: 0;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Frame 7: Exit Frame */
#frame-exit {
    height: 80vh;
}

.exit-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.exit-statement {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.exit-divider {
    width: 40%;
    max-width: 300px;
    height: 1px;
    background-color: var(--color-secondary-accent);
    margin-bottom: 2rem;
}

.exit-prompt {
    font-size: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Scroll Progress Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease-out;
}

.scroll-indicator:hover {
    transform: scale(1.3);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 45, 66, 0.95);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav-link {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--color-primary-text);
    text-decoration: none;
    transition: color 0.3s ease-out;
    letter-spacing: 0.08em;
}

.nav-link:hover {
    color: var(--color-accent);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateY {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Flat Design Enforcement */
* {
    box-shadow: none !important;
    border-radius: 0 !important;
}

section {
    background-image: none !important;
    background: none !important;
}

/* Utility Classes */
.no-shadow {
    box-shadow: none;
}

.no-gradient {
    background-image: none;
}

/* Palette Color Styles */
.color-copper {
    fill: var(--color-copper);
    color: var(--color-copper);
}

.color-gold {
    fill: var(--color-gold);
    color: var(--color-gold);
}

.color-tertiary {
    fill: var(--color-tertiary);
    color: var(--color-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .title-monumental {
        font-size: 6rem;
    }
    
    .proposition-content {
        grid-template-columns: 1fr;
    }
    
    .proposition-text {
        grid-column: 1;
    }
    
    .proposition-3d {
        grid-column: 1;
    }
    
    .gallery-item-large {
        width: 60vw;
        height: 60vw;
    }
    
    .gallery-item-medium {
        width: 40vw;
        height: 40vw;
    }
    
    .gallery-item-small {
        width: 25vw;
        height: 25vw;
    }
    
    .narrative-content {
        grid-template-columns: 1fr;
    }
    
    .narrative-3d-element {
        grid-column: 1;
        margin-bottom: 2rem;
    }
    
    .narrative-text {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .frame-content {
        padding: 0 24px;
    }
    
    .title-monumental {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .exit-statement {
        font-size: 2rem;
    }
    
    .depth-panel {
        width: 90vw;
        height: 50vh;
    }
    
    .evidence-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .scroll-indicator {
        width: 10px;
        height: 10px;
        bottom: 16px;
        right: 16px;
    }
}
