/* ============================================
   recycle.makeup - Graffiti Wall Experience
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-primary: #CC5500;
    --color-secondary: #A0522D;
    --color-dark: #1C1008;
    --color-cream: #F0DCC0;
    --color-gold: #C8A84E;
    --color-indigo: #1A1040;
    --color-copper: #B87333;
    --color-charcoal: #2B1A0E;
}

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

html {
    scroll-behavior: auto;
}

body {
    background-color: var(--color-dark);
    color: var(--color-cream);
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.65;
    overflow-x: hidden;
}

/* Spray-paint grain overlay */
.spray-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGklEQVQIW2P8/////z8DAwMDAwMDIwMDAQAAlgIH/hoHzgAAAABJRU5ErkJggg==");
    background-repeat: repeat;
    mix-blend-mode: overlay;
    opacity: 0.15;
    pointer-events: none;
    z-index: 5;
}

/* ============================================
   Section Base
   ============================================ */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* ============================================
   Section 1: The Wall (Hero)
   ============================================ */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.hero-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 60%, #CC5500 0%, #A0522D 35%, #1C1008 100%);
    z-index: 1;
}

.hero-mesh-layer2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, #B87333 0%, #1A1040 50%, #1C1008 100%);
    mix-blend-mode: screen;
    opacity: 0.6;
    z-index: 2;
}

.hero-mesh-layer3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 80%, #C8A84E 0%, transparent 40%);
    mix-blend-mode: overlay;
    opacity: 0.3;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-left: 10vw;
    padding-top: 30vh;
}

.hero-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1.1;
    color: var(--color-cream);
    text-shadow: 4px 4px 0 var(--color-charcoal), 8px 8px 20px rgba(28, 16, 8, 0.6);
    position: relative;
    display: inline-block;
}

.hero-tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--color-gold);
    margin-top: 1.5rem;
    max-width: 38ch;
}

/* Paint drips */
.hero-drip {
    position: absolute;
    width: 8px;
    border-radius: 0 0 50% 50%;
    background: var(--color-primary);
    z-index: 11;
    height: 0;
    transition: height 1.2s ease-in;
}

.hero-drip-1 {
    bottom: -80px;
    left: 15%;
    height: 0;
    max-height: 65px;
}

.hero-drip-2 {
    bottom: -55px;
    left: 45%;
    height: 0;
    max-height: 45px;
    background: var(--color-gold);
}

.hero-drip-3 {
    bottom: -70px;
    left: 75%;
    height: 0;
    max-height: 55px;
}

.hero-drip.drip-active {
    height: var(--drip-height, 60px);
}

.hero-drip-1.drip-active { height: 65px; }
.hero-drip-2.drip-active { height: 45px; }
.hero-drip-3.drip-active { height: 55px; }

/* Hero stars */
.star-outline {
    position: absolute;
    z-index: 12;
}

.star-hero-1 {
    top: 12%;
    right: 15%;
    width: 60px;
    height: 60px;
}

.star-hero-2 {
    top: 22%;
    right: 8%;
    width: 35px;
    height: 35px;
}

.star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background-color: var(--color-gold);
    animation: twinkle var(--twinkle-duration, 4s) ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.4; }
    100% { opacity: 1.0; }
}

/* Crescent moon */
.crescent {
    position: absolute;
    z-index: 12;
}

.crescent-hero {
    top: 8%;
    right: 25%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 10px -5px 0 0 var(--color-gold);
}

/* Slow rotation for stars */
.star-hero-1,
.star-hero-2 {
    animation: twinkle var(--twinkle-duration, 4s) ease-in-out infinite alternate, rotateSlow 60s linear infinite;
}

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

/* ============================================
   Section 2: Fragments
   ============================================ */
.section-fragments {
    background-color: var(--color-dark);
    padding: 4rem 2rem;
}

.fragments-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.3fr 0.7fr 1.1fr 0.9fr 1fr;
    gap: 2px;
    position: relative;
    z-index: 4;
}

.story-block {
    background: var(--color-cream);
    color: var(--color-charcoal);
    border: 3px solid var(--color-charcoal);
    padding: 2rem 1.8rem;
    transform: rotate(var(--rotation, 0deg));
    position: relative;
    clip-path: polygon(0% 2%, 3% 0%, 98% 1%, 100% 3%, 99% 97%, 97% 100%, 2% 99%, 0% 97%);
    transition: border-color 200ms ease, transform 200ms ease;
    max-width: 38ch;
    z-index: 6;
}

.story-block:hover {
    border-color: var(--color-primary);
    transform: rotate(var(--rotation, 0deg)) translateY(-4px);
}

.story-block p {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    line-height: 1.65;
}

.fragments-grid .story-block:nth-child(1) { grid-column: 1 / 4; grid-row: 1; margin-bottom: -10px; }
.fragments-grid .star-block:nth-child(2) { grid-column: 5 / 6; grid-row: 1; align-self: center; justify-self: center; }
.fragments-grid .story-block:nth-child(3) { grid-column: 3 / 6; grid-row: 2; margin-top: -8px; }
.fragments-grid .star-block:nth-child(4) { grid-column: 1 / 2; grid-row: 2; align-self: center; justify-self: center; }
.fragments-grid .story-block:nth-child(5) { grid-column: 1 / 4; grid-row: 3; margin-top: -12px; }
.fragments-grid .star-block:nth-child(6) { grid-column: 5 / 7; grid-row: 3; align-self: start; justify-self: center; }
.fragments-grid .story-block:nth-child(7) { grid-column: 4 / 7; grid-row: 4; margin-top: -8px; }

