/* recycle.digital styles */

:root {
    --dark-brown: #3A3228;
    --light-cream: #F2EBE0;
    --medium-brown: #5C4E40;
    --accent-gold: #D4944A;
    --gray-warm: #9A8E80;
    --stone: #B4886A;
    --sage: #6B7A5A;
    --taupe: #8A7B6A;
    --cream: #E8DCC8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-brown);
    color: var(--medium-brown);
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* Lantern cursor */
.lantern {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 148, 74, 0.4) 0%, rgba(212, 148, 74, 0.1) 70%, transparent 100%);
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: screen;
    display: none;
}

body.cursor-active .lantern {
    display: block;
}

/* Entry line animation */
.entry-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 500;
    pointer-events: none;
}

#animated-line {
    stroke-linecap: round;
    animation: lineDrawAnim 700ms ease-out forwards;
}

@keyframes lineDrawAnim {
    from {
        x2: 0;
    }
    to {
        x2: 1000;
    }
}

/* Section structure */
.section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20vh 2rem;
    position: relative;
}

.section-content {
    max-width: 680px;
    width: 100%;
    text-align: center;
}

/* Section backgrounds */
.section-void {
    background-color: var(--dark-brown);
}

.section-collage {
    background-color: var(--light-cream);
    color: var(--dark-brown);
}

.section-mountains {
    background-color: var(--cream);
    color: var(--dark-brown);
}

.section-pixels {
    background-color: var(--light-cream);
    color: var(--dark-brown);
}

.section-abyss {
    background-color: var(--dark-brown);
    color: var(--light-cream);
}

.section-glitch {
    background-color: var(--medium-brown);
    color: var(--accent-gold);
}

.section-closing {
    background-color: var(--dark-brown);
    color: var(--light-cream);
}

/* Typography */
.heading {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--dark-brown);
    margin-bottom: 1.5rem;
    text-transform: lowercase;
}

.section-void .heading,
.section-abyss .heading,
.section-closing .heading {
    color: var(--light-cream);
}

.section-glitch .heading {
    color: var(--accent-gold);
}

.heading-void {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.05em;
}

.subheading {
    font-family: 'Source Serif 4', serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
    color: var(--gray-warm);
    opacity: 0.9;
}

.caption {
    font-size: 0.95rem;
    color: var(--gray-warm);
    margin-top: 2rem;
    font-style: italic;
}

/* Void indicators */
.void-indicator {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-top: 2rem;
    animation: breathe 4s ease-in-out infinite;
}

.void-symbol {
    font-size: 3rem;
    color: var(--accent-gold);
    margin: 2rem 0;
    animation: spin 8s linear infinite;
}

.closing-symbol {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-top: 1.5rem;
    animation: rotate 6s linear infinite;
}

@keyframes breathe {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

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

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

/* Collage pieces */
.collage-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    perspective: 1000px;
}

.collage-piece {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--cream) 0%, var(--taupe) 100%);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    transform-style: preserve-3d;
    animation: floatPiece 6s ease-in-out infinite;
}

.collage-piece::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(58, 50, 40, 0.1) 2px,
        rgba(58, 50, 40, 0.1) 4px
    );
}

.piece-1 {
    animation-delay: 0s;
}

.piece-2 {
    animation-delay: 0.5s;
}

.piece-3 {
    animation-delay: 1s;
}

.piece-4 {
    animation-delay: 1.5s;
}

@keyframes floatPiece {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
    }
    50% {
        transform: translateY(-10px) rotateX(5deg);
    }
}

/* Mountain landscape */
.mountain-landscape {
    position: relative;
    height: 300px;
    margin: 2rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mountain {
    position: absolute;
    bottom: 0;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.mountain-1 {
    width: 200px;
    height: 150px;
    background: linear-gradient(180deg, var(--sage) 0%, var(--taupe) 100%);
    left: 5%;
    animation: sway 6s ease-in-out infinite;
}

.mountain-2 {
    width: 250px;
    height: 200px;
    background: linear-gradient(180deg, var(--gray-warm) 0%, var(--stone) 100%);
    left: 30%;
    animation: sway 8s ease-in-out infinite reverse;
    animation-delay: 1s;
}

.mountain-3 {
    width: 200px;
    height: 120px;
    background: linear-gradient(180deg, var(--taupe) 0%, var(--medium-brown) 100%);
    right: 5%;
    animation: sway 7s ease-in-out infinite;
    animation-delay: 0.5s;
}

.mountain-lines {
    position: absolute;
    width: 100%;
    height: 100%;
}

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

/* Pixel grid */
.pixel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pixel {
    aspect-ratio: 1;
    background: var(--medium-brown);
    border: 2px solid var(--dark-brown);
    position: relative;
    overflow: hidden;
}

.pixel-1, .pixel-2, .pixel-3 {
    width: 40px;
    height: 40px;
}

.pixel-4, .pixel-5, .pixel-6 {
    width: 50px;
    height: 20px;
}

.pixel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: glitch 3s ease-in-out infinite;
}

.pixel-1::after {
    animation-delay: 0s;
}

.pixel-2::after {
    animation-delay: 0.5s;
}

.pixel-3::after {
    animation-delay: 1s;
}

.pixel-4::after {
    animation-delay: 1.5s;
}

.pixel-5::after {
    animation-delay: 2s;
}

.pixel-6::after {
    animation-delay: 2.5s;
}

@keyframes glitch {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

/* Abyss section */
.abyss-text {
    margin: 3rem 0;
}

.abyss-text p {
    font-size: 1.3rem;
    margin: 1.5rem 0;
    color: var(--light-cream);
    letter-spacing: 0.03em;
    animation: fadeIn 2s ease-out;
}

.abyss-text p:nth-child(1) {
    animation-delay: 0s;
}

.abyss-text p:nth-child(2) {
    animation-delay: 0.5s;
}

.abyss-text p:nth-child(3) {
    animation-delay: 1s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glitch box */
.glitch-box {
    margin: 3rem 0;
    padding: 2rem;
    border: 2px solid var(--accent-gold);
    position: relative;
}

.glitch-box::before,
.glitch-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border: inherit;
    z-index: -1;
}

.glitch-box::before {
    animation: glitchShift 0.3s ease-in-out infinite alternate;
    transform: translate(-3px, -3px);
}

.glitch-box::after {
    animation: glitchShift 0.3s ease-in-out infinite alternate reverse;
    transform: translate(3px, 3px);
}

@keyframes glitchShift {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
}

.glitch-text {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    text-shadow: 2px 2px 0 rgba(212, 148, 74, 0.3);
}

.glitch-text::before {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 2px;
    z-index: -1;
    color: var(--accent-gold);
    opacity: 0.5;
}

.glitch-subtext {
    font-size: 0.9rem;
    color: var(--light-cream);
    margin-top: 1rem;
    opacity: 0.8;
}

/* Closing text */
.closing-text {
    font-size: 1.3rem;
    color: var(--light-cream);
    letter-spacing: 0.02em;
    margin: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .collage-container {
        grid-template-columns: 1fr;
    }

    .pixel-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 15vh 1.5rem;
    }

    .heading {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }
}
