/* paraligm.com - Pixel Art Zen Paradigm */

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

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

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #5A4A3A;
    background: #FFF8F0;
    image-rendering: pixelated;
}

/* Paradigm Sections - Stacked 100vh */
.paradigm-section {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

#section-origin {
    background: #FFF8F0;
}

#section-shift {
    background: #FFF0F0;
}

#section-transform {
    background: #F0F8F0;
}

#section-converge {
    background: #F8F0FF;
}

#section-transcend {
    background: #FFF8F0;
}

/* Section Content */
.section-content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding-left: 96px;
    max-width: 800px;
    width: 100%;
}

/* Title Styles */
.site-title {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #3A3028;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.section-title {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #3A3028;
    margin-bottom: 8px;
}

.pixel-label {
    font-family: 'Press Start 2P', cursive;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8A7A68;
    margin-bottom: 32px;
}

/* Pixel Art Dioramas */
.diorama {
    margin-top: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.diorama.visible {
    opacity: 1;
    transform: translateY(0);
}

.pixel-art-svg {
    width: 256px;
    height: 192px;
    display: block;
    image-rendering: pixelated;
}

/* Pixel Row Reveal Animation */
.diorama.pixel-reveal .pixel-art-svg rect {
    opacity: 0;
    animation: pixelRowReveal 1.5s steps(12) forwards;
}

.diorama.pixel-reveal .pixel-art-svg rect:nth-child(1) { animation-delay: 0s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(2) { animation-delay: 0.06s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(3) { animation-delay: 0.12s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(4) { animation-delay: 0.18s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(5) { animation-delay: 0.24s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(6) { animation-delay: 0.3s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(7) { animation-delay: 0.36s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(8) { animation-delay: 0.42s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(9) { animation-delay: 0.48s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(10) { animation-delay: 0.54s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(11) { animation-delay: 0.6s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(12) { animation-delay: 0.66s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(13) { animation-delay: 0.72s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(14) { animation-delay: 0.78s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(15) { animation-delay: 0.84s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(16) { animation-delay: 0.9s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(17) { animation-delay: 0.96s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(18) { animation-delay: 1.02s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(19) { animation-delay: 1.08s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(20) { animation-delay: 1.14s; }
.diorama.pixel-reveal .pixel-art-svg rect:nth-child(n+21) { animation-delay: 1.2s; }

@keyframes pixelRowReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Lens Flare Effects */
.lens-flare-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.lens-flare-container.active {
    opacity: 1;
}

.pixel-bokeh {
    position: absolute;
    image-rendering: pixelated;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    opacity: 0.6;
}

.pixel-streak {
    position: absolute;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        #FFF0F0 20%,
        #F8F0FF 40%,
        #C89868 60%,
        #FFF8F0 80%,
        transparent
    );
    opacity: 0.5;
}

.pixel-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,248,240,0.15) 0%, transparent 70%);
}

/* Pixel Curve Decorations */
.pixel-curve-decoration {
    margin-top: 32px;
    opacity: 0.5;
}

.pixel-curve-decoration svg {
    width: 320px;
    height: 48px;
    image-rendering: pixelated;
}

/* Falling Leaf Animation */
.falling-leaf {
    animation: leafFall 3s ease-in-out infinite;
}

.falling-leaf:nth-child(odd) {
    animation-delay: 0.5s;
    animation-duration: 3.5s;
}

.falling-leaf:nth-child(even) {
    animation-delay: 1.2s;
    animation-duration: 4s;
}

@keyframes leafFall {
    0% { transform: translate(0, 0); opacity: 1; }
    50% { transform: translate(8px, 16px); opacity: 0.7; }
    100% { transform: translate(-4px, 32px); opacity: 0; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 96px;
    z-index: 3;
    text-align: center;
    animation: scrollPulse 2s ease-in-out infinite;
}

.pixel-arrow {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #8A7A68;
    margin-top: 8px;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(8px); }
}

/* Elastic Bounce Animation */
.elastic-bounce {
    animation: elasticBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes elasticBounce {
    0% { transform: scale(0.3) translateY(40px); opacity: 0; }
    50% { transform: scale(1.05) translateY(-8px); opacity: 1; }
    70% { transform: scale(0.95) translateY(4px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Section Transitions */
.section-content .site-title,
.section-content .section-title,
.section-content .pixel-label {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.paradigm-section.in-view .section-content .site-title,
.paradigm-section.in-view .section-content .section-title {
    opacity: 1;
    transform: translateY(0);
}

.paradigm-section.in-view .section-content .pixel-label {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.paradigm-section.in-view .diorama {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.paradigm-section.in-view .lens-flare-container {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-content {
        padding-left: 32px;
        padding-right: 16px;
    }

    .scroll-indicator {
        left: 50%;
        transform: translateX(-50%);
    }

    .pixel-art-svg {
        width: 200px;
        height: 150px;
    }

    .pixel-curve-decoration svg {
        width: 240px;
        height: 36px;
    }
}
