:root {
    --bg: #FFFFF0;
    --text: #1A1A1A;
    --yellow: #FFE030;
    --coral: #FF6B6B;
    --teal: #4ECDC4;
    --violet: #A855F7;
    --gray: #999999;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* Footnote stack */
.footnote-stack {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    max-width: 280px;
}

.footnote {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 9px;
    line-height: 1.4;
    color: var(--gray);
    margin-bottom: 4px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.footnote.visible {
    opacity: 1;
}

/* Sections */
.section {
    position: relative;
    z-index: 2;
}

/* Mega text panels */
.section-mega {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mega-text {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(6rem, 20vw, 18rem);
    letter-spacing: -0.03em;
    color: var(--yellow);
    -webkit-text-stroke: 3px var(--text);
    text-transform: uppercase;
    line-height: 0.9;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.mega-text.visible {
    opacity: 1;
}

/* Commute section */
.section-commute {
    min-height: 160vh;
    padding: 80px 40px;
}

.chaos-grid {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.chaos-card {
    max-width: 420px;
    padding: 28px 32px;
    border: 3px solid var(--text);
    margin-bottom: 20px;
    transform: rotate(var(--rotate, 0deg));
    box-shadow: 4px 4px 0 rgba(26,26,26,0.2);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.chaos-card.sprung {
    opacity: 1;
}

.card-coral { background-color: var(--coral); color: #FFFFFF; }
.card-teal { background-color: var(--teal); color: var(--text); }
.card-violet { background-color: var(--violet); color: #FFFFFF; }

.overlap-up { margin-top: -40px; margin-left: 120px; }

.card-heading {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.card-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
}

/* Redacted text */
.redacted {
    position: relative;
    background: var(--text);
    color: var(--text);
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
}

.redacted-cover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--violet);
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.redacted:hover {
    background: transparent;
    color: inherit;
}

.redacted:hover .redacted-cover {
    opacity: 0;
}

/* Squiggly underlines */
.squiggle {
    text-decoration: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='6' viewBox='0 0 40 6'%3E%3Cpath d='M0,3 C5,0 10,6 15,3 C20,0 25,6 30,3 C35,0 40,6 40,3' stroke='%23FF6B6B' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 40px 6px;
    padding-bottom: 4px;
}

/* Gravity Failure */
.section-gravity {
    min-height: 100vh;
    padding: 60px 40px;
    position: relative;
}

.gravity-block {
    max-width: 380px;
    padding: 24px 28px;
    border: 2px solid var(--text);
    background-color: var(--bg);
    margin-bottom: 30px;
    box-shadow: 4px 4px 0 rgba(26,26,26,0.2);
}

.gravity-tilt-1 {
    transform: rotate(5deg);
    margin-left: 10vw;
}

.gravity-tilt-2 {
    transform: rotate(-8deg);
    margin-left: 35vw;
}

.gravity-upside-down {
    transform: rotate(180deg);
    margin-left: 15vw;
}

/* The Stamp */
.stamp {
    position: absolute;
    top: 40px;
    right: 60px;
    width: 120px;
    height: 120px;
    transform: rotate(12deg);
}

.stamp-circle {
    stroke-dasharray: 340;
    stroke-dashoffset: 340;
    animation: draw-stamp 1s ease 0.5s forwards;
}

@keyframes draw-stamp {
    to { stroke-dashoffset: 0; }
}

/* Peak section */
.section-peak {
    min-height: 120vh;
    padding: 80px 40px;
}

.peak-grid {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.offscreen-heading {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.03em;
    margin-left: -50%;
    margin-bottom: 30px;
    color: var(--text);
}

.peak-card {
    max-width: 360px;
    padding: 24px 28px;
    border: 3px solid var(--text);
    margin-bottom: 20px;
    box-shadow: 4px 4px 0 rgba(26,26,26,0.2);
}

.overlap-left { margin-left: 200px; margin-top: -60px; }
.overlap-right { margin-left: 80px; margin-top: -40px; }
.overlap-top { margin-left: 300px; margin-top: -80px; }

/* Resolution */
.section-resolution {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.resolution-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: var(--text);
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .chaos-card {
        max-width: 100%;
    }

    .overlap-up {
        margin-left: 20px;
        margin-top: -20px;
    }

    .gravity-tilt-1,
    .gravity-tilt-2,
    .gravity-upside-down {
        margin-left: 0;
        max-width: 100%;
    }

    .peak-card {
        max-width: 100%;
    }

    .overlap-left,
    .overlap-right,
    .overlap-top {
        margin-left: 0;
        margin-top: -20px;
    }

    .offscreen-heading {
        margin-left: -20%;
    }

    .footnote-stack {
        max-width: 200px;
        bottom: 10px;
        left: 10px;
    }

    .stamp {
        right: 20px;
        top: 20px;
        width: 80px;
        height: 80px;
    }
}
