/* ========================================================================
   recycle.makeup — Pop-art cosmetics recycling
   Palette: Blush #F8D8D8, Cream Peach #FFF0E8, Lavender #E8D8F0,
            Coral Pop #F07070, Mint Fresh #88D8B8, Charcoal #2C2C2C,
            Leather Tan #C8A880
   Fonts:   Syne (display), Lexend (body), Sacramento (script)

   Behaviors implemented in script.js:
   - Intersection Observer triggers typewrite on scroll-enter.
   - Hero wordmark typewriter on load (90ms/char).
   - Card pop-in on scroll-enter via Intersection Observer.
   ======================================================================== */

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

:root {
    --blush: #F8D8D8;
    --cream-peach: #FFF0E8;
    --lavender: #E8D8F0;
    --coral: #F07070;
    --mint: #88D8B8;
    --charcoal: #2C2C2C;
    --leather: #C8A880;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--cream-peach);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ----------------------- Halftone overlay (Ben-Day) -------------------- */
.halftone-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: radial-gradient(circle, var(--charcoal) 1px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.04;
}

/* ----------------------- Tropical fish tank ---------------------------- */
.fish-tank {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.fish {
    position: absolute;
    width: 60px;
    height: 30px;
    opacity: 0.85;
    filter: drop-shadow(0 1px 2px rgba(44, 44, 44, 0.15));
}

.fish-1 {
    top: 18%;
    animation: swim-right 28s linear infinite;
}

.fish-2 {
    top: 38%;
    animation: swim-left 34s linear infinite;
    animation-delay: -4s;
}

.fish-3 {
    top: 58%;
    animation: swim-right 40s linear infinite;
    animation-delay: -12s;
}

.fish-4 {
    top: 72%;
    animation: swim-left 31s linear infinite;
    animation-delay: -8s;
}

.fish-5 {
    top: 88%;
    animation: swim-right 36s linear infinite;
    animation-delay: -16s;
}

@keyframes swim-right {
    0% {
        transform: translateX(-80px) translateY(0);
    }
    25% {
        transform: translateX(25vw) translateY(-12px);
    }
    50% {
        transform: translateX(50vw) translateY(8px);
    }
    75% {
        transform: translateX(75vw) translateY(-6px);
    }
    100% {
        transform: translateX(110vw) translateY(0);
    }
}

@keyframes swim-left {
    0% {
        transform: translateX(110vw) translateY(0) scaleX(-1);
    }
    25% {
        transform: translateX(75vw) translateY(10px) scaleX(-1);
    }
    50% {
        transform: translateX(50vw) translateY(-8px) scaleX(-1);
    }
    75% {
        transform: translateX(25vw) translateY(6px) scaleX(-1);
    }
    100% {
        transform: translateX(-80px) translateY(0) scaleX(-1);
    }
}

/* ----------------------- Vanity Mirror Opening ------------------------- */
.vanity-mirror {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: linear-gradient(135deg, var(--cream-peach) 0%, var(--blush) 50%, var(--lavender) 100%);
}

.mirror-frame {
    max-width: 1100px;
    width: 100%;
    text-align: center;
    position: relative;
    padding: 60px 40px;
    border: 4px solid var(--charcoal);
    border-radius: 240px / 320px;
    background: rgba(255, 240, 232, 0.4);
    backdrop-filter: blur(2px);
    box-shadow: 0 12px 0 var(--charcoal), inset 0 0 0 8px var(--cream-peach), inset 0 0 0 10px var(--charcoal);
}

.wordmark-row {
    margin-bottom: 32px;
}

.wordmark {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(40px, 8vw, 96px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    display: inline-flex;
    align-items: baseline;
}

.wm-text::before {
    content: attr(data-typed);
}

.wm-cursor {
    display: inline-block;
    color: var(--coral);
    margin-left: 0.05em;
    animation: blink 0.8s steps(2, end) infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.tagline {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(16px, 1.8vw, 21px);
    line-height: 1.6;
    margin: 32px auto 40px;
    max-width: 640px;
    color: var(--charcoal);
}

.script-accent {
    font-family: 'Sacramento', cursive;
    font-size: 1.4em;
    color: var(--coral);
    line-height: 1.1;
}

.hero-icons {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin: 30px 0 36px;
    flex-wrap: wrap;
}

.hero-icons svg {
    width: 70px;
    height: 90px;
}

.lip-icon {
    animation: bob 3.6s ease-in-out infinite;
}

.compact-icon {
    width: 90px !important;
    height: 70px !important;
    animation: bob 3.6s ease-in-out infinite;
    animation-delay: -1.2s;
}

.bottle-icon {
    animation: bob 3.6s ease-in-out infinite;
    animation-delay: -2.4s;
}

@keyframes bob {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

.scroll-cue {
    display: inline-block;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--charcoal);
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid var(--charcoal);
    border-radius: 30px;
    background: var(--mint);
    box-shadow: 4px 4px 0 var(--charcoal);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.04em;
}

.scroll-cue:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--charcoal);
}

.cue-arrow {
    display: inline-block;
    font-weight: 700;
    margin-left: 6px;
    animation: bob 1.6s ease-in-out infinite;
}

/* ----------------------- Beauty Card Grid ------------------------------ */
.card-section {
    position: relative;
    z-index: 3;
    padding: 100px 32px 120px;
    background: var(--cream-peach);
}

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 64px;
}

.typewriter {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 4.5vw, 56px);
    line-height: 1.1;
    color: var(--charcoal);
    letter-spacing: -0.01em;
    display: inline-block;
    position: relative;
}

