/* recycle.cafe — Cinematic Editorial Styles */

:root {
    --color-bone: #f8f5f0;
    --color-warm-gray: #e8e4dc;
    --color-mid-gray: #c2bdb5;
    --color-forest: #4a8c6f;
    --color-green-bright: #00e676;
    --color-lime: #b2ff59;
    --color-near-black: #0d0d0d;
    --color-dark: #1a1a1e;
    --font-display: 'Playfair Display', serif;
    --font-body: 'Source Serif 4', serif;
    --font-ui: 'DM Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-bone);
    color: var(--color-near-black);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Act sections */
.act {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Act I — The Frame */
#act-one {
    background: var(--color-bone);
    flex-direction: column;
}

.act-one-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.skyline.visible {
    opacity: 1;
}

.building {
    fill: none;
    stroke: var(--color-near-black);
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-in-out;
}

.skyline.visible .building {
    stroke-dashoffset: 0;
}

.recycle-arrow {
    fill: none;
    stroke: var(--color-forest);
    stroke-width: 2;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2.5s ease-in-out 1s;
}

.skyline.visible .recycle-arrow {
    stroke-dashoffset: 0;
}

.conveyor {
    stroke: var(--color-lime);
    stroke-width: 2;
    stroke-dasharray: 8 4;
    animation: conveyorMove 2s linear infinite paused;
}

.skyline.visible .conveyor {
    animation-play-state: running;
}

@keyframes conveyorMove {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -24; }
}

.main-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--color-near-black);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 1.2s, transform 0.8s ease 1.2s;
}

.skyline.visible ~ .main-title,
.act-one-content.active .main-title {
    opacity: 1;
    transform: translateY(0);
}

.tagline {
    font-family: var(--font-ui);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 400;
    color: var(--color-mid-gray);
    margin-top: 0.8rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease 1.6s, transform 0.8s ease 1.6s;
}

.act-one-content.active .tagline {
    opacity: 1;
    transform: translateY(0);
}

/* Act II — The Manifesto */
#act-two {
    background: var(--color-bone);
    align-items: flex-start;
    padding: 10vh 0;
}

.editorial-column {
    margin-left: 12vw;
    max-width: 540px;
    position: relative;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--color-near-black);
    margin-top: 4rem;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title.revealed {
    opacity: 1;
    transform: translateY(0);
}

.body-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.7;
    color: var(--color-dark);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.body-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.margin-note {
    position: absolute;
    right: -120px;
    width: 80px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.margin-note.right {
    left: -120px;
    right: auto;
    transform: translateX(10px);
}

.margin-note.revealed {
    opacity: 1;
    transform: translateX(0);
}

.margin-illustration {
    width: 100%;
    height: auto;
}

.recycle-circle {
    fill: none;
    stroke: var(--color-forest);
    stroke-width: 2;
}

.inner-circle {
    fill: none;
    stroke: var(--color-lime);
    stroke-width: 1.5;
}

.arrow-up {
    fill: none;
    stroke: var(--color-green-bright);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Act III — The Resolution */
#act-three {
    background: var(--color-dark);
    flex-direction: column;
}

.act-three-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skyline-final {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
}

.building-final {
    fill: var(--color-near-black);
    stroke: var(--color-forest);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

#act-three.revealed .building-final {
    opacity: 1;
}

.glow-dot {
    fill: var(--color-lime);
    opacity: 0;
    animation: pulse 2s ease-in-out infinite;
}

#act-three.revealed .glow-dot {
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; r: 6; }
    50% { opacity: 1; r: 10; }
}

.closing-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--color-bone);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#act-three.revealed .closing-title {
    opacity: 1;
    transform: translateY(0);
}

.closing-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.7;
    color: var(--color-mid-gray);
    margin-top: 1rem;
    max-width: 480px;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

#act-three.revealed .closing-text {
    opacity: 1;
}

.cta-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
}

#act-three.revealed .cta-area {
    opacity: 1;
}

.cta-label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-lime);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cta-arrow {
    width: 40px;
    height: 40px;
    color: var(--color-lime);
    transition: transform 0.3s ease;
}

.cta-area:hover .cta-arrow {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .editorial-column {
        margin-left: 6vw;
        margin-right: 6vw;
        max-width: 100%;
    }
    .margin-note {
        display: none;
    }
}
