/* recycle.cafe — Street-style environmentalism meets ethereal blue */

:root {
    /* Palette — Ethereal Blue */
    --midnight-indigo: #0f1c3a;
    --deep-twilight: #1a2744;
    --frost-lavender: #e8edf5;
    --ice-whisper: #f0f3fa;
    --storm-ink: #2d3a52;
    --pale-vapor: #c5d0e6;
    --celestial-mid: #6e8cc0;
    --amber-reclaim: #d4913a;
    --terracotta-dust: #c0643b;
    --ethereal-white: #dce4f2;
    --nebula-soft: #253a6b;
    --bright-sky: #4a8ed4;

    /* Typography */
    --font-display: 'Caveat', cursive;
    --font-body: 'Nunito Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--midnight-indigo);
    color: var(--pale-vapor);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scroll Indicators */
#scroll-indicators {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: var(--ethereal-white);
    opacity: 0.3;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    cursor: pointer;
}

.indicator-dot.active {
    opacity: 1;
    transform: scale(1.5);
}

.indicator-dot:hover {
    opacity: 0.8;
    transform: scale(1.3);
}

/* Site Sections */
.site-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--section-bg);
    color: var(--section-text);
}

/* Diagonal clip-paths for sections */
#section-opening {
    clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
    z-index: 6;
}

#section-peel {
    clip-path: polygon(0 4vh, 100% 0, 100% 100%, 0 96vh);
    margin-top: -4vh;
    z-index: 5;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#section-story1 {
    clip-path: polygon(0 0, 100% 3vh, 100% 97%, 0 100%);
    margin-top: -4vh;
    z-index: 4;
}

#section-story2 {
    clip-path: polygon(0 4vh, 100% 0, 100% 96%, 0 100%);
    margin-top: -4vh;
    z-index: 3;
}

#section-story3 {
    clip-path: polygon(0 0, 100% 5vh, 100% 100%, 0 97%);
    margin-top: -5vh;
    z-index: 2;
}

#section-closing {
    clip-path: polygon(0 3vh, 100% 0, 100% 100%, 0 100%);
    margin-top: -3vh;
    z-index: 1;
}

/* Tilt Wrapper */
.tilt-wrapper {
    position: relative;
    z-index: 2;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Opening Section */
.opening-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.display-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--section-text);
    max-width: 16em;
}

.opening-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    line-height: 1.72;
    margin-top: 1.5rem;
    color: var(--celestial-mid);
}

/* Section Titles */
.section-title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.section-dark .section-title {
    color: var(--ice-whisper);
}

.section-light .section-title {
    color: var(--midnight-indigo);
}

/* Body Text */
.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    max-width: 38em;
    margin-bottom: 1.5rem;
}

.section-light .body-text {
    color: var(--storm-ink);
}

.section-dark .body-text {
    color: var(--pale-vapor);
}

/* Accent Text */
.accent-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(0.9rem, 1.3vw, 1.3rem);
    color: var(--celestial-mid);
    font-style: italic;
    margin-top: 0.5rem;
}


/* Peel Section */
.peel-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 4rem 2rem;
}

.outline-word {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(15vw, 25vw, 30vw);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: transparent;
    -webkit-text-stroke: 2px var(--celestial-mid);
    opacity: 0.3;
    user-select: none;
    line-height: 1;
}

/* Story Panels */
.story-panel {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: clamp(4rem, 8vh, 8rem) clamp(2rem, 5vw, 4rem);
    gap: 4rem;
}

.story-text {
    flex: 0 1 55%;
    margin-left: clamp(8vw, 12vw, 16vw);
}

.story-visual {
    flex: 0 1 35%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loop-diagram,
.cycle-diagram,
.constellation-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.constellation-svg {
    max-width: 400px;
}

/* Closing Section */
.closing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.closing-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    line-height: 1.72;
    margin-top: 1rem;
    color: var(--pale-vapor);
}

.closing-tagline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--amber-reclaim);
    margin-top: 3rem;
}

/* Blob Shapes */
.blob {
    position: absolute;
    background: var(--nebula-soft);
    opacity: 0.4;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-morph 20s ease-in-out infinite, blob-drift 20s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: -5%;
    opacity: 0.5;
    animation-duration: 22s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: -3%;
    opacity: 0.35;
    animation-duration: 18s;
    animation-delay: -5s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 40%;
    opacity: 0.25;
    animation-duration: 25s;
    animation-delay: -10s;
}

