/* ==========================================================================
   addrenvoy.com — Blobitecture Zen-Contemplative
   Color Palette: Cool Grays + Muted Teal
   Fonts: Righteous (display), Space Grotesk (body)
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --deep-void: #0F1114;
    --charcoal-mantle: #1A1D22;
    --sidebar-fog: #2A2D32;
    --blob-shadow: #3A3F47;
    --quiet-stone: #4A5568;
    --drifting-mist: #6B7580;
    --silver-breath: #8B95A5;
    --cloud-surface: #B0B8C4;
    --frost-membrane: #D1D8E0;
    --zen-white: #EDF0F4;
    --teal-accent: #5B8A8A;

    --font-display: 'Righteous', cursive;
    --font-body: 'Space Grotesk', sans-serif;

    --sidebar-collapsed: 72px;
    --sidebar-expanded: 320px;
    --ease-inflate: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-fade: cubic-bezier(0.4, 0, 0.2, 1);

    --scroll-y: 0;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--deep-void);
    color: var(--cloud-surface);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-collapsed);
    height: 100vh;
    background: rgba(42, 45, 50, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 100;
    transition: width 800ms var(--ease-inflate);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.sidebar:hover {
    width: var(--sidebar-expanded);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 18px;
    gap: 4px;
}

.sidebar-icon {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    width: 100%;
    white-space: nowrap;
}

.blob-icon {
    display: block;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--quiet-stone);
    border-radius: 48% 52% 68% 32% / 62% 44% 56% 38%;
    transition: transform 400ms var(--ease-inflate), background-color 400ms var(--ease-fade);
}

.sidebar-icon:hover .blob-icon {
    transform: scale(1.15);
}

.sidebar-icon.active .blob-icon {
    background: var(--teal-accent);
}

.sidebar-label {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--silver-breath);
    opacity: 0;
    transition: opacity 400ms var(--ease-fade) 200ms;
}

.sidebar:hover .sidebar-label {
    opacity: 1;
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: var(--blob-shadow);
}

.sidebar-active-indicator {
    display: none;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-collapsed);
    width: calc(100vw - var(--sidebar-collapsed));
    position: relative;
}

/* --- Zones (Common) --- */
.zone {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.zone-content {
    position: relative;
    width: 100%;
    padding: clamp(3rem, 8vh, 6rem) clamp(2rem, 6vw, 5rem);
    z-index: 2;
}

/* --- ZONE 1: SURFACE --- */
.zone-surface {
    background-color: var(--deep-void);
    justify-content: center;
    align-items: center;
}

.zone-surface .zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    color: var(--zen-white);
    letter-spacing: -0.03em;
    line-height: 0.92;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 2s var(--ease-fade) 1.5s forwards;
}

.hero-descriptor {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    color: var(--drifting-mist);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: heroFadeIn 2s var(--ease-fade) 2.5s forwards;
}

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

/* --- ZONE 2: DESCENT --- */
.zone-descent {
    background-color: var(--charcoal-mantle);
}

.zone-content-split {
    display: flex;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: flex-start;
    flex-wrap: wrap;
}

.zone-left-third {
    flex: 0 0 33%;
    min-width: 260px;
}

.zone-right-twothirds {
    flex: 1;
    position: relative;
    min-height: 300px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--frost-membrane);
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 300;
    color: var(--cloud-surface);
    line-height: 1.75;
    margin-bottom: 1.2rem;
}

/* --- ZONE 3: STILL WATER --- */
.zone-stillwater {
    background-color: var(--deep-void);
    min-height: 120vh;
}

.zone-stillwater .zone-content {
    min-height: 120vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.wave-interference {
    position: relative;
    width: 100%;
    height: 400px;
}

.wave-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave-layer-bg {
    opacity: 0.6;
}

.wave-layer-fg {
    opacity: 0.9;
}

.whispered-aside {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    color: var(--frost-membrane);
    letter-spacing: -0.01em;
    line-height: 1.05;
    position: absolute;
    bottom: clamp(3rem, 8vh, 6rem);
    right: clamp(2rem, 6vw, 5rem);
    text-align: right;
    opacity: 0.8;
}

/* --- ZONE 4: DEPTH --- */
.zone-depth {
    background-color: var(--sidebar-fog);
}

.zone-content-columns {
    display: flex;
    gap: 5%;
    position: relative;
    flex-wrap: wrap;
}

.zone-column-narrow {
    flex: 0 0 35%;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0.5rem;
}

.zone-column-wide {
    flex: 0 0 55%;
    min-width: 260px;
}

.subsection-label {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--frost-membrane);
}

/* --- ZONE 5: RESONANCE --- */
.zone-resonance {
    background-color: var(--charcoal-mantle);
}

