/* =============================================
   nlbd.dev — Maximalist Zen / Duotone / Diagonal
   ============================================= */

:root {
    --orchid: #7b2d8e;
    --teal: #00d4aa;
    --void: #0b0a1a;
    --mist: #e8e4f0;
    --fade: #8a8399;
    --glow: #c77ddb;
    --angle: 7deg;
    --overlap: 8vw;
}

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

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

body {
    background: var(--void);
    color: var(--mist);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 2;
    letter-spacing: 0.04em;
    overflow-x: hidden;
    text-transform: lowercase;
}

/* =============================================
   Scroll Depth Indicator
   ============================================= */

.scroll-indicator {
    position: fixed;
    right: 12px;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 100;
    pointer-events: none;
}

/* =============================================
   Stratum (Diagonal Section) System
   ============================================= */

.stratum {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12vh 5vw;
}

.stratum-0 {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%);
    z-index: 5;
    background: linear-gradient(170deg, rgba(123,45,142,0.08) 0%, var(--void) 50%, rgba(0,212,170,0.05) 100%);
}

.stratum-1 {
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 calc(100% - 4vw));
    margin-top: calc(var(--overlap) * -1);
    z-index: 4;
    background: linear-gradient(190deg, rgba(0,212,170,0.06) 0%, var(--void) 40%, rgba(123,45,142,0.08) 100%);
}

.stratum-2 {
    clip-path: polygon(0 0, 100% 4vw, 100% calc(100% - 4vw), 0 100%);
    margin-top: calc(var(--overlap) * -1);
    z-index: 3;
    background: linear-gradient(170deg, rgba(123,45,142,0.1) 0%, var(--void) 50%, rgba(0,212,170,0.06) 100%);
}

.stratum-3 {
    clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 calc(100% - 4vw));
    margin-top: calc(var(--overlap) * -1);
    z-index: 2;
    background: linear-gradient(190deg, rgba(0,212,170,0.08) 0%, var(--void) 50%, rgba(123,45,142,0.06) 100%);
}

.stratum-4 {
    clip-path: polygon(0 0, 100% 4vw, 100% 100%, 0 100%);
    margin-top: calc(var(--overlap) * -1);
    z-index: 1;
    background: linear-gradient(170deg, var(--void) 0%, rgba(123,45,142,0.04) 50%, var(--void) 100%);
    min-height: 70vh;
}

/* =============================================
   Domain Name / Breathing Typography
   ============================================= */

.domain-name {
    font-family: 'Recursive', sans-serif;
    font-size: clamp(4rem, 15vw, 12rem);
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--mist);
    text-shadow: 0 0 40px rgba(199,125,219,0.4), 0 0 80px rgba(123,45,142,0.2);
    position: relative;
    z-index: 10;
    text-align: center;
    line-height: 1.1;
}

.breathing-text {
    animation: breathe 12s ease-in-out infinite;
}

.breathing-text-slow {
    animation: breathe 16s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        font-variation-settings: 'wght' 300, 'CASL' 0;
        opacity: 0.85;
    }
    50% {
        font-variation-settings: 'wght' 900, 'CASL' 1;
        opacity: 1;
    }
}

.domain-footer {
    font-size: clamp(1.5rem, 4vw, 3rem);
    opacity: 0.7;
    text-shadow: 0 0 20px rgba(199,125,219,0.3);
}

/* =============================================
   Haiku / Body Text
   ============================================= */

.haiku {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    line-height: 2;
    letter-spacing: 0.04em;
    text-align: center;
    color: var(--mist);
    max-width: 40ch;
    margin: 3rem auto;
}

.stratum-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

/* =============================================
   Text Reveal Animation
   ============================================= */

.reveal-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 3s ease-out 2s, transform 3s ease-out 2s;
}

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

/* =============================================
   Glitch Effects (Stratum 2)
   ============================================= */

.glitch-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    line-height: 2;
    text-align: center;
    color: var(--mist);
    position: relative;
    max-width: 50ch;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-text::before {
    color: var(--orchid);
    mix-blend-mode: screen;
    animation: glitch-shift-left 4s steps(1) infinite;
    opacity: 0.7;
}

.glitch-text::after {
    color: var(--teal);
    mix-blend-mode: screen;
    animation: glitch-shift-right 5s steps(1) infinite;
    opacity: 0.7;
}

@keyframes glitch-shift-left {
    0%, 85% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
    86% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, 0); }
    90% { clip-path: inset(40% 0 20% 0); transform: translate(2px, 0); }
    94% { clip-path: inset(70% 0 5% 0); transform: translate(-2px, 0); }
    98% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes glitch-shift-right {
    0%, 80% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
    82% { clip-path: inset(20% 0 50% 0); transform: translate(3px, 0); }
    87% { clip-path: inset(50% 0 10% 0); transform: translate(-2px, 0); }
    92% { clip-path: inset(5% 0 70% 0); transform: translate(4px, 0); }
    96% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

.glitch-mono {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    letter-spacing: 0.08em;
    color: var(--teal);
    opacity: 0.6;
    text-align: center;
    font-feature-settings: "ss01";
}

.glitch-content {
    gap: 2rem;
}

/* Scan Lines Overlay */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(11, 10, 26, 0.3) 2px,
        rgba(11, 10, 26, 0.3) 4px
    );
    animation: scan-scroll 60s linear infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes scan-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 1000px; }
}

/* =============================================
   Blob System
   ============================================= */

.blob {
    position: absolute;
    pointer-events: none;
}