.typewriter::after {
    content: '|';
    color: var(--coral);
    margin-left: 0.05em;
    animation: blink 0.8s steps(2, end) infinite;
    opacity: 0;
}

.typewriter.is-typing::after,
.typewriter.is-done::after {
    opacity: 1;
}

.section-sub {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(15px, 1.5vw, 18px);
    color: var(--charcoal);
    margin-top: 16px;
    line-height: 1.7;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.beauty-card {
    --rot: 0deg;
    --bg: var(--blush);
    background: var(--bg);
    border: 2px solid var(--charcoal);
    border-radius: 8px;
    padding: 24px 22px 22px;
    position: relative;
    transform: rotate(var(--rot));
    box-shadow: 6px 6px 0 var(--charcoal);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    overflow: hidden;
}

.beauty-card:hover {
    transform: rotate(0deg) translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--charcoal);
}

.beauty-card.in-view {
    animation: card-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes card-pop {
    0% {
        opacity: 0;
        transform: rotate(var(--rot)) scale(0.92) translateY(16px);
    }
    100% {
        opacity: 1;
        transform: rotate(var(--rot)) scale(1) translateY(0);
    }
}

/* Leather-texture strip via layered radial gradients */
.leather-strip {
    height: 8px;
    margin: -24px -22px 16px;
    background-color: var(--leather);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(44, 44, 44, 0.25) 1.2px, transparent 1.6px),
        radial-gradient(circle at 60% 50%, rgba(44, 44, 44, 0.18) 1px, transparent 1.4px),
        radial-gradient(circle at 90% 30%, rgba(44, 44, 44, 0.22) 1.1px, transparent 1.5px),
        radial-gradient(circle at 35% 80%, rgba(255, 240, 232, 0.4) 1px, transparent 1.4px),
        radial-gradient(circle at 75% 70%, rgba(255, 240, 232, 0.5) 1.2px, transparent 1.6px),
        linear-gradient(180deg, rgba(44, 44, 44, 0.2), transparent 60%);
    background-size: 5px 5px, 4px 4px, 6px 6px, 5px 5px, 4px 4px, 100% 100%;
    border-bottom: 2px solid var(--charcoal);
}

.card-num {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--coral);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-body {
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: var(--charcoal);
    margin-bottom: 18px;
}

.card-tag {
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    padding: 6px 12px;
    border: 1.5px solid var(--charcoal);
    border-radius: 20px;
    background: var(--cream-peach);
    color: var(--charcoal);
}

/* ----------------------- Tropical Ocean Section ------------------------ */
.ocean-section {
    position: relative;
    z-index: 3;
    padding: 110px 32px 130px;
    background: linear-gradient(180deg, var(--cream-peach) 0%, var(--lavender) 50%, var(--blush) 100%);
    overflow: hidden;
}

