/* ============================================================
   recycle.digital — Styles
   Aesthetic: Maximalist | Layout: Sidebar | Typography: Handwritten
   Palette: Dark-Neon | Patterns: Tilt-3D | Imagery: Grain-Overlay
   Motifs: Particle-Effects | Tone: Conversational
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --void-black: #0a0a12;
    --charcoal-ink: #0d0d1a;
    --hot-magenta: #ff00ff;
    --cyan-pulse: #00f0ff;
    --electric-lime: #39ff14;
    --recycled-white: #e0dfe6;
    --neon-blush: #ffb3d9;
    --smoke-violet: #1a1528;
    --solar-amber: #ffaa00;
    --sidebar-width: 280px;
    --font-display: 'Caveat', cursive;
    --font-body: 'Barlow', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

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

body {
    background-color: var(--void-black);
    color: var(--recycled-white);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.015em;
    overflow-x: hidden;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
}

/* --- Grain Overlay Canvas --- */
#grain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 60;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.1;
}

/* --- Recycle Watermark --- */
#recycle-watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    z-index: 70;
    opacity: 0.1;
    pointer-events: none;
}

#recycle-watermark svg {
    width: 100%;
    height: 100%;
}

/* --- Bay Transition Flash --- */
#bay-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--cyan-pulse);
    opacity: 0;
    z-index: 80;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

#bay-flash.active {
    opacity: 0.05;
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--charcoal-ink);
    z-index: 100;
    border-right: 1px solid rgba(255, 0, 255, 0.3);
    box-shadow: 4px 0 10px rgba(255, 0, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 255, 0.02) 2px,
            rgba(255, 0, 255, 0.02) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.sidebar-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem 1.5rem;
}

/* --- Sidebar Logo --- */
.sidebar-logo {
    margin-bottom: 3rem;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--neon-blush);
    display: block;
    line-height: 1;
}

.logo-dot {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--electric-lime);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--recycled-white);
    text-decoration: none;
    display: inline-block;
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan-pulse);
    transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 100%;
}

.nav-item.active .nav-link {
    color: var(--cyan-pulse);
}

.nav-link:hover {
    color: var(--hot-magenta);
}

/* --- Sidebar Stats --- */
.sidebar-stats {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(57, 255, 20, 0.15);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--electric-lime);
    display: block;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--solar-amber);
    display: block;
    margin-bottom: 1rem;
}

/* --- Mobile Bottom Tab Bar --- */
#mobile-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--charcoal-ink);
    border-top: 1px solid rgba(255, 0, 255, 0.3);
    z-index: 100;
    justify-content: space-around;
    padding: 0.5rem 0;
}

.tab-item {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--recycled-white);
    text-decoration: none;
    padding: 0.5rem 0.3rem;
    text-align: center;
    transition: color 0.3s ease;
}

.tab-item.active {
    color: var(--cyan-pulse);
}

/* --- Main Content --- */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* --- Neon Line Accents --- */
.neon-line {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}

.neon-line-h {
    height: 1px;
    background: linear-gradient(90deg, var(--hot-magenta), transparent);
    animation: neonPulse 4s ease-in-out infinite;
}

.neon-line-v {
    width: 1px;
    background: linear-gradient(180deg, var(--hot-magenta), transparent);
    animation: neonPulse 4s ease-in-out infinite;
}

.neon-line.neon-cyan {
    background: linear-gradient(90deg, var(--cyan-pulse), transparent);
}

.neon-line-h::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hot-magenta);
    box-shadow: 0 0 6px var(--hot-magenta);
}

.neon-line.neon-cyan .neon-line-h::after {
    background: var(--cyan-pulse);
    box-shadow: 0 0 6px var(--cyan-pulse);
}

@keyframes neonPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Salvage Bays (Shared) --- */
.salvage-bay {
    position: relative;
    width: 100%;
    padding: 6rem 4rem;
}

.bay-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--neon-blush);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 3rem;
}

/* --- Bay 1: Manifesto --- */
.bay-manifesto {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.manifesto-content {
    max-width: 900px;
    transform: rotate(-2deg);
    position: relative;
    z-index: 2;
}

.manifesto-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 6rem);
    color: var(--neon-blush);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
    text-shadow: 0 0 40px rgba(255, 179, 217, 0.3);
}

.manifesto-subtext {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--recycled-white);
    line-height: 1.3;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.85;
}

