/* muhan.ai — Infinite Softness */

:root {
    --kiln-cream: #f5efe6;
    --rice-paper: #ede5d8;
    --baked-terracotta: #c2703e;
    --burnt-umber: #7a4b2a;
    --beeswax-gold: #d4a24e;
    --charcoal-earth: #2d2319;
    --candle-amber: #f0c87a;
    --clay-dust: #d9cfc0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--kiln-cream);
    font-family: 'Varela Round', sans-serif;
    color: var(--burnt-umber);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    /* Grain texture */
    background-image: radial-gradient(circle, rgba(45,35,25,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Bokeh Layer */
#bokeh-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240,200,122,0.15) 0%, rgba(240,200,122,0) 70%);
    mix-blend-mode: screen;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Navigation Pebble */
#nav-pebble {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 100;
}

.pebble-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rice-paper);
    box-shadow:
        0 4px 12px rgba(45,35,25,0.08),
        0 8px 24px rgba(194,112,62,0.04),
        inset 0 1px 2px rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    transform: perspective(800px) rotateX(1deg) rotateY(-0.5deg);
}

.pebble-button:hover {
    width: 56px;
    height: 56px;
    box-shadow:
        0 4px 12px rgba(45,35,25,0.08),
        0 8px 24px rgba(194,112,62,0.04),
        0 0 20px rgba(212,162,78,0.3);
}

.nav-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#nav-pebble:hover .nav-menu {
    opacity: 1;
    pointer-events: all;
}

.nav-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rice-paper);
    box-shadow:
        0 2px 8px rgba(45,35,25,0.08),
        0 4px 16px rgba(194,112,62,0.04);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: scale(0.8);
}

#nav-pebble:hover .nav-dot {
    transform: scale(1);
}

.nav-dot:hover {
    box-shadow:
        0 2px 8px rgba(45,35,25,0.08),
        0 0 16px rgba(212,162,78,0.25);
}

/* Breathing Zones */
.breathing-zone {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 80px 5vw;
}

.zone-glow {
    min-height: 100vh;
}

.zone-form {
    min-height: 110vh;
}

.zone-warmth {
    min-height: 100vh;
}

.zone-drift {
    min-height: 120vh;
}

.zone-settling {
    min-height: 90vh;
}

.zone-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* Typography */
h1, h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--baked-terracotta);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    text-align: center;
    animation: flicker 4s ease-in-out infinite;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 1rem;
    animation: flicker 6s ease-in-out infinite;
}

.hero-subtitle {
    font-family: 'Varela Round', sans-serif;
    color: var(--burnt-umber);
    opacity: 0.7;
    text-align: center;
    margin-top: 1rem;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.closing-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    text-align: center;
    color: var(--burnt-umber);
}

p {
    max-width: 62ch;
    margin-bottom: 1em;
}

/* Flicker Animation */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.88; }
}

/* Inflated Containers */
.inflated-container {
    background: var(--rice-paper);
    border-radius: 36px;
    padding: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    box-shadow:
        0 4px 12px rgba(45,35,25,0.08),
        0 12px 36px rgba(45,35,25,0.05),
        0 24px 60px rgba(194,112,62,0.04),
        inset 0 1px 2px rgba(255,255,255,0.5);
    transform: perspective(800px) rotateX(1deg) rotateY(-0.5deg);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0), box-shadow 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.inflated-container:hover {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(0.985);
    box-shadow:
        0 4px 16px rgba(45,35,25,0.06),
        0 12px 48px rgba(45,35,25,0.04),
        0 24px 80px rgba(194,112,62,0.03),
        inset 0 1px 2px rgba(255,255,255,0.5);
}

/* Warm Halo */
.warm-halo {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240,200,122,0.08) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

.halo-pulse {
    animation: haloPulse 8s ease-in-out infinite;
}

@keyframes haloPulse {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.10; }
}

/* Zone 1 — Hero */
.zone-glow .zone-content {
    text-align: center;
}

#hero-title {
    opacity: 0;
}

#hero-subtitle {
    opacity: 0;
}

/* Zone 2 — Form Layout */
.zone-form-layout {
    display: flex;
    gap: 3vw;
    align-items: center;
    flex-wrap: wrap;
}

.container-left {
    flex: 0 1 58%;
    min-width: 300px;
}

.container-right {
    flex: 0 1 34%;
    min-width: 250px;
    margin-top: 60px;
}

/* Zone 3 — Warmth */
.zone-warmth .zone-content {
    display: flex;
    justify-content: center;
}

.container-center {
    width: 80%;
    max-width: 900px;
    border-radius: 48px;
    box-shadow:
        0 4px 12px rgba(45,35,25,0.08),
        0 12px 36px rgba(45,35,25,0.06),
        0 24px 60px rgba(194,112,62,0.05),
        0 48px 100px rgba(45,35,25,0.03),
        inset 0 1px 3px rgba(255,255,255,0.5);
}

.container-center .warm-halo {
    background: radial-gradient(circle, rgba(240,200,122,0.12) 0%, transparent 70%);
    filter: blur(80px);
}

/* Zone 4 — Drift Layout */
.zone-drift-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3vw;
    align-items: flex-start;
}

.container-drift {
    flex: 0 1 30%;
    min-width: 260px;
}

.container-drift-1 {
    margin-top: 0;
    transform: rotate(1deg);
}

.container-drift-2 {
    margin-top: 60px;
    transform: rotate(-1.5deg);
}

.container-drift-3 {
    margin-top: 30px;
    transform: rotate(0.5deg);
}

/* Zone 5 — Settling */
.zone-settling .zone-content {
    display: flex;
    justify-content: center;
}

.container-final {
    width: 70%;
    max-width: 800px;
    text-align: center;
    border-radius: 48px;
    padding: clamp(3rem, 5vw, 5rem);
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) perspective(800px) rotateX(1deg) rotateY(-0.5deg) scale(0.95);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0) perspective(800px) rotateX(1deg) rotateY(-0.5deg) scale(1);
}

/* Wave Dividers */
.wave-divider {
    position: relative;
    z-index: 2;
    height: 60px;
    margin: -30px 0;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
}

/* Hero breathing animation */
@keyframes heroBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.005); }
}

.hero-title.animate {
    animation: heroBreathe 6s ease-in-out infinite;
}

/* Typewriter character spans */
.char-span {
    display: inline-block;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 120ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 120ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.char-span.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .zone-form-layout {
        flex-direction: column;
    }
    .container-left, .container-right {
        flex: 1 1 100%;
    }
    .container-right {
        margin-top: 2rem;
    }
    .zone-drift-layout {
        flex-direction: column;
        align-items: center;
    }
    .container-drift {
        flex: 1 1 100%;
        max-width: 400px;
    }
    .container-drift-2 {
        margin-top: 2rem;
    }
    .container-drift-3 {
        margin-top: 2rem;
    }
    .container-center, .container-final {
        width: 95%;
    }
}
