:root {
    --bg-primary: #f5f0e8;
    --bg-alternate: #e8ede4;
    --text-primary: #3d3229;
    --text-secondary: #5a5048;
    --accent-rose: #c9a9a0;
    --accent-moss: #8a9e7e;
    --divider: #d4cbc0;
    --hover-celadon: #6b7e63;
    --meta-clay: #9b8e82;
    --kintsugi-gold: #b8a472;
    --mud-dark: #3d3229;
    --mud-light: #5a5048;
    --bg-current: #3d3229;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background-color: var(--bg-current);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.04;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Navigation Pebble */
#nav-pebble {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.4s ease, transform 0.3s ease;
    padding: 0;
}

#nav-pebble:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(2px);
    transition: opacity 0.5s ease;
}

.nav-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.nav-overlay nav {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
}

.nav-link {
    font-family: 'Karla', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--meta-clay);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--hover-celadon);
}

/* Sections */
.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Mud Section */
.section-mud {
    min-height: 100vh;
    background: var(--mud-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seed-pod-container {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.35;
}

.mud-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.domain-title {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--accent-rose);
    margin-bottom: 32px;
}

.haiku {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.haiku p {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.85;
    color: var(--accent-rose);
    opacity: 0.7;
}

.root-system {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 220px;
    opacity: 0.4;
}

.root-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawRoot 4s ease-in-out forwards;
}

.root-path:nth-child(2) { animation-delay: 0.5s; }
.root-path:nth-child(3) { animation-delay: 0.8s; }
.root-path:nth-child(4) { animation-delay: 1.5s; }
.root-path:nth-child(5) { animation-delay: 2s; }

@keyframes drawRoot {
    to { stroke-dashoffset: 0; }
}

/* Water Section */
.section-water {
    min-height: 150vh;
    padding: 20vh 0;
    position: relative;
}

.watercolor-leaf {
    position: absolute;
    width: 45vw;
    max-width: 500px;
    height: auto;
    pointer-events: none;
}

.watercolor-left {
    top: 10%;
    left: -10%;
}

/* Content Islands */
.content-island {
    position: relative;
    max-width: 520px;
    padding: 24px 0;
    margin-bottom: 15vh;
    z-index: 2;
}

.island-left {
    margin-left: 8%;
    margin-right: auto;
}

.island-right {
    margin-left: auto;
    margin-right: 12%;
}

.island-center {
    margin-left: 18%;
    margin-right: auto;
}

/* Reveal animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
.section-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.85;
    color: var(--text-secondary);
}

.body-text em {
    font-style: italic;
    color: var(--text-primary);
}

.item-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.meta-label {
    display: inline-block;
    font-family: 'Karla', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--meta-clay);
    margin-top: 16px;
}

/* Ghost Botanicals */
.ghost-botanical {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.botanical-1 {
    right: 8%;
    top: 60%;
    transform: rotate(12deg);
}

.botanical-2 {
    left: 5%;
    bottom: 10%;
    transform: rotate(-5deg);
}

.botanical-3 {
    right: 6%;
    top: 55%;
    transform: rotate(7deg);
}

.botanical-4 {
    left: 12%;
    bottom: 15%;
    transform: rotate(-12deg);
}

/* Surface Section */
.section-surface {
    min-height: 150vh;
    padding: 20vh 0;
    position: relative;
}

.lotus-stem {
    position: absolute;
    right: 5%;
    top: 0;
    height: 100%;
    width: 40px;
    pointer-events: none;
    z-index: 1;
}

.stem-draw {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.stem-draw-leaf {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

/* Kintsugi Rule */
.kintsugi-container {
    width: 80%;
    max-width: 600px;
    margin: 10vh auto;
    position: relative;
    z-index: 2;
}

.kintsugi-rule {
    width: 100%;
    height: auto;
}

.kintsugi-draw {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.5s ease;
}

.kintsugi-draw.drawn {
    stroke-dashoffset: 0;
}

/* Bloom Section */
.section-bloom {
    min-height: 150vh;
    padding: 20vh 0;
    position: relative;
}

.watercolor-bloom {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    max-width: 800px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.enso-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    max-width: 300px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.enso-draw {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 5s ease;
}

.enso-draw.drawn {
    stroke-dashoffset: 0;
}

/* Silence Section */
.section-silence {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40vh;
    position: relative;
}

.silence-text {
    text-align: center;
    padding: 0 20px;
}

.closing-thought {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.85;
    color: var(--meta-clay);
}

/* Mud section text colors */
.section-mud .section-heading,
.section-mud .body-text {
    color: var(--accent-rose);
}

/* Water section text transitions */
.section-water .section-heading,
.section-water .body-text {
    color: var(--text-secondary);
}

.section-water .section-heading {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .content-island {
        max-width: 90%;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
    
    .kintsugi-container {
        width: 90%;
    }
    
    .lotus-stem {
        right: 2%;
    }
    
    .watercolor-bloom {
        width: 90vw;
    }
    
    .enso-svg {
        width: 60vw;
    }
    
    .ghost-botanical {
        display: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .root-path {
        animation: none;
        stroke-dashoffset: 0;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .stem-draw,
    .stem-draw-leaf {
        stroke-dashoffset: 0;
    }
    
    .enso-draw,
    .kintsugi-draw {
        stroke-dashoffset: 0;
    }
}