.zone-resonance .zone-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100vh;
    justify-content: center;
}

.resonance-heading {
    margin-bottom: 3rem;
}

.blob-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    max-width: 600px;
}

.blob-grid-item {
    width: 60px;
    height: 60px;
    justify-self: center;
}

/* --- ZONE 6: SEAL --- */
.zone-seal {
    background-color: var(--deep-void);
    min-height: 80vh;
    flex-direction: column;
}

.zone-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
}

.enso-svg {
    width: clamp(150px, 25vw, 250px);
    height: clamp(150px, 25vw, 250px);
    margin-bottom: 2rem;
}

.enso-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: none;
}

.enso-path.animate {
    animation: drawEnso 3s ease-in-out forwards;
}

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

.seal-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--silver-breath);
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.seal-colophon {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--drifting-mist);
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.seal-void {
    height: 20vh;
    background: var(--deep-void);
}

/* --- Blob Entities (Common) --- */
.blob {
    position: absolute;
    border-radius: 48% 52% 68% 32% / 62% 44% 56% 38%;
    pointer-events: none;
}

.blob-drift {
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

/* Surface blobs */
.blob-surface-1 {
    width: 380px;
    height: 360px;
    background: var(--charcoal-mantle);
    opacity: 0.25;
    top: 10%;
    left: -5%;
    border-radius: 42% 58% 65% 35% / 55% 48% 52% 45%;
    animation: blobDrift1 30s ease-in-out infinite alternate;
}

.blob-surface-2 {
    width: 320px;
    height: 340px;
    background: var(--charcoal-mantle);
    opacity: 0.25;
    top: 50%;
    right: -8%;
    border-radius: 55% 45% 38% 62% / 48% 60% 40% 52%;
    animation: blobDrift2 35s ease-in-out infinite alternate;
}

.blob-surface-3 {
    width: 300px;
    height: 310px;
    background: var(--charcoal-mantle);
    opacity: 0.20;
    bottom: 5%;
    left: 30%;
    border-radius: 62% 38% 50% 50% / 45% 55% 45% 55%;
    animation: blobDrift3 25s ease-in-out infinite alternate;
}

/* Descent blobs */
.blob-descent-1 {
    width: 200px;
    height: 220px;
    background: var(--sidebar-fog);
    opacity: 0.35;
    top: 10%;
    left: 10%;
    border-radius: 50% 50% 40% 60% / 60% 42% 58% 40%;
    animation: blobDrift1 28s ease-in-out infinite alternate;
}

.blob-descent-2 {
    width: 260px;
    height: 240px;
    background: var(--blob-shadow);
    opacity: 0.30;
    top: 25%;
    left: 35%;
    border-radius: 44% 56% 62% 38% / 52% 46% 54% 48%;
    animation: blobDrift2 32s ease-in-out infinite alternate;
}

.blob-descent-3 {
    width: 180px;
    height: 190px;
    background: var(--sidebar-fog);
    opacity: 0.25;
    top: 55%;
    left: 60%;
    border-radius: 58% 42% 45% 55% / 40% 60% 40% 60%;
    filter: blur(2px);
    animation: blobDrift3 24s ease-in-out infinite alternate;
}

.blob-descent-4 {
    width: 150px;
    height: 160px;
    background: var(--blob-shadow);
    opacity: 0.20;
    top: 65%;
    left: 20%;
    border-radius: 52% 48% 55% 45% / 62% 38% 62% 38%;
    filter: blur(2px);
    animation: blobDrift1 36s ease-in-out infinite alternate;
}

/* Depth pebble blobs */
.blob-pebble {
    box-shadow: 0 8px 32px rgba(15, 17, 20, 0.6);
    z-index: 1;
}

.blob-depth-1 {
    width: 90px; height: 85px;
    background: var(--blob-shadow);
    opacity: 0.35;
    top: 15%; right: 8%;
    border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
}

.blob-depth-2 {
    width: 110px; height: 100px;
    background: var(--quiet-stone);
    opacity: 0.25;
    top: 30%; right: 25%;
    border-radius: 48% 52% 60% 40% / 55% 45% 55% 45%;
}

.blob-depth-3 {
    width: 80px; height: 80px;
    background: var(--blob-shadow);
    opacity: 0.30;
    bottom: 25%; left: 5%;
    border-radius: 60% 40% 45% 55% / 42% 58% 42% 58%;
}

.blob-depth-4 {
    width: 100px; height: 95px;
    background: var(--quiet-stone);
    opacity: 0.20;
    bottom: 15%; right: 12%;
    border-radius: 52% 48% 58% 42% / 60% 40% 60% 40%;
}

.blob-depth-5 {
    width: 85px; height: 90px;
    background: var(--blob-shadow);
    opacity: 0.25;
    top: 55%; left: 42%;
    border-radius: 45% 55% 52% 48% / 48% 52% 48% 52%;
}

.blob-depth-6 {
    width: 120px; height: 110px;
    background: var(--quiet-stone);
    opacity: 0.18;
    top: 10%; left: 60%;
    border-radius: 50% 50% 42% 58% / 55% 45% 55% 45%;
}

.blob-depth-7 {
    width: 75px; height: 80px;
    background: var(--blob-shadow);
    opacity: 0.28;
    bottom: 40%; right: 35%;
    border-radius: 58% 42% 48% 52% / 42% 58% 42% 58%;
}

.blob-depth-8 {
    width: 95px; height: 88px;
    background: var(--quiet-stone);
    opacity: 0.22;
    bottom: 8%; left: 25%;
    border-radius: 44% 56% 55% 45% / 52% 48% 52% 48%;
}

/* Resonance pulse blobs */
.blob-pulse {
    background: var(--blob-shadow);
    opacity: 0.30;
    border-radius: 50% 50% 44% 56% / 56% 44% 56% 44%;
    position: relative;
}

.blob-pulse.pulsing {
    animation: blobPulse var(--pulse-duration, 6s) ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0s);
}