.ocean-waves {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse 800px 120px at 20% 30%, rgba(136, 216, 184, 0.25), transparent),
        radial-gradient(ellipse 700px 100px at 80% 60%, rgba(240, 112, 112, 0.18), transparent),
        radial-gradient(ellipse 900px 140px at 40% 85%, rgba(232, 216, 240, 0.4), transparent);
    opacity: 0.85;
}

.ocean-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.ocean-section .typewriter {
    margin-bottom: 28px;
}

.ocean-lead {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 60px;
    color: var(--charcoal);
}

.ocean-lead .script-accent {
    display: block;
    margin-top: 18px;
    font-size: 1.6em;
}

.ocean-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 60px 0;
}

.ocean-stat {
    background: var(--cream-peach);
    border: 2px solid var(--charcoal);
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 5px 5px 0 var(--charcoal);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ocean-stat:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--charcoal);
}

.ocean-num {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1;
    color: var(--coral);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.unit {
    font-family: 'Sacramento', cursive;
    font-size: 0.45em;
    color: var(--charcoal);
    margin-left: 8px;
    font-weight: 400;
    letter-spacing: 0;
}

.ocean-label {
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--charcoal);
    text-align: left;
}

.reef-quote {
    position: relative;
    background: var(--mint);
    border: 2px solid var(--charcoal);
    border-radius: 12px;
    padding: 40px 50px 32px;
    max-width: 760px;
    margin: 60px auto 0;
    box-shadow: 6px 6px 0 var(--charcoal);
    font-family: 'Lexend', sans-serif;
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 500;
    line-height: 1.6;
    text-align: left;
    color: var(--charcoal);
}

.quote-script {
    font-family: 'Sacramento', cursive;
    color: var(--coral);
    font-size: 2em;
    line-height: 0;
    vertical-align: -0.2em;
    margin: 0 0.1em;
}

.reef-quote cite {
    display: block;
    margin-top: 16px;
    font-family: 'Sacramento', cursive;
    font-style: normal;
    font-size: 1.4em;
    color: var(--charcoal);
    text-align: right;
}

/* ----------------------- Compact Footer -------------------------------- */
.compact-footer {
    position: relative;
    z-index: 3;
    background: var(--blush);
    padding: 80px 32px 60px;
    border-top: 4px solid var(--charcoal);
}

.compact-shell {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.compact-mirror {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--cream-peach) 0%, var(--lavender) 60%, var(--blush) 100%);
    border: 4px solid var(--charcoal);
    box-shadow: 0 8px 0 var(--charcoal), inset 0 0 0 6px var(--cream-peach), inset 0 0 0 8px var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mirror-glint {
    position: absolute;
    width: 60px;
    height: 100px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.6), transparent 70%);
    top: 12%;
    left: 18%;
    transform: rotate(-30deg);
    border-radius: 50%;
    pointer-events: none;
}

.mirror-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.06em;
}

.mirror-nav a {
    color: var(--charcoal);
    text-decoration: none;
    padding: 4px 16px;
    border-radius: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    text-transform: lowercase;
}

.mirror-nav a:hover,
.mirror-nav a.is-active {
    background: var(--coral);
    color: var(--cream-peach);
}

.compact-meta {
    text-align: center;
    max-width: 560px;
}

.meta-line {
    font-size: 1.2em;
    margin-bottom: 8px;
}

.meta-line .script-accent {
    font-size: 2.2em;
    line-height: 1;
}

.meta-fine {
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    color: var(--charcoal);
    line-height: 1.6;
    margin-top: 6px;
}

.meta-tiny {
    font-size: 12px;
    opacity: 0.7;
    letter-spacing: 0.04em;
    margin-top: 12px;
}

/* ----------------------- Responsive ------------------------------------ */
@media (max-width: 920px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ocean-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .mirror-frame {
        padding: 50px 28px;
        border-radius: 80px;
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .beauty-card {
        --rot: 0deg !important;
    }
    .hero-icons {
        gap: 18px;
    }
    .hero-icons svg {
        width: 48px;
        height: 64px;
    }
    .compact-icon {
        width: 64px !important;
        height: 48px !important;
    }
    .compact-mirror {
        width: 220px;
        height: 220px;
    }
    .reef-quote {
        padding: 30px 26px 24px;
    }
    .card-section,
    .ocean-section {
        padding-left: 18px;
        padding-right: 18px;
    }
}
