/* ppuzzl.com - Avant-garde Candy Nebula */
/* Palette:
   Deep Cosmic:     #18082A — headings
   Twilight Purple: #3A2050 — body text
   Candy Magenta:   #E850A0 — primary accent
   Candy Sky:       #60C8E8 — secondary accent
   Candy Lime:      #88E868 — tertiary accent
   Candy Sky Alt:   #87CEEB — aurora blend component
   Hot Pink:        #FF69B4 — aurora blend component
   Pale Green:      #98FB98 — aurora blend component
   Nebula White:    #FDFAFF — page background
   Void Space:      #F4F0F8 — content area
   Aurora Blend:    rgba(232,80,160,0.04) — shimmer overlay
*/

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: #3A2050;
    background-color: #FDFAFF;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Aurora Overlay — candy-colored northern lights
   ======================================== */
.aurora-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.aurora-band {
    position: absolute;
    width: 250%;
    height: 250%;
    top: -75%;
    left: -75%;
    opacity: 1;
}

.aurora-band-1 {
    background: linear-gradient(135deg,
        rgba(255, 105, 180, 0.04) 0%,
        rgba(135, 206, 235, 0.035) 30%,
        rgba(96, 200, 232, 0.03) 50%,
        rgba(152, 251, 152, 0.04) 75%, /* #98FB98 */
        rgba(232, 80, 160, 0.03) 100%
    );
    animation: auroraDrift1 28s ease-in-out infinite;
}

.aurora-band-2 {
    background: linear-gradient(225deg,
        rgba(136, 232, 104, 0.03) 0%,
        rgba(232, 80, 160, 0.04) 40%,
        rgba(96, 200, 232, 0.03) 70%,
        rgba(255, 105, 180, 0.03) 100%
    );
    animation: auroraDrift2 35s ease-in-out infinite;
}

.aurora-band-3 {
    background: linear-gradient(315deg,
        rgba(96, 200, 232, 0.025) 0%,
        rgba(136, 232, 104, 0.03) 35%,
        rgba(255, 105, 180, 0.025) 65%,
        rgba(135, 206, 235, 0.03) 100%
    );
    animation: auroraDrift3 42s ease-in-out infinite;
}

/* Mouse-reactive aurora spotlight */
.aurora-spotlight {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(ellipse,
        rgba(232, 80, 160, 0.03) 0%,
        rgba(96, 200, 232, 0.02) 40%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    transition: left 0.3s ease-out, top 0.3s ease-out;
}

@keyframes auroraDrift1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5%, -3%) rotate(2deg); }
    50% { transform: translate(-3%, 5%) rotate(-1deg); }
    75% { transform: translate(3%, 2%) rotate(1deg); }
}

@keyframes auroraDrift2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-4%, 3%) rotate(-2deg); }
    66% { transform: translate(3%, -4%) rotate(1.5deg); }
}

@keyframes auroraDrift3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(3%, 2%) rotate(1deg); }
    40% { transform: translate(-2%, -3%) rotate(-1.5deg); }
    60% { transform: translate(4%, -1%) rotate(2deg); }
    80% { transform: translate(-3%, 3%) rotate(-0.5deg); }
}

/* ========================================
   Nature Element SVGs — golden-ratio positioned
   ======================================== */
.nature-element {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.nature-leaf-1 {
    width: 180px;
    height: 240px;
    top: 15%;
    right: 8%;
    animation: natureFloat1 20s ease-in-out infinite;
}

.nature-crystal-1 {
    width: 120px;
    height: 220px;
    top: 45%;
    left: 5%;
    animation: natureFloat2 25s ease-in-out infinite;
}

.nature-leaf-2 {
    width: 160px;
    height: 210px;
    bottom: 20%;
    right: 12%;
    animation: natureFloat3 22s ease-in-out infinite;
}

.nature-crystal-2 {
    width: 100px;
    height: 250px;
    top: 70%;
    left: 10%;
    animation: natureFloat1 28s ease-in-out infinite reverse;
}

.nature-seed-1 {
    width: 80px;
    height: 120px;
    top: 30%;
    left: 85%;
    animation: natureFloat2 18s ease-in-out infinite;
}

.nature-crystal-3 {
    width: 110px;
    height: 195px;
    bottom: 35%;
    left: 3%;
    animation: natureFloat3 26s ease-in-out infinite reverse;
}

@keyframes natureFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes natureFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(12px) rotate(-2deg); }
}