/* --- Bay 2: The Cycle --- */
.bay-cycle {
    background: var(--void-black);
    border-top: 1px solid rgba(255, 0, 255, 0.1);
}

.cycle-columns {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.cycle-col {
    flex: 1;
    padding: 0 2rem;
}

.cycle-col:first-child {
    padding-left: 0;
}

.cycle-col:last-child {
    padding-right: 0;
}

.neon-divider {
    width: 1px;
    background: rgba(255, 0, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.2);
    flex-shrink: 0;
}

.cycle-stage {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--cyan-pulse);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.cycle-col p {
    margin-bottom: 1.2rem;
    color: var(--recycled-white);
}

/* --- Bay 3: Showcase --- */
.bay-showcase {
    background: var(--void-black);
    border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    position: relative;
}

.showcase-item {
    background: rgba(26, 21, 40, 0.75);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    border: 1px solid rgba(255, 0, 255, 0.15);
}

.showcase-item:nth-child(even) {
    margin-top: 25px;
}

.showcase-item:nth-child(3n+1) {
    margin-left: -15px;
}

.showcase-item:nth-child(3n) {
    margin-right: -15px;
}

.showcase-tag {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--electric-lime);
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.showcase-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--neon-blush);
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.showcase-desc {
    color: var(--recycled-white);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.showcase-meta {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    color: var(--solar-amber);
    display: block;
    opacity: 0.8;
}

/* --- Bay 4: Voices --- */
.bay-voices {
    background: var(--void-black);
    border-top: 1px solid rgba(255, 170, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-height: 100vh;
    padding-left: 40%;
}

.bay-voices .bay-heading {
    width: 100%;
    max-width: 520px;
}

.voices-container {
    max-width: 520px;
    width: 100%;
}

.voice-item {
    margin-bottom: 3rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(255, 0, 255, 0.3);
}

.voice-quote {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--recycled-white);
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

.voice-attribution {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cyan-pulse);
    opacity: 0.8;
}

/* --- Bay 5: Participate --- */
.bay-participate {
    background: var(--void-black);
    border-top: 1px solid rgba(57, 255, 20, 0.1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.diagonal-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            15deg,
            transparent,
            transparent 60px,
            rgba(255, 0, 255, 0.04) 60px,
            rgba(255, 0, 255, 0.04) 61px
        ),
        repeating-linear-gradient(
            105deg,
            transparent,
            transparent 60px,
            rgba(0, 240, 255, 0.03) 60px,
            rgba(0, 240, 255, 0.03) 61px
        );
    pointer-events: none;
    z-index: 0;
}

.participate-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.participate-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--neon-blush);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 3rem;
    text-shadow: 0 0 30px rgba(255, 179, 217, 0.2);
}

.participate-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.participate-block {
    transform: rotate(-1deg);
}

.participate-block:nth-child(2) {
    transform: translateY(2rem) rotate(1deg);
}

.participate-block:nth-child(3) {
    transform: translateY(4rem) rotate(-0.5deg);
}

.participate-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--solar-amber);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.participate-block p {
    color: var(--recycled-white);
    opacity: 0.9;
}

.participate-cta-area {
    text-align: center;
    padding-top: 2rem;
}

.cta-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--recycled-white);
    display: block;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.participate-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--cyan-pulse);
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--cyan-pulse);
    position: relative;
    transition: color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.15s ease-out;
}

.participate-link:hover {
    color: var(--hot-magenta);
    border-color: var(--hot-magenta);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(255, 0, 255, 0.1);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.6);
}

/* --- Selection --- */
::selection {
    background: rgba(255, 0, 255, 0.3);
    color: var(--recycled-white);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .participate-flow {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .participate-block,
    .participate-block:nth-child(2),
    .participate-block:nth-child(3) {
        transform: none;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    #sidebar {
        display: none;
    }

    #mobile-tabs {
        display: flex;
    }

    #main-content {
        margin-left: 0;
        padding-bottom: 60px;
    }

    .salvage-bay {
        padding: 4rem 1.5rem;
    }

    .cycle-columns {
        flex-direction: column;
    }

    .neon-divider {
        width: 100%;
        height: 1px;
        margin: 2rem 0;
    }

    .cycle-col {
        padding: 0;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item {
        margin: 0 !important;
    }

    .bay-voices {
        padding-left: 1.5rem;
        align-items: flex-start;
    }

    .voices-container {
        max-width: 100%;
    }

    .neon-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .manifesto-heading {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .manifesto-subtext {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    .tab-item {
        font-size: 0.75rem;
    }
}
