/* === recycle.cafe - Brutalist Leather + Candy-Bright === */

:root {
    --bg-warm-concrete: #F5F0EB;
    --text-charcoal: #2D2D2D;
    --text-slate: #4A4A5A;
    --candy-pink: #FF6B9D;
    --candy-lime: #C5E84D;
    --candy-orange: #FF8C42;
    --candy-blue: #5CC8FF;
    --sage-growth: #A8C5A0;
    --leather-warm: #8B6F4E;
    --leather-fresh: #C4A77D;
    --espresso: #3D2B1F;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-warm-concrete);
    color: var(--text-charcoal);
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* === Leather Grain Overlay === */

#leather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: multiply;
}

#leather-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* === Growth Line === */

#growth-line {
    position: fixed;
    left: 8%;
    top: 0;
    width: 1px;
    height: 0%;
    background-color: var(--sage-growth);
    z-index: 10;
    pointer-events: none;
    transition: none;
}

#growth-line::before,
#growth-line::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 1px;
    background-color: var(--sage-growth);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#growth-line::before {
    top: 15%;
}

#growth-line::after {
    top: 45%;
}

#growth-line.branch-1::before {
    opacity: 1;
}

#growth-line.branch-2::after {
    opacity: 1;
}

/* === Ma-Space Grid === */

.ma-grid {
    display: grid;
    grid-template-columns: 8% 1fr 35%;
    min-height: 100vh;
    position: relative;
}

.ma-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* === Hero Plate === */

#hero {
    min-height: 100vh;
    align-items: end;
}

#hero .ma-content {
    padding-bottom: 20vh;
    justify-content: flex-end;
}

.hero-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(6rem, 15vw, 14rem);
    letter-spacing: -0.02em;
    color: var(--text-charcoal);
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--text-slate);
    max-width: 480px;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
}

/* === Interstitial Void Sections === */

.void-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.void-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-slate);
    text-align: center;
    line-height: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.void-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Seed Clusters */

.seed-cluster {
    position: absolute;
    bottom: 15%;
    right: 18%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 80px;
}