@keyframes natureFloat3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-4deg); }
}

/* ========================================
   Parallax Layers — dimensional puzzle depth
   perspective: 1200px, bg 0.3x, mid 0.6x, fg 1x
   ======================================== */
.parallax-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 1200px;
    z-index: 0;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

.parallax-bg {
    z-index: 0;
}

.parallax-mid {
    z-index: 1;
}

/* Nebula glow orbs — background layer */
.nebula-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.nebula-glow-1 {
    width: 500px;
    height: 500px;
    top: 10%;
    left: -5%;
    background: radial-gradient(circle, rgba(232, 80, 160, 0.06) 0%, transparent 70%);
}

.nebula-glow-2 {
    width: 600px;
    height: 600px;
    top: 40%;
    right: -10%;
    background: radial-gradient(circle, rgba(96, 200, 232, 0.05) 0%, transparent 70%);
}

.nebula-glow-3 {
    width: 450px;
    height: 450px;
    bottom: 10%;
    left: 20%;
    background: radial-gradient(circle, rgba(136, 232, 104, 0.05) 0%, transparent 70%);
}

/* Floating shape particles — midground layer */
.floating-shape {
    position: absolute;
    border-radius: 50%;
}

.shape-1 {
    width: 8px;
    height: 8px;
    background: #E850A0;
    opacity: 0.12;
    top: 20%;
    left: 15%;
    animation: shapePulse 8s ease-in-out infinite;
}

.shape-2 {
    width: 6px;
    height: 6px;
    background: #60C8E8;
    opacity: 0.1;
    top: 55%;
    right: 20%;
    animation: shapePulse 10s ease-in-out infinite 2s;
}

.shape-3 {
    width: 10px;
    height: 10px;
    background: #88E868;
    opacity: 0.08;
    top: 35%;
    right: 8%;
    animation: shapePulse 12s ease-in-out infinite 4s;
}

.shape-4 {
    width: 5px;
    height: 5px;
    background: #FF69B4;
    opacity: 0.1;
    bottom: 30%;
    left: 25%;
    animation: shapePulse 9s ease-in-out infinite 1s;
}

.shape-5 {
    width: 7px;
    height: 7px;
    background: #98FB98;
    opacity: 0.09;
    bottom: 15%;
    right: 30%;
    animation: shapePulse 11s ease-in-out infinite 3s;
}

.shape-6 {
    width: 4px;
    height: 4px;
    background: #E850A0;
    opacity: 0.07;
    top: 75%;
    left: 40%;
    animation: shapePulse 14s ease-in-out infinite 5s;
}

.shape-7 {
    width: 6px;
    height: 6px;
    background: #60C8E8;
    opacity: 0.08;
    top: 12%;
    right: 40%;
    animation: shapePulse 13s ease-in-out infinite 6s;
}

@keyframes shapePulse {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.8); opacity: 0.16; }
}

/* ========================================
   Content Layer — foreground at 1x scroll
   ======================================== */
.content-layer {
    position: relative;
    z-index: 10;
}

/* ========================================
   Section Base — ma-negative-space layout
   Content occupies ~50% viewport width
   Vertical spacing between sections: 20vh
   ======================================== */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10vh 0;
    margin-bottom: 20vh;
}

.section:last-child {
    margin-bottom: 0;
}

.section-inner {
    width: 50%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* ========================================
   Section Labels — Space Mono, scholarly indexing
   ======================================== */
.section-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #E850A0;
    display: block;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.is-visible .section-label {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Section Headings — Righteous, retro-display
   ======================================== */
.section-heading {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    color: #18082A;
    line-height: 1.15;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.15s, transform 1s ease 0.15s;
}

.section.is-visible .section-heading {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Hero Section — vast negative space, cosmic weight
   ======================================== */
.section-hero {
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 20vh;
}

.section-hero .section-inner {
    text-align: left;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(3.2rem, 8vw, 6.5rem);
    color: #18082A;
    line-height: 1.05;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease 0.3s, transform 1.2s ease 0.3s;
}

.section-hero.is-visible .hero-title {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 2;
    color: #3A2050;
    max-width: 520px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}

.section-hero.is-visible .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Theory Section
   ======================================== */
.theory-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.theory-card {
    position: relative;
    padding-left: 3.5rem;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-theory.is-visible .theory-card:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.section-theory.is-visible .theory-card:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.section-theory.is-visible .theory-card:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.theory-index {
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Righteous', cursive;
    font-size: 1.6rem;
    color: #E850A0;
    opacity: 0.4;
}

.theory-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: 1.4rem;
    color: #18082A;
    margin-bottom: 0.8rem;
}

.theory-text {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    color: #3A2050;
    line-height: 1.9;
}

/* ========================================
   Taxonomy Section
   ======================================== */
.taxonomy-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.taxonomy-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(232, 80, 160, 0.1);
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-taxonomy.is-visible .taxonomy-item:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.2s; }
.section-taxonomy.is-visible .taxonomy-item:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.35s; }
.section-taxonomy.is-visible .taxonomy-item:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.5s; }
.section-taxonomy.is-visible .taxonomy-item:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.65s; }
.section-taxonomy.is-visible .taxonomy-item:nth-child(5) { opacity: 1; transform: translateX(0); transition-delay: 0.8s; }