.macro-blob {
    width: 80vw;
    height: 80vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

.blob-hero {
    width: 90vw;
    height: 90vh;
}

.blob-s2 {
    width: 85vw;
    height: 85vh;
}

.meso-blob {
    opacity: 0.9;
}

.meso-1 {
    width: 25vw;
    height: 25vw;
    top: 15%;
    right: 5%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.meso-2 {
    width: 20vw;
    height: 20vw;
    top: 20%;
    left: 8%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.meso-3 {
    width: 15vw;
    height: 15vw;
    bottom: 20%;
    right: 12%;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.meso-4 {
    width: 18vw;
    height: 18vw;
    top: 25%;
    right: 10%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Ink Drop Blob */
.ink-drop-blob {
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* =============================================
   Bubble System
   ============================================= */

.bubble-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    pointer-events: auto;
    cursor: default;
    animation: bubble-float var(--t, 12s) ease-in-out infinite alternate;
    animation-delay: var(--d, 0s);
    left: var(--x, 50%);
    bottom: var(--y, 10%);
    width: var(--s, 3rem);
    height: var(--s, 3rem);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.bubble:hover {
    transform: scale(1.2) translateY(calc(var(--float-dist, -15px) * 0.5));
    opacity: 0.8 !important;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 20%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(-30deg);
}

.bubble::after {
    content: '';
    position: absolute;
    bottom: 18%;
    right: 22%;
    width: 20%;
    height: 15%;
    border-radius: 50%;
    transform: rotate(30deg);
}

.bubble-orchid {
    border-color: rgba(123, 45, 142, 0.6);
    background: rgba(123, 45, 142, 0.05);
}

.bubble-orchid::after {
    background: rgba(123, 45, 142, 0.1);
}

.bubble-teal {
    border-color: rgba(0, 212, 170, 0.6);
    background: rgba(0, 212, 170, 0.05);
}

.bubble-teal::after {
    background: rgba(0, 212, 170, 0.1);
}

@keyframes bubble-float {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(var(--float-dist, -15px)) translateX(3px);
    }
    50% {
        transform: translateY(calc(var(--float-dist, -15px) * 0.6)) translateX(-2px);
    }
    75% {
        transform: translateY(var(--float-dist, -15px)) translateX(4px);
    }
    100% {
        transform: translateY(calc(var(--float-dist, -15px) * 1.3)) translateX(-1px);
    }
}

/* Settling bubbles in footer drift downward */
.settling-bubbles .bubble {
    animation-name: bubble-settle;
}

@keyframes bubble-settle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: var(--o, 0.4);
    }
    50% {
        transform: translateY(20px) translateX(3px);
        opacity: calc(var(--o, 0.4) * 0.7);
    }
    100% {
        transform: translateY(40px) translateX(-2px);
        opacity: calc(var(--o, 0.4) * 0.3);
    }
}

/* =============================================
   Scroll Indicator Bubbles
   ============================================= */

.scroll-bubble {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--teal);
    right: 8px;
    animation: scroll-wobble 3s ease-in-out infinite alternate;
    opacity: 0.7;
}

@keyframes scroll-wobble {
    0% { transform: translateX(0); }
    33% { transform: translateX(3px); }
    66% { transform: translateX(-2px); }
    100% { transform: translateX(1px); }
}

/* =============================================
   Ink Content Layout
   ============================================= */

.ink-content {
    z-index: 10;
}

.ink-content .haiku {
    position: relative;
    z-index: 10;
}

/* =============================================
   Responsive — Mobile
   ============================================= */

@media (max-width: 768px) {
    :root {
        --angle: 4deg;
        --overlap: 4vw;
    }

    .stratum-0 {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2vw), 0 100%);
    }

    .stratum-1 {
        clip-path: polygon(0 2vw, 100% 0, 100% 100%, 0 calc(100% - 2vw));
    }

    .stratum-2 {
        clip-path: polygon(0 0, 100% 2vw, 100% calc(100% - 2vw), 0 100%);
    }

    .stratum-3 {
        clip-path: polygon(0 2vw, 100% 0, 100% 100%, 0 calc(100% - 2vw));
    }

    .stratum-4 {
        clip-path: polygon(0 0, 100% 2vw, 100% 100%, 0 100%);
    }

    .domain-name {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .macro-blob {
        width: 100vw;
        height: 70vh;
    }

    .meso-1, .meso-2, .meso-3, .meso-4 {
        width: 30vw;
        height: 30vw;
    }

    .ink-drop-blob {
        width: 70vw;
        height: 70vw;
    }

    .haiku {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        max-width: 30ch;
        margin: 2rem auto;
    }

    .glitch-text {
        font-size: clamp(0.9rem, 3vw, 1.3rem);
    }

    .glitch-text::before {
        animation-name: glitch-shift-left-mobile;
    }

    .glitch-text::after {
        animation-name: glitch-shift-right-mobile;
    }

    .stratum {
        padding: 8vh 4vw;
    }
}

@keyframes glitch-shift-left-mobile {
    0%, 85% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
    86% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, 0); }
    90% { clip-path: inset(40% 0 20% 0); transform: translate(1px, 0); }
    94% { clip-path: inset(70% 0 5% 0); transform: translate(-2px, 0); }
    98% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes glitch-shift-right-mobile {
    0%, 80% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
    82% { clip-path: inset(20% 0 50% 0); transform: translate(2px, 0); }
    87% { clip-path: inset(50% 0 10% 0); transform: translate(-1px, 0); }
    92% { clip-path: inset(5% 0 70% 0); transform: translate(2px, 0); }
    96% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}
