/* ============================================
   recycle.wiki — McBling Glamorous Recycling
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --emerald-depth: #0d3b2e;
    --mcbling-magenta: #e91e8c;
    --chrome-highlight: #c8d0d8;
    --chrome-shadow: #4a5568;
    --bg-base: #061a14;
    --text-light: #f0f4f2;
    --gold-leaf: #d4a843;
    --electric-cyan: #00e5c7;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.recycle-flow {
    background-color: var(--bg-base);
    color: var(--text-light);
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
.bungee-title {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(3rem, 7vw, 6rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: var(--text-light);
    margin-bottom: 0.3em;
}

.righteous-sub {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-weight: 400;
    color: var(--mcbling-magenta);
    margin-bottom: 0.8em;
}

.nunito-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.72;
    max-width: 600px;
    color: var(--text-light);
    opacity: 0.92;
}

/* --- Background Recycling Loop SVG --- */
.bg-recycle-loop {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    z-index: 0;
    pointer-events: none;
    animation: spin 120s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Floating Particles --- */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -20px;
    animation: floatUp linear infinite;
    opacity: 0.6;
}

.particle--diamond {
    width: 8px;
    height: 8px;
    background: var(--chrome-highlight);
    transform: rotate(45deg);
}

.particle--circle {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-leaf);
}

