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

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

body {
    background-color: #faf6f0;
    color: #2a4a6b;
    font-family: 'Lora', serif;
    overflow-x: hidden;
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: #7ea8c4;
    z-index: 1000;
    transition: width 100ms linear;
}

.fold {
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.display-word {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3rem, 12vw, 10rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: #7ea8c4;
}

.display-word .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms cubic-bezier(0.23, 1.0, 0.32, 1.0), transform 600ms cubic-bezier(0.23, 1.0, 0.32, 1.0);
}

.display-word.animated .char {
    opacity: 1;
    transform: translateY(0);
}

.display-word .char.pulse {
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Fold 1 */
.fold-1 {
    flex-direction: column;
    gap: 3rem;
}

.fold-1 .interlocking-paths {
    width: 80%;
    height: 60px;
}

/* Fold 2 */
.fold-2 {
    display: flex;
    align-items: center;
    padding: 0 5vw;
    gap: 4vw;
}

.fold-2-left {
    flex: 0 0 58%;
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0), transform 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0);
}

.fold-2-right {
    flex: 0 0 38%;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0), transform 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0);
    transition-delay: 200ms;
}

.fold-2.in-view .fold-2-left,
.fold-2.in-view .fold-2-right {
    opacity: 1;
    transform: translateX(0);
}

.body-text {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    color: #2a4a6b;
    margin-bottom: 1.5rem;
}

.body-text em {
    font-style: italic;
    color: #d4a0a0;
}

.reaching-figures {
    width: 100%;
    max-height: 70vh;
}

/* Fold 3 */
.fold-3 {
    flex-direction: column;
    gap: 2rem;
}

.gallery-strip {
    display: flex;
    gap: 2vw;
    align-items: center;
    justify-content: center;
}

.vignette {
    width: clamp(120px, 15vw, 200px);
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0), transform 800ms cubic-bezier(0.23, 1.0, 0.32, 1.0);
    text-align: center;
    cursor: default;
}

.fold-3.in-view .vignette {
    opacity: 1;
    transform: translateX(0);
}

.vignette svg {
    width: 100%;
    transition: transform 300ms ease, stroke 300ms ease;
}

.vignette:hover svg {
    transform: scale(1.08);
}

.vignette:hover .draw-path {
    stroke: #d4a0a0;
}

.vignette-caption {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #2a4a6b;
    opacity: 0.5;
    transition: opacity 300ms ease;
    display: block;
    margin-top: 0.5rem;
}

.vignette:hover .vignette-caption {
    opacity: 1;
}

.gallery-caption {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: #7ea8c4;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease 600ms, transform 800ms ease 600ms;
}

.fold-3.in-view .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Fold 4 */
.fold-4 {
    flex-direction: column;
}

.fold-4-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fold-4 .display-word {
    font-size: clamp(4rem, 15vw, 12rem);
}

.flourish-svg {
    position: absolute;
    width: 80%;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Fold 5 */
.fold-5 {
    background-color: #1e3650;
    flex-direction: column;
    position: relative;
}

.fold-5 .response-word {
    color: #faf6f0;
    z-index: 2;
}

.radiating-paths {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    pointer-events: none;
}

/* SVG Path Styles */
.draw-path {
    fill: none;
    stroke: #3d3d3d;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.draw-path.detail {
    stroke-width: 1;
}

.draw-path.flourish {
    stroke: #9bb8d3;
    stroke-width: 1;
}

.draw-path.radiate {
    stroke: #9bb8d3;
    stroke-width: 1;
    opacity: 0.6;
}

.flowing-curve-bg {
    position: fixed;
    top: 0;
    left: 5%;
    width: 4%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.flowing-connector {
    fill: none;
    stroke: #9bb8d3;
    stroke-width: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .fold-2 {
        flex-direction: column;
        padding: 2rem;
    }
    .fold-2-left, .fold-2-right {
        flex: none;
        width: 100%;
    }
    .gallery-strip {
        flex-wrap: wrap;
    }
    .vignette {
        width: 100px;
    }
}