.blob-4 {
    width: 500px;
    height: 500px;
    top: -10%;
    right: -10%;
    opacity: 0.3;
    animation-duration: 23s;
    animation-delay: -3s;
}

.blob-5 {
    width: 250px;
    height: 250px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    animation-duration: 19s;
    animation-delay: -7s;
    z-index: -1;
}

.blob-6 {
    width: 350px;
    height: 350px;
    bottom: -5%;
    left: -8%;
    opacity: 0.15;
    animation-duration: 21s;
    animation-delay: -2s;
}

.blob-7 {
    width: 450px;
    height: 450px;
    top: -8%;
    left: -5%;
    opacity: 0.35;
    animation-duration: 24s;
    animation-delay: -8s;
}

.blob-8 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    right: 5%;
    opacity: 0.3;
    animation-duration: 17s;
    animation-delay: -4s;
}

.blob-9 {
    width: 380px;
    height: 380px;
    top: 20%;
    right: -10%;
    opacity: 0.12;
    animation-duration: 20s;
    animation-delay: -6s;
}

.blob-10 {
    width: 500px;
    height: 500px;
    top: -15%;
    left: -10%;
    opacity: 0.3;
    animation-duration: 26s;
    animation-delay: -9s;
}

.blob-11 {
    width: 350px;
    height: 350px;
    bottom: -10%;
    right: -5%;
    opacity: 0.25;
    animation-duration: 19s;
    animation-delay: -12s;
}

@keyframes blob-morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 36% 64% / 53% 68% 32% 47%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    75% {
        border-radius: 42% 58% 64% 36% / 32% 47% 53% 68%;
    }
}

@keyframes blob-drift {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -15px);
    }
    50% {
        transform: translate(-10px, 25px);
    }
    75% {
        transform: translate(30px, 10px);
    }
}


/* Stars Layer */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.star {
    will-change: transform, opacity;
}

@keyframes star-pulse {
    0%, 100% {
        transform-origin: center;
        transform: scale(1);
        opacity: var(--star-opacity, 0.5);
    }
    50% {
        transform: scale(1.15);
        opacity: calc(var(--star-opacity, 0.5) * 1.3);
    }
}

.star-pulse {
    animation: star-pulse 5s ease-in-out infinite;
}

/* SVG Draw Path Animation */
.draw-path {
    fill: none;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.draw-path.visible {
    stroke-dashoffset: 0;
}

/* Constellation Path */
.constellation-path {
    fill: none;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 2s cubic-bezier(0.77, 0, 0.175, 1);
}

.constellation-path.visible {
    stroke-dashoffset: 0;
}

/* Reveal Text Animation — Clip-path horizontal wipe */
.reveal-text {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-text.visible {
    clip-path: inset(0 0 0 0);
}

.reveal-text[data-delay='1'] {
    transition-delay: 0.12s;
}

.reveal-text[data-delay='2'] {
    transition-delay: 0.24s;
}

.reveal-text[data-delay='3'] {
    transition-delay: 0.36s;
}

/* Drop shadow on section edges */
#section-peel {
    filter: drop-shadow(0 -2px 8px rgba(15, 28, 58, 0.15));
}

#section-story1 {
    filter: drop-shadow(0 -2px 8px rgba(15, 28, 58, 0.12));
}

#section-story2 {
    filter: drop-shadow(0 -2px 8px rgba(15, 28, 58, 0.15));
}

#section-story3 {
    filter: drop-shadow(0 -2px 8px rgba(15, 28, 58, 0.1));
}

#section-closing {
    filter: drop-shadow(0 -2px 8px rgba(15, 28, 58, 0.15));
}

/* Responsive */
@media (max-width: 768px) {
    .story-panel {
        flex-direction: column;
        padding: 6rem 1.5rem 4rem;
    }

    .story-text {
        margin-left: 0;
        flex: 1;
    }

    .story-visual {
        flex: 1;
        max-width: 250px;
    }

    #scroll-indicators {
        right: 12px;
    }

    .indicator-dot {
        width: 6px;
        height: 6px;
    }

    .outline-word {
        font-size: 20vw;
    }

    .blob {
        transform: scale(0.6);
    }
}

@media (max-width: 480px) {
    .display-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }
}