.star-block {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    transition: transform 200ms ease;
}

.star-block:hover {
    transform: scale(1.15);
}

.constellation-fragment {
    width: 100%;
    height: 100%;
}

/* ============================================
   Section 3: The Night Panel
   ============================================ */
.section-night {
    background-color: var(--color-indigo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.night-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, #B87333 0%, #1A1040 50%, #1C1008 100%);
    opacity: 0.4;
    z-index: 1;
}

.constellation-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.constellation-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.constellation-line.draw-on {
    stroke-dashoffset: 0;
}

.night-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 100%;
}

.night-text {
    font-family: 'Caveat', cursive;
    color: var(--color-cream);
    margin-bottom: 3rem;
    max-width: 38ch;
}

.pull-quote {
    width: 100%;
    padding: 3rem 2.5rem;
    margin: 3rem 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(204, 85, 0, 0.15) 0%, rgba(26, 16, 64, 0.3) 100%);
    position: relative;
}

.pull-quote p {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.6rem, 4vw, 3rem);
    line-height: 1.1;
    color: var(--color-gold);
    text-align: center;
}

/* ============================================
   Section 4: The Tags
   ============================================ */
.section-tags {
    background-color: var(--color-dark);
    padding: 4rem 2rem;
    min-height: 100vh;
    position: relative;
}

.tags-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    position: relative;
    z-index: 6;
}

.tag-block {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(var(--rotation, 0deg));
    margin: -1px;
    transition: transform 200ms ease, border-color 200ms ease;
}

.tag-block:hover {
    transform: rotate(var(--rotation, 0deg)) translateY(-4px);
}

.tag-block span {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.5rem, 3vw, 3rem);
    line-height: 1.1;
}

.tag-dark {
    background-color: var(--color-primary);
    color: var(--color-dark);
    border: 3px solid var(--color-charcoal);
}

.tag-light {
    background-color: var(--color-dark);
    color: var(--color-primary);
    border: 3px solid var(--color-charcoal);
}

/* Stickers */
.sticker {
    position: absolute;
    z-index: 10;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: 'Kalam', cursive;
    font-weight: 300;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    letter-spacing: 0.04em;
}

.sticker-1 {
    top: 8%;
    right: 5%;
    background: var(--color-cream);
    color: var(--color-primary);
    transform: rotate(3deg);
}

.sticker-2 {
    bottom: 12%;
    left: 3%;
    background: var(--color-dark);
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    transform: rotate(-4deg);
    font-size: 1.8rem;
}

.sticker-3 {
    bottom: 5%;
    right: 8%;
    background: var(--color-primary);
    color: var(--color-cream);
    transform: rotate(2deg);
}

/* ============================================
   Section 5: Copper Glow
   ============================================ */
.section-copper {
    background-color: var(--color-dark);
    min-height: 100vh;
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copper-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 40% 50%, #B87333 0%, #A0522D 30%, #1C1008 80%);
    opacity: 0.5;
    z-index: 1;
}

.crescent-copper {
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 20px -10px 0 0 var(--color-gold);
    z-index: 6;
}

.copper-content {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    width: 100%;
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.story-block-large {
    flex: 1 1 400px;
    max-width: none;
}

.story-block-large p {
    margin-bottom: 1.2rem;
}

.story-block-large p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Section 6: The Recycling
   ============================================ */
.section-recycling {
    background-color: var(--color-dark);
    min-height: 100vh;
    padding: 6rem 2rem;
}

.recycling-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 60%, #CC5500 0%, #A0522D 35%, #1C1008 100%);
    transform: rotate(180deg);
    opacity: 0.25;
    z-index: 1;
}

.recycling-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.recycling-content .story-block {
    margin-bottom: 3rem;
}