.taxonomy-item:first-child {
    border-top: 1px solid rgba(232, 80, 160, 0.1);
}

.taxonomy-number {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #60C8E8;
    flex-shrink: 0;
    padding-top: 0.3rem;
    letter-spacing: 0.1em;
}

.taxonomy-content {
    flex: 1;
}

.taxonomy-name {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: 1.2rem;
    color: #18082A;
    margin-bottom: 0.5rem;
}

.taxonomy-desc {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    color: #3A2050;
    line-height: 1.9;
    font-size: 0.95rem;
}

.taxonomy-accent-bar {
    position: absolute;
    left: -2rem;
    top: 2.5rem;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #E850A0, #60C8E8);
    border-radius: 2px;
    transition: height 0.5s ease;
}

.taxonomy-item:hover .taxonomy-accent-bar {
    height: 40px;
}

/* ========================================
   Research Section
   ======================================== */
.research-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.research-block {
    position: relative;
    padding-left: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-research.is-visible .research-block:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.section-research.is-visible .research-block:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.section-research.is-visible .research-block:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }

.research-marker {
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #88E868;
    box-shadow: 0 0 6px rgba(136, 232, 104, 0.2);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.research-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: 1.3rem;
    color: #18082A;
    margin-bottom: 0.8rem;
}

.research-text {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    color: #3A2050;
    line-height: 1.9;
}

/* ========================================
   Principles Section
   ======================================== */
.principles-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.principle-item {
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-principles.is-visible .principle-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.section-principles.is-visible .principle-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.section-principles.is-visible .principle-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.section-principles.is-visible .principle-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.65s; }
.section-principles.is-visible .principle-item:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }

.principle-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #E850A0;
    flex-shrink: 0;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.principle-text {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 400;
    color: #3A2050;
    line-height: 1.9;
}

/* ========================================
   Coda Section
   ======================================== */
.section-coda {
    min-height: 80vh;
}

.coda-text {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: #3A2050;
    line-height: 2.1;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

.section-coda.is-visible .coda-text {
    opacity: 1;
    transform: translateY(0);
}

.coda-mark {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.section-coda.is-visible .coda-mark {
    opacity: 1;
    transform: translateY(0);
}

.coda-symbol {
    font-size: 1.2rem;
    color: #E850A0;
    animation: codaPulse 4s ease-in-out infinite;
}

@keyframes codaPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.coda-domain {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #3A2050;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* ========================================
   Scroll Progress Bar — candy gradient
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #E850A0, #60C8E8, #88E868);
    z-index: 9999;
    width: 0;
    pointer-events: none;
    transition: width 0.1s linear;
}

/* ========================================
   Responsive — ma-negative-space at all sizes
   ======================================== */
@media (max-width: 1200px) {
    .section-inner {
        width: 65%;
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .section-inner {
        width: 85%;
        padding: 0 1.5rem;
    }

    .section {
        min-height: auto;
        padding: 15vh 0;
        margin-bottom: 10vh;
    }

    .section-hero {
        min-height: 100vh;
    }

    .hero-title {
        font-size: clamp(2.4rem, 10vw, 4rem);
    }

    .nature-element {
        display: none;
    }

    .theory-card {
        padding-left: 2.5rem;
    }

    .taxonomy-item {
        gap: 1.2rem;
    }
}

@media (max-width: 480px) {
    .section-inner {
        width: 92%;
        padding: 0 1rem;
    }

    .taxonomy-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .taxonomy-accent-bar {
        display: none;
    }
}