.particle--triangle {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid var(--chrome-highlight);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- Diamond Navigation --- */
.diamond-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.diamond-center {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--mcbling-magenta), var(--emerald-depth));
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 2px var(--chrome-highlight), 0 0 0 4px var(--chrome-shadow), 0 0 20px rgba(233, 30, 140, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.diamond-center:hover {
    transform: rotate(45deg) translateY(-8px);
    box-shadow: 0 0 0 2px var(--chrome-highlight), 0 0 0 4px var(--chrome-shadow), 0 0 0 6px var(--chrome-highlight), 0 12px 32px rgba(233, 30, 140, 0.3);
}

.diamond-icon {
    transform: rotate(-45deg);
    font-size: 20px;
    color: var(--text-light);
}

.diamond-menu {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.diamond-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.diamond-link {
    color: var(--chrome-highlight);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 12px;
    background: rgba(6, 26, 20, 0.9);
    border: 1px solid var(--chrome-shadow);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.diamond-link::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    color: var(--chrome-highlight);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.diamond-link:hover::after {
    opacity: 1;
}

.diamond-link:hover {
    color: var(--mcbling-magenta);
    border-color: var(--mcbling-magenta);
    transform: translateY(-4px);
}

/* --- Flow Panels --- */
.flow-panel {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 40px;
    margin-left: var(--flow-offset, 5vw);
    max-width: 700px;
}

.flow-panel--intro {
    min-height: 100vh;
    clip-path: polygon(0% 0%, 100% 0%, 95% 85%, 5% 100%);
    padding-bottom: 120px;
}

.flow-panel--glass {
    clip-path: polygon(5% 0%, 100% 5%, 95% 100%, 0% 95%);
}

.flow-panel--metal {
    clip-path: polygon(0% 5%, 95% 0%, 100% 90%, 8% 100%);
}

.flow-panel--paper {
    clip-path: polygon(3% 0%, 100% 8%, 97% 95%, 0% 100%);
}

.flow-panel--plastic {
    clip-path: polygon(0% 0%, 98% 3%, 100% 100%, 5% 92%);
}

.flow-panel--organic {
    clip-path: polygon(2% 5%, 100% 0%, 95% 100%, 0% 90%);
}

.flow-panel--rebirth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    padding: 80px 40px;
}

.flow-panel--rebirth .bungee-title {
    font-size: clamp(4rem, 10vw, 8rem);
    background: linear-gradient(135deg, var(--mcbling-magenta), var(--electric-cyan), var(--gold-leaf));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flow-panel--rebirth .nunito-body {
    max-width: 700px;
    text-align: center;
}

/* Odd sections: emerald to magenta gradient */
.flow-panel--intro,
.flow-panel--metal,
.flow-panel--plastic,
.flow-panel--rebirth {
    background: linear-gradient(135deg, #0d3b2e 0%, #061a14 60%, #e91e8c 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
}

/* Even sections: magenta to emerald gradient */
.flow-panel--glass,
.flow-panel--paper,
.flow-panel--organic {
    background: linear-gradient(135deg, #e91e8c 0%, #061a14 60%, #0d3b2e 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
}

.flow-panel.breathing {
    animation: gradientBreathe 8s ease-in-out infinite;
}

@keyframes gradientBreathe {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* --- Chrome Ring --- */
.chrome-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 0 0 2px #c8d0d8, 0 0 0 4px #4a5568, 0 0 0 6px #c8d0d8, 0 0 20px rgba(200, 208, 216, 0.3);
    margin-top: 30px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chrome-ring:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 0 2px #c8d0d8, 0 0 0 4px #4a5568, 0 0 0 6px #c8d0d8, 0 12px 32px rgba(233, 30, 140, 0.3);
}

.chrome-ring--large {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: pulseRing 4s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* --- Metamorphosis Zones --- */
.metamorphosis-zone {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(13, 59, 46, 0.4), var(--bg-base));
}

.geo-abstract {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 300px;
    height: 300px;
}

/* --- Glass: overlapping triangles --- */
.glass-triangle {
    position: absolute;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: rgba(13, 59, 46, 0.6);
    border: 2px solid var(--mcbling-magenta);
    transition: filter 0.4s ease;
}

.glass-triangle:hover {
    filter: brightness(1.6);
}

.glass-triangle.t1 { width: 120px; height: 120px; top: 20px; left: 90px; transform: rotate(0deg); }
.glass-triangle.t2 { width: 80px; height: 80px; top: 60px; left: 40px; transform: rotate(30deg); }
.glass-triangle.t3 { width: 100px; height: 100px; top: 100px; left: 130px; transform: rotate(-15deg); }
.glass-triangle.t4 { width: 60px; height: 60px; top: 30px; left: 170px; transform: rotate(60deg); }
.glass-triangle.t5 { width: 90px; height: 90px; top: 140px; left: 70px; transform: rotate(-40deg); }

/* --- Metal: concentric circles --- */
.geo-abstract--metal {
    animation: metalPulse 4s ease-in-out infinite;
}

.metal-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #c8d0d8, #4a5568, #c8d0d8);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.metal-circle.c1 { width: 200px; height: 200px; opacity: 0.3; }
.metal-circle.c2 { width: 160px; height: 160px; opacity: 0.4; }
.metal-circle.c3 { width: 120px; height: 120px; opacity: 0.5; }
.metal-circle.c4 { width: 80px; height: 80px; opacity: 0.6; }
.metal-circle.c5 { width: 40px; height: 40px; opacity: 0.8; }

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

/* --- Paper: stacked rhombus --- */
.paper-rhombus {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid var(--text-light);
    transform: rotate(45deg);
    backdrop-filter: blur(2px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.paper-rhombus:hover {
    transform: rotate(45deg) translateY(-8px);
    border-color: var(--mcbling-magenta);
}

.paper-rhombus.r1 { top: 80px; left: 110px; }
.paper-rhombus.r2 { top: 90px; left: 120px; opacity: 0.8; }
.paper-rhombus.r3 { top: 100px; left: 100px; opacity: 0.6; }
.paper-rhombus.r4 { top: 70px; left: 130px; opacity: 0.4; }
.paper-rhombus.r5 { top: 110px; left: 95px; opacity: 0.3; }

/* --- Plastic: morphing blob --- */
.plastic-blob {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--mcbling-magenta), var(--electric-cyan));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blobMorph 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.plastic-blob:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(233, 30, 140, 0.3);
}

@keyframes blobMorph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 56% 44% / 64% 30% 70% 36%; }
    50% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
    75% { border-radius: 42% 58% 64% 36% / 34% 54% 46% 66%; }
}

/* --- Organic: spiral SVG --- */
.organic-spiral {
    width: 200px;
    height: 200px;
    animation: rotateSlow 20s linear infinite;
}

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

/* --- Hover-lift utility --- */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(233, 30, 140, 0.3);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .flow-panel {
        margin-left: 5vw !important;
        padding: 60px 24px;
        max-width: 90vw;
        clip-path: none !important;
    }

    .bungee-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .metamorphosis-zone {
        min-height: 60vh;
    }

    .geo-abstract {
        width: 200px;
        height: 200px;
        transform: scale(0.8);
    }

    .diamond-nav {
        bottom: 12px;
    }
}
