/* ============================================
   monopole.bar — Brutalist-Organic Design
   ============================================ */

:root {
    --bg-primary: #f5f2ed;
    --text-primary: #1a1a1a;
    --bg-slab: #e8e4de;
    --gray-mid: #9a9590;
    --bg-dark: #2c2c2c;
    --white-highlight: #ffffff;
    --blob-shadow: #d4cfc8;
    --black-deep: #0d0d0d;
    --divider-gray: #d4d4d4;
    --gray-secondary: #767676;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ---- Grain Texture Overlay ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---- Section Base ---- */
.section {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 1rem;
    padding: clamp(2rem, 5vw, 4rem);
    overflow: hidden;
}

/* ---- Blob Shapes ---- */
.blob {
    position: absolute;
    border-radius: 50% 40% 60% 45% / 55% 50% 45% 50%;
    z-index: -1;
    will-change: transform, opacity;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.blob.visible {
    opacity: 1;
}

.blob-1 {
    width: 420px;
    height: 380px;
    background: var(--blob-shadow);
    top: 10%;
    left: 15%;
    border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%;
    animation: blobDrift1 14s ease-in-out infinite paused;
}

.blob-2 {
    width: 300px;
    height: 320px;
    background: var(--bg-slab);
    top: 20%;
    left: 35%;
    border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%;
    animation: blobDrift2 16s ease-in-out infinite paused;
}

.blob-3 {
    width: 250px;
    height: 260px;
    background: rgba(154, 149, 144, 0.3);
    top: 5%;
    left: 50%;
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    animation: blobDrift3 18s ease-in-out infinite paused;
}

.blob-4 {
    width: 350px;
    height: 300px;
    background: var(--blob-shadow);
    top: 15%;
    right: 5%;
    border-radius: 48% 52% 55% 45% / 50% 48% 52% 50%;
    animation: blobDrift1 15s ease-in-out infinite paused;
}

.blob-5 {
    width: 280px;
    height: 320px;
    background: var(--bg-slab);
    top: 20%;
    left: 2%;
    border-radius: 52% 48% 45% 55% / 48% 52% 50% 50%;
    animation: blobDrift2 13s ease-in-out infinite paused;
}

.blob-6 {
    width: 400px;
    height: 350px;
    background: var(--blob-shadow);
    top: 8%;
    right: 8%;
    border-radius: 46% 54% 52% 48% / 54% 46% 48% 52%;
    animation: blobDrift3 16s ease-in-out infinite paused;
}

.blob-7 {
    width: 220px;
    height: 240px;
    background: rgba(154, 149, 144, 0.3);
    top: 55%;
    right: 3%;
    border-radius: 55% 45% 48% 52% / 45% 55% 52% 48%;
    animation: blobDrift1 17s ease-in-out infinite paused;
}

.blob-8 {
    width: 360px;
    height: 310px;
    background: var(--blob-shadow);
    top: 12%;
    left: 3%;
    border-radius: 50% 50% 44% 56% / 52% 48% 56% 44%;
    animation: blobDrift2 14s ease-in-out infinite paused;
}

.blob-9 {
    width: 320px;
    height: 290px;
    background: var(--bg-slab);
    top: 25%;
    right: 6%;
    border-radius: 53% 47% 50% 50% / 47% 53% 50% 50%;
    animation: blobDrift3 15s ease-in-out infinite paused;
}

.blob.animate {
    animation-play-state: running;
}

@keyframes blobDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -10px) rotate(3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes blobDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-12px, 8px) rotate(-2deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes blobDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, 12px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* ---- Hero Section ---- */
.section-hero {
    align-items: end;
    padding-bottom: 12vh;
}

.hero-title {
    grid-column: 1 / 9;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 14vw, 12rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--black-deep);
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-title.visible {
    opacity: 1;
}

.hero-dot {
    color: var(--gray-mid);
}

/* ---- Leaf Styles ---- */
.leaf-cluster {
    position: absolute;
    z-index: 1;
}

.hero-leaves {
    top: 12%;
    left: 8%;
    width: 280px;
    height: 280px;
}

.leaf {
    position: absolute;
    will-change: stroke-dashoffset;
}

.leaf-1 {
    width: 70px;
    top: 0;
    left: 0;
    transform: rotate(-15deg);
}

.leaf-2 {
    width: 90px;
    top: 30px;
    left: 60px;
    transform: rotate(10deg);
}

.leaf-3 {
    width: 55px;
    top: 80px;
    left: 20px;
    transform: rotate(-25deg);
}

.leaf path[stroke] {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 0.8s ease;
}

.leaf.drawn path[stroke] {
    stroke-dashoffset: 0;
}

.leaf-accent {
    position: absolute;
    z-index: 1;
    opacity: 0.7;
}

.leaf-accent-1 {
    width: 50px;
    right: 8%;
    top: 40%;
    transform: rotate(20deg);
}

.leaf-accent-2 {
    width: 60px;
    left: 5%;
    top: 35%;
    transform: rotate(-12deg);
}

.leaf-accent-3 {
    width: 55px;
    right: 10%;
    bottom: 20%;
    transform: rotate(15deg);
}

.leaf-accent path[stroke] {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 0.8s ease;
}

.leaf-accent.drawn path[stroke] {
    stroke-dashoffset: 0;
}

.narrative-leaves {
    right: 6%;
    top: 45%;
    width: 200px;
    height: 200px;
}

.leaf-4 {
    width: 55px;
    top: 0;
    left: 0;
    transform: rotate(8deg);
}

.leaf-5 {
    width: 42px;
    top: 40px;
    left: 50px;
    transform: rotate(-18deg);
}

/* ---- Interstitial Sections ---- */
.section-interstitial {
    min-height: 60vh;
    align-items: center;
}

.interstitial-text {
    grid-column: 1 / -1;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--text-primary);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

.interstitial-text.revealed {
    clip-path: inset(0 0% 0 0);
}

/* ---- Section Numbers ---- */
.section-number {
    position: absolute;
    top: clamp(2rem, 5vw, 4rem);
    z-index: 3;
}

.section-odd .section-number {
    left: clamp(2rem, 5vw, 4rem);
}

.section-even .section-number {
    right: clamp(2rem, 5vw, 4rem);
}

.mono-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-secondary); /* #767676 */
}