.sticker-recycled {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-family: 'Kalam', cursive;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    letter-spacing: 0.04em;
    transform: rotate(-2deg);
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.constellation-extended {
    width: 100%;
    height: 200px;
    margin: 2rem 0;
    position: relative;
    z-index: 10;
}

/* ============================================
   Section 7: Star Field
   ============================================ */
.section-starfield {
    background-color: var(--color-dark);
    min-height: 100vh;
    position: relative;
}

.starfield-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

.star-field-star {
    position: absolute;
    width: var(--size, 30px);
    height: var(--size, 30px);
    z-index: 6;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.star-field-star.star-visible {
    animation: twinkle var(--twinkle-duration, 4s) ease-in-out infinite alternate;
}

.starfield-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.starfield-whisper {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--color-cream);
    opacity: 0.7;
    z-index: 10;
    white-space: nowrap;
}

/* ============================================
   Section 8: The Final Tag
   ============================================ */
.section-final {
    background-color: var(--color-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.final-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 60%, #CC5500 0%, #A0522D 35%, #1C1008 100%);
    opacity: 0.3;
    z-index: 1;
}

.final-block {
    position: relative;
    z-index: 10;
    width: 80vw;
    max-width: 1000px;
    min-height: 60vh;
    background: var(--color-cream);
    color: var(--color-charcoal);
    border: 3px solid var(--color-charcoal);
    transform: rotate(-1deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    clip-path: polygon(0% 2%, 2% 0%, 99% 1%, 100% 3%, 99% 98%, 97% 100%, 1% 99%, 0% 96%);
    background-image: radial-gradient(ellipse at 30% 60%, rgba(204, 85, 0, 0.08) 0%, rgba(160, 82, 45, 0.05) 35%, transparent 100%);
    background-color: var(--color-cream);
}

.final-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    line-height: 1.1;
    color: var(--color-charcoal);
    text-shadow: 2px 2px 0 rgba(204, 85, 0, 0.3);
    margin-bottom: 1.5rem;
}

.final-subtitle {
    font-family: 'Kalam', cursive;
    font-weight: 300;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    letter-spacing: 0.04em;
    color: var(--color-secondary);
}

.final-drip {
    position: absolute;
    bottom: -1px;
    width: 8px;
    border-radius: 0 0 50% 50%;
    background: var(--color-primary);
    height: 0;
    transition: height 1.2s ease-in;
    z-index: 11;
}

.final-drip-1 {
    left: 25%;
    max-height: 70px;
}

.final-drip-2 {
    left: 50%;
    max-height: 50px;
    background: var(--color-gold);
}

.final-drip-3 {
    left: 72%;
    max-height: 60px;
}

.final-drip.drip-active {
    height: var(--drip-height, 60px);
}

.final-drip-1.drip-active { height: 70px; }
.final-drip-2.drip-active { height: 50px; }
.final-drip-3.drip-active { height: 60px; }

/* ============================================
   Slide-Reveal Animation
   ============================================ */
.block-reveal {
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.block-from-left {
    transform: translateX(-60px) scale(0.92) rotate(var(--rotation, 0deg));
}

.block-from-right {
    transform: translateX(60px) scale(0.92) rotate(var(--rotation, 0deg));
}

.block-reveal.revealed {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(var(--rotation, 0deg));
}

/* Tag blocks need their rotation preserved */
.tag-block.block-reveal.revealed {
    transform: translateX(0) scale(1) rotate(var(--rotation, 0deg));
}

/* ============================================
   Responsive: Tablet (768px)
   ============================================ */
@media (max-width: 768px) {
    .fragments-grid {
        grid-template-columns: 1fr 1.4fr 0.6fr;
        gap: 12px;
    }

    .fragments-grid .story-block:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
    .fragments-grid .star-block:nth-child(2) { grid-column: 3; grid-row: 1; }
    .fragments-grid .story-block:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
    .fragments-grid .star-block:nth-child(4) { grid-column: 3; grid-row: 2; }
    .fragments-grid .story-block:nth-child(5) { grid-column: 1 / 3; grid-row: 3; }
    .fragments-grid .star-block:nth-child(6) { grid-column: 3; grid-row: 3; }
    .fragments-grid .story-block:nth-child(7) { grid-column: 1 / 4; grid-row: 4; }

    .star-block {
        width: 150px;
        height: 150px;
    }

    .tags-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .copper-content {
        flex-direction: column;
    }

    .crescent-copper {
        width: 80px;
        height: 80px;
        box-shadow: 14px -7px 0 0 var(--color-gold);
    }

    .hero-content {
        padding-left: 6vw;
        padding-top: 25vh;
    }
}

/* ============================================
   Responsive: Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .fragments-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fragments-grid .story-block:nth-child(1) { grid-column: 1; grid-row: auto; width: 85%; margin-left: 0; }
    .fragments-grid .star-block:nth-child(2) { grid-column: 1; grid-row: auto; width: 85%; margin-left: auto; }
    .fragments-grid .story-block:nth-child(3) { grid-column: 1; grid-row: auto; width: 85%; margin-left: auto; }
    .fragments-grid .star-block:nth-child(4) { grid-column: 1; grid-row: auto; width: 85%; margin-left: 0; }
    .fragments-grid .story-block:nth-child(5) { grid-column: 1; grid-row: auto; width: 85%; margin-left: 0; }
    .fragments-grid .star-block:nth-child(6) { grid-column: 1; grid-row: auto; width: 85%; margin-left: auto; }
    .fragments-grid .story-block:nth-child(7) { grid-column: 1; grid-row: auto; width: 85%; margin-left: auto; }

    .fragments-grid .story-block,
    .fragments-grid .star-block {
        margin-top: 0;
        margin-bottom: 0;
    }

    .star-block {
        width: 150px;
        height: 150px;
    }

    .tags-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding-left: 5vw;
        padding-top: 20vh;
    }

    .final-block {
        width: 92vw;
        padding: 2.5rem;
    }

    .starfield-whisper {
        white-space: normal;
        text-align: center;
        width: 90%;
    }

    .crescent-copper {
        display: none;
    }
}
