/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --teal: #68d8c8;
    --green: #88e088;
    --deep-purple: #3a3654;
    --lavender: #c8c8e0;
    --pink: #e878a0;
    --light-lavender: #e8e0f8;
    --gold: #d8b868;
    --silver: #c0c0d8;
    --cream: #e8e0d0;
    --bg: #1a1830;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--teal) var(--deep-purple);
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--lavender);
    overflow-x: hidden;
    line-height: 1.6;
}

/* === TYPOGRAPHY === */
.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--light-lavender);
    text-shadow: 0 0 40px rgba(104, 216, 200, 0.3), 0 0 80px rgba(232, 120, 160, 0.15);
}

.hero-title .dot {
    color: var(--pink);
}

.hero-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    letter-spacing: 0.3em;
    color: var(--silver);
    margin-top: 1rem;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--light-lavender);
    text-align: center;
    margin-bottom: 3rem;
}

/* === ZONES === */
.zone {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

/* === INTAKE / HERO === */
#intake {
    background: linear-gradient(160deg, var(--bg) 0%, #252040 40%, var(--deep-purple) 100%);
    overflow: hidden;
}

.chrome-surface {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(104, 216, 200, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(232, 120, 160, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(216, 184, 104, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.recycling-arrows {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

.arrow-svg {
    position: absolute;
    width: 100px;
    height: 100px;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.arrow-1 { top: 0; left: 50%; transform: translateX(-50%); }
.arrow-2 { bottom: 10px; right: 10px; }
.arrow-3 { bottom: 10px; left: 10px; }

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: pulse-fade 2s ease-in-out infinite;
}

.scroll-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--silver);
}

.scroll-chevron {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--teal);
    border-bottom: 2px solid var(--teal);
    transform: rotate(45deg);
}

@keyframes pulse-fade {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* === SORTING === */
#sorting {
    background: linear-gradient(180deg, var(--deep-purple) 0%, #1e1a38 100%);
}

.material-stream {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    width: 100%;
}

.material-card {
    background: linear-gradient(135deg, rgba(104, 216, 200, 0.05) 0%, rgba(58, 54, 84, 0.8) 100%);
    border: 1px solid rgba(200, 200, 224, 0.1);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: default;
}

.material-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(104, 216, 200, 0.3);
    box-shadow: 0 20px 60px rgba(104, 216, 200, 0.1);
}

.card-icon svg {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--light-lavender);
    margin-bottom: 0.5rem;
}

.card-stat {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--teal);
    margin-bottom: 1rem;
}

.card-detail {
    font-size: 0.85rem;
    color: var(--silver);
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.material-card:hover .card-detail {
    max-height: 200px;
    opacity: 1;
}

/* === COMPRESSION === */
#compression {
    background: linear-gradient(180deg, #1e1a38 0%, #161230 100%);
}

.compression-visual {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: flex-end;
}

.bale {
    width: 80px;
    border-radius: 4px;
    transition: height 1s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

#bale-1 {
    height: 160px;
    background: linear-gradient(180deg, var(--teal), rgba(104, 216, 200, 0.3));
}

#bale-2 {
    height: 120px;
    background: linear-gradient(180deg, var(--green), rgba(136, 224, 136, 0.3));
}

#bale-3 {
    height: 200px;
    background: linear-gradient(180deg, var(--gold), rgba(216, 184, 104, 0.3));
}

.bale.compressed {
    height: 50px !important;
    width: 120px;
    border-radius: 2px;
}

.compression-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-block {
    text-align: center;
    min-width: 140px;
}

.stat-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--teal);
    display: block;
}

.stat-unit {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--gold);
    display: block;
    margin-top: -0.3rem;
}

.stat-label {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--silver);
    display: block;
    margin-top: 0.3rem;
}

/* === TRANSFORMATION === */
#transformation {
    background: linear-gradient(180deg, #161230 0%, #1a1535 100%);
    position: relative;
}

.transform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    width: 100%;
    z-index: 1;
    position: relative;
}

.transform-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(58, 54, 84, 0.4);
    border: 1px solid rgba(200, 200, 224, 0.08);
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.transform-item:hover {
    border-color: rgba(104, 216, 200, 0.25);
}

.transform-before, .transform-after {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
}

.transform-before {
    color: var(--silver);
    text-decoration: line-through;
    text-decoration-color: rgba(200, 200, 224, 0.3);
}

.transform-after {
    color: var(--teal);
}

.transform-arrow-anim svg {
    width: 50px;
    height: 20px;
}

#particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === OUTPUT === */
#output {
    background: linear-gradient(180deg, #1a1535 0%, var(--bg) 100%);
    justify-content: space-between;
}

.output-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

#symbol-final svg {
    width: 200px;
    height: 200px;
}

.output-message {
    text-align: center;
}

.output-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.06em;
    line-height: 1.6;
    color: var(--light-lavender);
}

.highlight {
    color: var(--teal);
    text-shadow: 0 0 30px rgba(104, 216, 200, 0.4);
}

.output-credit {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--silver);
    margin-top: 1rem;
}

/* === FOOTER === */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    width: 100%;
    border-top: 1px solid rgba(200, 200, 224, 0.08);
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--silver);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-symbols {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-sym {
    font-size: 1.2rem;
    color: var(--teal);
    opacity: 0.4;
    animation: spin-slow 8s linear infinite;
    display: inline-block;
}

.footer-sym:nth-child(2) { color: var(--green); animation-delay: -2.6s; }
.footer-sym:nth-child(3) { color: var(--pink); animation-delay: -5.2s; }

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .material-stream {
        grid-template-columns: 1fr;
    }
    .compression-visual {
        gap: 1rem;
    }
    .bale { width: 60px; }
    .compression-stats { gap: 1.5rem; }
    .transform-grid { grid-template-columns: 1fr; }
}