.seed {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seed-cluster.visible .seed {
    opacity: 1;
    transform: scale(1);
}

.seed-cluster.visible .seed:nth-child(1) { transition-delay: 0ms; }
.seed-cluster.visible .seed:nth-child(2) { transition-delay: 80ms; }
.seed-cluster.visible .seed:nth-child(3) { transition-delay: 160ms; }
.seed-cluster.visible .seed:nth-child(4) { transition-delay: 240ms; }
.seed-cluster.visible .seed:nth-child(5) { transition-delay: 320ms; }

.seed-cluster[data-accent="pink"] .seed { background-color: var(--candy-pink); }
.seed-cluster[data-accent="lime"] .seed { background-color: var(--candy-lime); }
.seed-cluster[data-accent="blue"] .seed { background-color: var(--candy-blue); }
.seed-cluster[data-accent="orange"] .seed { background-color: var(--candy-orange); }

/* === Card Cluster Sections === */

.card-cluster {
    min-height: 100vh;
    padding: 10vh 0;
}

.cluster-scatter {
    position: relative;
    min-height: 600px;
    padding: 40px 0;
}

/* === Flip Cards === */

.card-container {
    width: 400px;
    height: 280px;
    perspective: 1200px;
    position: relative;
    margin-bottom: 60px;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.card-container.flipped .flip-card {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Front Face: Leather textured, muted */
.flip-card-front {
    background-color: var(--leather-fresh);
    background-image:
        linear-gradient(145deg, rgba(61,43,31,0.04) 0%, transparent 50%),
        linear-gradient(225deg, rgba(61,43,31,0.03) 0%, transparent 40%),
        linear-gradient(90deg, rgba(139,111,78,0.06) 0%, transparent 30%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.04);
    color: var(--text-slate);
}

/* Back Face: Clean, candy-accented */
.flip-card-back {
    background-color: var(--bg-warm-concrete);
    border-top: 4px solid var(--accent, var(--candy-pink));
    box-shadow: 0 0 30px rgba(255,107,157,0.08);
    transform: rotateY(180deg);
    color: var(--text-charcoal);
}

.card-container[data-accent="pink"] .flip-card-back {
    border-top-color: var(--candy-pink);
    box-shadow: 0 0 30px rgba(255,107,157,0.08);
}

.card-container[data-accent="lime"] .flip-card-back {
    border-top-color: var(--candy-lime);
    box-shadow: 0 0 30px rgba(197,232,77,0.08);
}

.card-container[data-accent="orange"] .flip-card-back {
    border-top-color: var(--candy-orange);
    box-shadow: 0 0 30px rgba(255,140,66,0.08);
}

.card-container[data-accent="blue"] .flip-card-back {
    border-top-color: var(--candy-blue);
    box-shadow: 0 0 30px rgba(92,200,255,0.08);
}

.card-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.flip-card-front .card-label {
    color: var(--espresso);
}

.flip-card-back .card-label {
    color: var(--text-charcoal);
}

.card-desc-front,
.card-desc-back {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.72;
}

.card-desc-front {
    color: var(--espresso);
    opacity: 0.8;
}

.card-desc-back {
    color: var(--text-slate);
}

/* Card flip mid-scale pulse */
.card-container.flipping .flip-card {
    animation: flipPulse 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes flipPulse {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(90deg) scale(1.02); }
    100% { transform: rotateY(180deg) scale(1); }
}

/* === Nature Integration Band === */

#nature-band {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.botanical-garden {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.leaf {
    position: absolute;
    bottom: 0;
    background-color: var(--sage-growth);
    opacity: 0.6;
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaf.grown {
    transform: scaleY(1);
}

.leaf-1 {
    left: 10%;
    width: 40px;
    height: 120px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(-10deg);
    transition-delay: 0ms;
}
.leaf-1.grown { transform: scaleY(1) rotate(-10deg); }

.leaf-2 {
    left: 18%;
    width: 30px;
    height: 160px;
    border-radius: 50% 50% 40% 40%;
    opacity: 0.4;
    transition-delay: 100ms;
}

.leaf-3 {
    left: 25%;
    width: 50px;
    height: 200px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(5deg);
    transition-delay: 200ms;
}
.leaf-3.grown { transform: scaleY(1) rotate(5deg); }

.leaf-4 {
    left: 35%;
    width: 35px;
    height: 140px;
    border-radius: 30% 70% 30% 70%;
    opacity: 0.5;
    transition-delay: 300ms;
}

.leaf-5 {
    left: 42%;
    width: 45px;
    height: 180px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(-8deg);
    transition-delay: 400ms;
}
.leaf-5.grown { transform: scaleY(1) rotate(-8deg); }

.leaf-6 {
    left: 52%;
    width: 28px;
    height: 100px;
    border-radius: 50% 50% 30% 30%;
    opacity: 0.35;
    transition-delay: 500ms;
}

.leaf-7 {
    left: 58%;
    width: 55px;
    height: 220px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(12deg);
    transition-delay: 600ms;
}
.leaf-7.grown { transform: scaleY(1) rotate(12deg); }

.leaf-8 {
    left: 67%;
    width: 32px;
    height: 130px;
    border-radius: 30% 70% 30% 70%;
    opacity: 0.45;
    transition-delay: 700ms;
}

.leaf-9 {
    left: 75%;
    width: 42px;
    height: 170px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(-6deg);
    transition-delay: 800ms;
}
.leaf-9.grown { transform: scaleY(1) rotate(-6deg); }

.leaf-10 {
    left: 82%;
    width: 38px;
    height: 150px;
    border-radius: 50% 50% 40% 40%;
    opacity: 0.5;
    transition-delay: 900ms;
}

.leaf-11 {
    left: 88%;
    width: 48px;
    height: 190px;
    border-radius: 70% 30% 70% 30%;
    transform: scaleY(0) rotate(8deg);
    transition-delay: 1000ms;
}
.leaf-11.grown { transform: scaleY(1) rotate(8deg); }

.leaf-12 {
    left: 95%;
    width: 25px;
    height: 110px;
    border-radius: 30% 70% 30% 70%;
    opacity: 0.3;
    transition-delay: 1100ms;
}

/* Branches in nature band */
.branch {
    position: absolute;
    bottom: 0;
    width: 1px;
    background-color: var(--sage-growth);
    opacity: 0.3;
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 1s ease;
}

.branch-1 {
    left: 30%;
    height: 300px;
    transform: scaleY(0) rotate(2deg);
    transition-delay: 200ms;
}
.branch-1.grown { transform: scaleY(1) rotate(2deg); }

.branch-2 {
    left: 55%;
    height: 250px;
    transform: scaleY(0) rotate(-3deg);
    transition-delay: 400ms;
}
.branch-2.grown { transform: scaleY(1) rotate(-3deg); }

.branch-3 {
    left: 78%;
    height: 280px;
    transform: scaleY(0) rotate(1deg);
    transition-delay: 600ms;
}
.branch-3.grown { transform: scaleY(1) rotate(1deg); }

/* === Closing Plate === */

#closing {
    min-height: 100vh;
}

#closing .ma-content {
    grid-column: 2 / 4;
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding-top: 20vh;
    padding-right: 10%;
}

.closing-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(6rem, 15vw, 14rem);
    letter-spacing: -0.02em;
    color: var(--text-charcoal);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    text-align: right;
}

.closing-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--text-slate);
    max-width: 480px;
    text-align: right;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
}

/* === Responsive: Mobile === */

@media (max-width: 768px) {
    .ma-grid {
        grid-template-columns: 5% 1fr 10%;
    }

    .hero-title,
    .closing-title {
        font-size: clamp(3.5rem, 12vw, 6rem);
    }

    .card-container {
        width: 100%;
        height: 260px;
        margin-bottom: 40px;
    }

    .cluster-scatter {
        min-height: auto;
    }

    .void-section {
        min-height: 60vh;
    }

    .seed-cluster {
        right: 10%;
        bottom: 12%;
    }

    .closing-content {
        align-items: flex-start;
        padding-right: 0;
    }

    .closing-title,
    .closing-subtitle {
        text-align: left;
    }

    .leaf {
        width: 25px !important;
    }
}
