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

:root {
    --coal: #2a2420;
    --cream: #faf3ea;
    --sky-blue: #8eb8d4;
    --warm-white: #f0ebe4;
    --terracotta: #e8845a;
    --dark-brown: #3a3028;
    --moss: #6b8f5c;
    --burnt-orange: #c45a2c;
    --soft-tan: #e8d5c4;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--cream);
    color: var(--dark-brown);
    overflow-x: hidden;
    position: relative;
}

/* === BUBBLES === */
#bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(142, 184, 212, 0.3), rgba(142, 184, 212, 0.05));
    border: 1px solid rgba(142, 184, 212, 0.2);
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(var(--drift)) scale(0.8);
        opacity: 0;
    }
}

/* === STRATA / SECTIONS === */
.stratum {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

/* === HERO (Stratum 1 — Pavement) === */
#hero {
    background-color: var(--dark-brown);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(250, 243, 234, 0.02) 2px,
            rgba(250, 243, 234, 0.02) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(250, 243, 234, 0.015) 2px,
            rgba(250, 243, 234, 0.015) 4px
        );
    color: var(--cream);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--cream);
    text-shadow: 0 0 40px rgba(232, 132, 90, 0.3);
}

.hero-subtitle {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--soft-tan);
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--terracotta);
    opacity: 0.8;
    font-style: italic;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    animation: bob 2s ease-in-out infinite;
}

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

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

@keyframes scroll-pulse {
    0%, 100% { cy: 10; }
    50% { cy: 24; }
}

/* === STREET (Stratum 2) === */
#street {
    background: linear-gradient(180deg, var(--warm-white) 0%, var(--cream) 100%);
}

.section-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.section-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    color: var(--dark-brown);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.section-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: var(--coal);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

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

.crack-illustration {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#crack-svg {
    width: 100%;
    height: auto;
}

.crack-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 2s ease;
}

.crack-line.animate {
    stroke-dashoffset: 0;
}

.sprout {
    transition: opacity 0.6s ease;
}

.sprout.grow {
    opacity: 1 !important;
    animation: sprout-grow 0.8s ease forwards;
}

@keyframes sprout-grow {
    0% { transform: scaleY(0); transform-origin: bottom; }
    100% { transform: scaleY(1); transform-origin: bottom; }
}

/* === BALCONIES (Stratum 3) === */
#balconies {
    background: linear-gradient(180deg, var(--cream) 0%, rgba(142, 184, 212, 0.1) 100%);
}

.garden-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 500px;
    width: 100%;
}

.garden-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(250, 243, 234, 0.8);
    border: 1px solid rgba(58, 48, 40, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.garden-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.garden-card:hover {
    box-shadow: 0 8px 24px rgba(58, 48, 40, 0.1);
    transform: translateY(-4px);
}

.plant-icon {
    width: 60px;
    height: 60px;
}

.plant-icon svg {
    width: 100%;
    height: 100%;
}

.garden-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--dark-brown);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

/* === SKY (Stratum 4) === */
#sky {
    background: linear-gradient(180deg, rgba(142, 184, 212, 0.15) 0%, var(--sky-blue) 100%);
    color: var(--cream);
}

#sky .section-title {
    color: var(--cream);
}

#sky .section-text {
    color: var(--warm-white);
}

.kanji-reveal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.kanji-char {
    font-family: 'Zilla Slab', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--cream);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
}

.kanji-char.visible {
    opacity: 1;
    transform: translateY(0);
}

.kanji-char::after {
    content: attr(data-meaning);
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--soft-tan);
    white-space: nowrap;
}

.kanji-plus, .kanji-equals {
    font-family: 'DM Sans', sans-serif;
    font-size: 2rem;
    color: var(--terracotta);
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.kanji-plus.visible, .kanji-equals.visible {
    opacity: 1;
}

.kanji-result {
    color: var(--terracotta);
    text-shadow: 0 0 30px rgba(232, 132, 90, 0.4);
}

/* === FOOTER === */
#footer {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--coal);
    color: var(--soft-tan);
}

.footer-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--soft-tan);
}

.footer-credit {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--terracotta);
    opacity: 0.7;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .garden-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .kanji-reveal {
        gap: 1rem;
    }
}