/* Teal accent blob in one zone */
.blob-descent-2 {
    background: var(--teal-accent);
    opacity: 0.12;
}

/* Spacer blobs */
.blob-spacer-1 {
    width: 200px;
    height: 210px;
    background: var(--charcoal-mantle);
    opacity: 0.20;
    top: 20%;
    left: 40%;
    border-radius: 50% 50% 42% 58% / 58% 42% 58% 42%;
    animation: blobDrift2 40s ease-in-out infinite alternate;
}

.blob-spacer-2 {
    width: 160px;
    height: 170px;
    background: var(--blob-shadow);
    opacity: 0.15;
    top: 30%;
    right: 20%;
    border-radius: 55% 45% 48% 52% / 42% 58% 42% 58%;
    animation: blobDrift3 35s ease-in-out infinite alternate;
}

.blob-spacer-3 {
    width: 180px;
    height: 185px;
    background: var(--charcoal-mantle);
    opacity: 0.18;
    top: 25%;
    left: 25%;
    border-radius: 48% 52% 55% 45% / 55% 45% 55% 45%;
    animation: blobDrift1 38s ease-in-out infinite alternate;
}

/* --- Blob Drift Keyframes --- */
@keyframes blobDrift1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, -15px); }
}

@keyframes blobDrift2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-25px, 10px); }
}

@keyframes blobDrift3 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(15px, 25px); }
}

@keyframes blobPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* --- Wave Dividers --- */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}

.wave-divider-1 { background: var(--deep-void); }
.wave-divider-2 { background: var(--charcoal-mantle); }
.wave-divider-3 { background: var(--deep-void); }
.wave-divider-4 { background: var(--sidebar-fog); }
.wave-divider-5 { background: var(--charcoal-mantle); }

/* --- Void Spacers --- */
.void-spacer {
    position: relative;
    height: 50vh;
    overflow: hidden;
}

.void-spacer-1 {
    background: var(--charcoal-mantle);
}

.void-spacer-2 {
    background: var(--deep-void);
}

.void-spacer-3 {
    background: var(--charcoal-mantle);
}

/* --- Parallax offsets (controlled via JS custom properties) --- */
.wave-layer-bg {
    transform: translateY(calc(var(--parallax-bg, 0) * 1px));
}

.wave-layer-fg {
    transform: translateY(calc(var(--parallax-fg, 0) * 1px));
}

/* --- Zone entry animations --- */
.zone {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s var(--ease-fade), transform 1.2s var(--ease-fade);
}

.zone.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Surface zone is always visible for the hero animation */
.zone-surface {
    opacity: 1;
    transform: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .blob-drift,
    .blob-pulse,
    .blob-pebble {
        animation: none !important;
    }

    .hero-title,
    .hero-descriptor {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .enso-path.animate {
        animation: none !important;
        stroke-dashoffset: 0;
    }

    .zone {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .wave-layer-bg,
    .wave-layer-fg {
        transform: none !important;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        pointer-events: none;
        opacity: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100vw;
    }

    .zone-content-split {
        flex-direction: column;
    }

    .zone-left-third,
    .zone-right-twothirds {
        flex: 1 1 100%;
    }

    .zone-content-columns {
        flex-direction: column;
    }

    .zone-column-narrow,
    .zone-column-wide {
        flex: 1 1 100%;
    }

    .blob-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blob-surface-1,
    .blob-surface-2,
    .blob-surface-3 {
        width: 200px;
        height: 200px;
    }
}
