/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --apricot: #f2c6a5;
    --lavender: #b8a9d4;
    --lichen: #7eb8a2;
    --sky: #b8c9d6;
    --mist: #e3dfe8;
    --charcoal: #1e1e2a;
    --graphite: #2d3142;
    --parchment: #f4f0eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--graphite);
    background-color: var(--parchment);
    overflow-x: hidden;
}

/* ===== GRID PAPER BACKGROUND ===== */
#grid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--mist) 1px, transparent 1px),
        linear-gradient(90deg, var(--mist) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
}

/* ===== PROGRESS BAR ===== */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
    background: rgba(228, 223, 232, 0.3);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--lichen), var(--lavender));
    transition: width 0.1s linear;
}

/* ===== CARBON COUNTER ===== */
#carbon-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    background: rgba(244, 240, 235, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(184, 169, 212, 0.3);
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    box-shadow: 0 4px 20px rgba(30, 30, 42, 0.06);
}

#carbon-value {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--lichen);
}

#carbon-unit {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--graphite);
    opacity: 0.6;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-icon {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.3s forwards;
}

#hero h1 {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 4rem;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.5s forwards;
}

#hero h1 .dot {
    color: var(--lichen);
}

.tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--lavender);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.7s forwards;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--graphite);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.9s forwards;
}

.scroll-hint {
    margin-top: 24px;
    opacity: 0;
    animation: fadeUp 1s ease 1.1s forwards;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
    0%, 100% { cy: 10; }
    50% { cy: 26; }
}

/* ===== TIMELINE CONTAINER ===== */
#timeline-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px 120px;
}

/* ===== SPINE ===== */
#spine-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    z-index: 0;
}

#spine-line {
    width: 100%;
    height: 100%;
}

/* ===== TIMELINE NODE ===== */
.timeline-node {
    position: relative;
    width: 50%;
    padding: 30px 40px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-node.left {
    margin-right: auto;
    text-align: right;
    padding-right: 60px;
}

.timeline-node.right {
    margin-left: auto;
    text-align: left;
    padding-left: 60px;
}

/* ===== NODE DOT ===== */
.node-dot {
    position: absolute;
    top: 50px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--parchment);
    border: 3px solid var(--lichen);
    z-index: 2;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.timeline-node.left .node-dot {
    right: -8px;
}

.timeline-node.right .node-dot {
    left: -8px;
}

.timeline-node.visible .node-dot {
    background: var(--lichen);
    box-shadow: 0 0 12px rgba(126, 184, 162, 0.5);
}

/* ===== GLASS CARD ===== */
.glass-card {
    position: relative;
    background: rgba(244, 240, 235, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(184, 169, 212, 0.25);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(30, 30, 42, 0.06);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(30, 30, 42, 0.1);
}

.season-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lichen);
    background: rgba(126, 184, 162, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.glass-card h2 {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--charcoal);
    margin-bottom: 12px;
    line-height: 1.3;
}

.glass-card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--graphite);
    opacity: 0.85;
}

.card-metric {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(184, 169, 212, 0.2);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.timeline-node.left .card-metric {
    justify-content: flex-end;
}

.metric-value {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--lichen);
}

.metric-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--graphite);
    opacity: 0.5;
}

.leaf-motif {
    position: absolute;
    bottom: 12px;
    opacity: 0.6;
}

.timeline-node.left .leaf-motif {
    left: 16px;
}

.timeline-node.right .leaf-motif {
    right: 16px;
}

/* ===== INTERSTITIAL BREATHING PANELS ===== */
.interstitial {
    position: relative;
    z-index: 1;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 40px;
    overflow: hidden;
}

.interstitial-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.duotone-green {
    background: linear-gradient(135deg, var(--graphite) 0%, var(--lichen) 100%);
}

.duotone-green .interstitial-overlay {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(126, 184, 162, 0.05) 3px,
        rgba(126, 184, 162, 0.05) 4px
    );
}

.duotone-peach {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--apricot) 100%);
}

.duotone-peach .interstitial-overlay {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(242, 198, 165, 0.05) 3px,
        rgba(242, 198, 165, 0.05) 4px
    );
}

.interstitial-text {
    position: relative;
    z-index: 2;
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: var(--parchment);
    text-align: center;
    line-height: 1.6;
    max-width: 600px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* ===== FOOTER ===== */
#footer {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
    text-align: center;
}

.footer-glass {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(244, 240, 235, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(184, 169, 212, 0.25);
    border-radius: 20px;
    padding: 48px 32px;
}

.footer-leaf {
    margin-bottom: 16px;
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--graphite);
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    #timeline-container {
        max-width: 100%;
        padding: 40px 16px 80px;
    }

    .timeline-node {
        width: 90%;
        margin-left: 10% !important;
        margin-right: 0 !important;
        text-align: left !important;
        padding-left: 40px !important;
        padding-right: 16px !important;
    }

    #spine-wrapper {
        left: 5%;
        transform: none;
    }

    .node-dot {
        left: -8px !important;
        right: auto !important;
    }

    .timeline-node.left .card-metric {
        justify-content: flex-start;
    }

    .timeline-node.left .leaf-motif {
        left: auto;
        right: 16px;
    }

    .interstitial-text {
        font-size: 1.4rem;
    }

    .interstitial {
        min-height: 60vh;
    }

    #carbon-counter {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
    }

    #carbon-value {
        font-size: 1.1rem;
    }
}
