/* ===========================================
   recycle.cafe — Fairycore Dopamine-Neon Meadow
   =========================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #482858;
    background-color: #FFFBFE;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Sparkle Canvas ---------- */
#sparkleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ---------- HUD Overlay ---------- */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.06;
}

.hud-corner {
    position: absolute;
    width: 120px;
    height: 120px;
}

.hud-top-left {
    top: 16px;
    left: 16px;
}

.hud-top-right {
    top: 16px;
    right: 16px;
}

.hud-bottom-left {
    bottom: 16px;
    left: 16px;
}

.hud-bottom-right {
    bottom: 16px;
    right: 16px;
}

/* ---------- HUD Status Bars ---------- */
.hud-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C040E0;
    opacity: 0.5;
}

.hud-divider {
    opacity: 0.3;
}

.hud-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #40E0A0;
    animation: hudPulse 2s ease-in-out infinite;
}

@keyframes hudPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ---------- Fairy Sections ---------- */
.fairy-section {
    min-height: 80vh;
    padding: clamp(40px, 8vh, 80px) clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section-meadow {
    background-color: #FFFBFE;
}

.section-mist {
    background-color: #FEF8FF;
}

.section-content {
    max-width: 760px;
    width: 100%;
}

/* ---------- Hero Section ---------- */
#heroSection {
    min-height: 100vh;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #281038;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #C040E0, #FF60A0, #40E0A0);
    border-radius: 2px;
    opacity: 0.6;
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: #482858;
    margin-bottom: 40px;
    line-height: 1.85;
}

/* ---------- Fairy Sparkle Ring ---------- */
.fairy-sparkle-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 24px 0 40px;
}

.sparkle-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C040E0;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    animation: sparkleOrbit 4s ease-in-out infinite;
    animation-delay: var(--delay);
}

.sparkle-dot:nth-child(2n) {
    background: #FF60A0;
    width: 5px;
    height: 5px;
}

.sparkle-dot:nth-child(3n) {
    background: #40E0A0;
    width: 4px;
    height: 4px;
}

@keyframes sparkleOrbit {
    0% {
        transform: rotate(var(--angle)) translateX(40px) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(calc(var(--angle) + 180deg)) translateX(50px) scale(1.4);
        opacity: 1;
    }
    100% {
        transform: rotate(calc(var(--angle) + 360deg)) translateX(40px) scale(1);
        opacity: 0.3;
    }
}

/* ---------- Vintage Photo Frames ---------- */
.vintage-photo-frame {
    position: relative;
    margin: 32px 0;
    border-radius: 8px;
    overflow: hidden;
}

.vintage-photo {
    filter: sepia(0.2) saturate(1.2);
    border-radius: 8px;
    overflow: hidden;
    background: #FEF8FF;
}

.vintage-photo svg {
    display: block;
    width: 100%;
    height: auto;
}

.photo-hud-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(192, 64, 224, 0.08);
    border-radius: 8px;
    pointer-events: none;
}

.photo-hud-frame::before,
.photo-hud-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(192, 64, 224, 0.15);
    border-style: solid;
}

.photo-hud-frame::before {
    top: 6px;
    left: 6px;
    border-width: 1.5px 0 0 1.5px;
}

.photo-hud-frame::after {
    bottom: 6px;
    right: 6px;
    border-width: 0 1.5px 1.5px 0;
}

/* ---------- Section Headings ---------- */
.section-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #281038;
    margin-bottom: 24px;
}

/* ---------- Section Body ---------- */
.section-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #482858;
    line-height: 1.85;
    margin-bottom: 20px;
}

/* ---------- Neon Accent Bar ---------- */
.neon-accent-bar {
    width: 80px;
    height: 3px;
    margin-top: 32px;
    background: linear-gradient(90deg, #C040E0, #40E0A0);
    border-radius: 2px;
    opacity: 0.7;
}

/* ---------- Tutorial Steps ---------- */
.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 16px;
}

.tutorial-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: rgba(192, 64, 224, 0.03);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.tutorial-step:hover {
    background: rgba(192, 64, 224, 0.06);
}

.step-number {
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    font-size: 1.5rem;
    color: #C040E0;
    flex-shrink: 0;
    line-height: 1.2;
}

.step-content {
    flex: 1;
}

.step-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: #281038;
    margin-bottom: 8px;
}

.step-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #482858;
    line-height: 1.85;
}

.step-hud-bracket {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-top: 1.5px solid rgba(64, 224, 160, 0.2);
    border-right: 1.5px solid rgba(64, 224, 160, 0.2);
}

/* ---------- Materials Grid ---------- */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.material-card {
    padding: 28px 24px;
    background: rgba(192, 64, 224, 0.025);
    border-radius: 12px;
    border: 1px solid rgba(192, 64, 224, 0.06);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.material-card:hover {
    border-color: rgba(192, 64, 224, 0.15);
}

.material-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.material-icon svg {
    width: 100%;
    height: 100%;
}

.material-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #281038;
    margin-bottom: 8px;
}

.material-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 0.92rem;
    color: #482858;
    line-height: 1.75;
    margin-bottom: 12px;
}

.material-tag {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #40E0A0;
    padding: 3px 10px;
    border: 1px solid rgba(64, 224, 160, 0.25);
    border-radius: 20px;
}

/* ---------- Facts List ---------- */
.facts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.fact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-left: 2px solid rgba(255, 96, 160, 0.3);
    transition: border-color 0.3s ease;
}

.fact-item:hover {
    border-left-color: rgba(255, 96, 160, 0.6);
}

.fact-icon {
    font-size: 1.2rem;
    color: #FF60A0;
    flex-shrink: 0;
    line-height: 1.6;
}

.fact-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #482858;
    line-height: 1.85;
}

/* ---------- Community Stats ---------- */
.community-stats {
    display: flex;
    gap: 40px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: #C040E0;
    line-height: 1.2;
}

.stat-label {
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #482858;
    opacity: 0.6;
}

/* ---------- Footer ---------- */
.fairy-footer {
    min-height: 40vh;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #281038;
}

.footer-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: #482858;
    opacity: 0.7;
}

.footer-fairy-ring {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(var(--hue), 75%, 55%);
    animation: footerDotPulse 3s ease-in-out infinite;
    animation-delay: calc(var(--hue) / 360 * 1.5s);
}

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

/* ---------- Section Reveal Animation ---------- */
.fairy-section .section-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fairy-section.in-view .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Magnetic Element Base ---------- */
.magnetic-element {
    transition: transform 0.2s ease-out;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .materials-grid {
        grid-template-columns: 1fr;
    }

    .community-stats {
        gap: 24px;
        justify-content: center;
    }

    .tutorial-step {
        flex-direction: column;
        gap: 12px;
    }

    .hud-overlay {
        display: none;
    }
}