/* ---- Content Slabs ---- */
.content-slab {
    background: var(--bg-slab);
    border: 3px solid var(--text-primary);
    padding: clamp(2rem, 5vw, 4rem);
    position: relative;
    z-index: 2;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-odd .content-slab {
    grid-column: 1 / 8;
    transform: translateX(-80px);
}

.section-even .content-slab {
    grid-column: 5 / 12;
    transform: translateX(80px);
}

.content-slab.visible {
    opacity: 1;
    transform: translateX(0);
}

.content-slab-dark {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
}

.content-slab-dark .slab-heading,
.content-slab-dark .slab-body {
    color: var(--white-highlight);
}

.slab-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.slab-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    max-width: 600px;
}

/* ---- Narrative Sections ---- */
.section-narrative {
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* ---- Blob Dividers ---- */
.blob-divider {
    width: 70%;
    margin: -2rem auto;
    position: relative;
    z-index: 1;
}

.blob-divider svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ---- Footer ---- */
.section-footer {
    min-height: 40vh;
    align-items: end;
    padding-bottom: 4rem;
    background: var(--bg-dark);
}

.footer-content {
    grid-column: 1 / 5;
    z-index: 2;
}

.footer-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: -0.03em;
    color: var(--white-highlight);
}

.footer-leaf {
    position: absolute;
    bottom: 3rem;
    right: 10%;
    width: 40px;
    opacity: 0.6;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none !important;
        opacity: 1 !important;
    }
    .content-slab {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .interstitial-text {
        clip-path: none !important;
        transition: none !important;
    }
    .hero-title {
        opacity: 1 !important;
        transition: none !important;
    }
    .leaf path[stroke],
    .leaf-accent path[stroke] {
        stroke-dashoffset: 0 !important;
        transition: none !important;
    }
}

/* ---- Mobile Layout (< 768px) ---- */
@media (max-width: 767px) {
    .section {
        grid-template-columns: repeat(4, 1fr);
        gap: 0 0.75rem;
        padding: 1.5rem;
    }

    .hero-title {
        grid-column: 1 / -1;
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .section-odd .content-slab {
        grid-column: 1 / 4;
    }

    .section-even .content-slab {
        grid-column: 2 / 5;
    }

    .blob {
        display: none;
    }

    .hero-leaves,
    .narrative-leaves {
        display: none;
    }

    .leaf-accent {
        opacity: 0.4;
        width: 30px;
    }

    .blob-divider {
        width: 85%;
    }

    .section-interstitial {
        min-height: 40vh;
    }

    .interstitial-text {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .section-footer {
        min-height: 30vh;
    }

    .footer-content {
        grid-column: 1 / -1;
    }

    .section-number {
        top: 1.5rem;
    }

    .section-odd .section-number {
        left: 1.5rem;
    }

    .section-even .section-number {
        right: 1.5rem;
    }
}