/* ======================================================
   undo.systems - Memphis Undo Machine
   Palette: #FFF5E8 (Rich Cream), #5A0A20 (Deep Burgundy),
            #4A0A18 (Burgundy Text), #FFF0E0 (Cream Text),
            #D07080 (Warm Rose), #F0D040 (Memphis Yellow)
   Fonts: EB Garamond (display), Karla (body)
   ====================================================== */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    color: #4A0A18;
    background-color: #FFF5E8;
    overflow-x: hidden;
}

/* === SECTIONS: FULL-BLEED LAYOUT === */
.section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section--burgundy {
    background-color: #5A0A20;
    color: #FFF0E0;
}

.section--cream {
    background-color: #FFF5E8;
    color: #4A0A18;
}

.section--closing {
    min-height: 60vh;
}

/* === MEMPHIS PATTERNS === */
.memphis-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.memphis-svg {
    width: 100%;
    height: 100%;
}

/* === BOTANICAL ILLUSTRATIONS === */
.botanical {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.botanical--hero {
    bottom: 0;
    right: 5%;
    width: 180px;
    height: 270px;
}

.botanical--section2 {
    top: 10%;
    left: 3%;
    width: 140px;
    height: 180px;
}

.botanical--closing {
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    width: 160px;
    height: 140px;
}

.botanical-svg {
    width: 100%;
    height: 100%;
}

/* === WAVE-FORM DIVIDERS === */
.wave-divider {
    width: 100vw;
    height: 60px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wave-divider--cream-bg {
    background-color: #FFF5E8;
}

.wave-divider--burgundy-bg {
    background-color: #5A0A20;
}

/* === HERO SECTION === */
#hero {
    min-height: 100vh;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 700;
    color: #FFF0E0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Karla', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 400;
    color: #D07080;
    text-transform: lowercase;
    letter-spacing: 0.2em;
}

/* === UNDO ARROW ANIMATION (Lottie-style) === */
.undo-arrow-container {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
}

.undo-arrow-container--closing {
    position: absolute;
    bottom: 15%;
    left: 10%;
    width: 70px;
    height: 70px;
    opacity: 0.3;
}

.undo-arrow {
    width: 100%;
    height: 100%;
}

.undo-arrow-path {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawUndoArrow 4s ease-in-out infinite;
}

.undo-arrow-head {
    opacity: 0;
    animation: showArrowHead 4s ease-in-out infinite;
}

.undo-arrow-path--closing {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawUndoArrow 6s ease-in-out infinite;
}

.undo-arrow-head--closing {
    opacity: 0;
    animation: showArrowHead 6s ease-in-out infinite;
}

/* Draw arrow, hold, reverse, hold -- Lottie-style multi-step */
@keyframes drawUndoArrow {
    0% {
        stroke-dashoffset: 220;
    }
    25% {
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dashoffset: 0;
    }
    75% {
        stroke-dashoffset: 220;
    }
    100% {
        stroke-dashoffset: 220;
    }
}

@keyframes showArrowHead {
    0% { opacity: 0; }
    20% { opacity: 0; }
    25% { opacity: 1; }
    50% { opacity: 1; }
    55% { opacity: 1; }
    75% { opacity: 0; }
    100% { opacity: 0; }
}

/* === GEOMETRIC ASSEMBLY/DISASSEMBLY ANIMATION === */
.geometric-anim {
    position: absolute;
    top: 10%;
    right: 8%;
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 1;
}

.geometric-anim-svg {
    width: 100%;
    height: 100%;
}

.geo-rect {
    animation: geoAssemble 5s ease-in-out infinite;
    transform-origin: center;
}

.geo-circle {
    animation: geoAssemble 5s ease-in-out infinite 0.3s;
    transform-origin: center;
}

.geo-triangle {
    animation: geoAssemble 5s ease-in-out infinite 0.6s;
    transform-origin: center;
}

@keyframes geoAssemble {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: scale(1) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: scale(1) rotate(90deg);
        opacity: 0.6;
    }
    70% {
        transform: scale(1) rotate(180deg);
        opacity: 0.6;
    }
    85% {
        transform: scale(0.5) rotate(270deg);
        opacity: 0.3;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* === SECTION CONTENT === */
.section-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-content--closing {
    text-align: center;
    padding: 3rem 2rem;
}

.section-heading {
    font-family: 'EB Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: #4A0A18;
    margin-bottom: 2rem;
    line-height: 1.15;
}

.section-heading--light {
    color: #FFF0E0;
}

.section-text {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    color: #4A0A18;
    margin-bottom: 1.5rem;
}

.section-text--light {
    color: #FFF0E0;
    opacity: 0.92;
}

.section-text em {
    font-style: italic;
    color: #D07080;
}

.section-text--light em {
    color: #D07080;
}

/* === CLOSING SECTION === */
.closing-title {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #4A0A18;
    letter-spacing: -0.01em;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .botanical--hero {
        width: 120px;
        height: 180px;
        right: 2%;
    }

    .botanical--section2 {
        width: 100px;
        height: 130px;
        left: 1%;
        top: 5%;
    }

    .botanical--closing {
        width: 100px;
        height: 85px;
        right: 3%;
    }

    .geometric-anim {
        width: 100px;
        height: 100px;
        top: 5%;
        right: 3%;
    }

    .undo-arrow-container {
        width: 75px;
        height: 75px;
    }

    .undo-arrow-container--closing {
        width: 50px;
        height: 50px;
    }

    .section-content {
        padding: 3rem 1.5rem;
    }

    .section--closing {
        min-height: 50vh;
    }
}

@media (max-width: 480px) {
    .botanical--hero,
    .botanical--section2,
    .botanical--closing {
        opacity: 0.5;
    }

    .geometric-anim {
        opacity: 0.5;
        width: 80px;
        height: 80px;
    }

    .section-content {
        padding: 2.5rem 1.2rem;
    }
}
