/* munju.wiki — Swiss + Glitch + Ma negative space */

html {
    scroll-behavior: smooth;
}

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

::selection {
    background: #88c0d0;
    color: #0d1b2a;
}

body {
    background-color: #0d1b2a;
    color: #e0e8f0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Noise overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image:
        radial-gradient(ellipse at 23% 41%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 68% 72%, rgba(255,255,255,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 44% 19%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 81% 55%, rgba(255,255,255,0.13) 0%, transparent 50%),
        radial-gradient(ellipse at 12% 88%, rgba(255,255,255,0.11) 0%, transparent 50%),
        radial-gradient(ellipse at 55% 33%, rgba(255,255,255,0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 37% 64%, rgba(255,255,255,0.09) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 15%, rgba(255,255,255,0.12) 0%, transparent 50%);
    background-size: 400px 400px;
}

/* Opening void */
.opening-void {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.opening-content {
    text-align: center;
}

.site-title {
    font-family: 'Saira Stencil One', cursive;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    color: #e0e8f0;
    letter-spacing: 0.3em;
    margin: 0;
    line-height: 1;
}

.site-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    color: #5e81ac;
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
}

.scroll-line {
    width: 0.5px;
    height: 0;
    background: #5e81ac;
    margin: 2rem auto 0;
    animation: line-extend 2s cubic-bezier(0.25, 0, 0, 1) 3s forwards;
}

@keyframes line-extend {
    to {
        height: 40px;
    }
}

/* Leaf wrappers */
.leaf-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
}

.leaf-svg {
    width: clamp(60px, 10vw, 120px);
    height: auto;
    animation: leaf-drift 120s linear infinite;
}

.leaf-bodhi-large {
    width: clamp(120px, 20vw, 240px);
}

@keyframes leaf-drift {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Knowledge strata */
.knowledge-stratum {
    max-width: clamp(320px, 55vw, 720px);
    padding: 3rem 2.5rem;
    background: #1b2838;
    border-left: 3px solid #5e81ac;
    position: relative;
    transition: transform 0.1s cubic-bezier(0.25, 0, 0, 1);
}

.knowledge-stratum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.12;
    pointer-events: none;
    background-image:
        radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    background-size: 400px 400px;
}

.stratum-1 {
    margin-left: 15%;
}

.stratum-2 {
    margin-left: 25%;
}

.stratum-3 {
    margin-left: 10%;
}

.stratum-heading {
    font-family: 'Saira Stencil One', cursive;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: #88c0d0;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.stratum-content p {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    color: #e0e8f0;
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.stratum-content p:last-child {
    margin-bottom: 0;
}

/* Closing void */
.closing-void {
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.closing-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 300;
    color: #5e81ac;
    letter-spacing: 0.1em;
}

.closing-leaf-wrapper {
    display: flex;
    justify-content: center;
}

/* Glitch elements */
.glitch-tear {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 2px;
    background: #bf616a;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.05s;
}

.glitch-tear.active {
    opacity: 0.6;
}

/* Glitch: color bleed on stratum */
.knowledge-stratum.glitch-bleed .stratum-content p {
    color: #bf616a;
    transition: color 0.05s;
}

/* Glitch: stutter on heading */
.knowledge-stratum.glitch-stutter .stratum-heading {
    text-shadow: 4px 4px 0 rgba(191, 97, 106, 0.4);
    transition: text-shadow 0.05s;
}

/* Glitch: horizontal tear shift */
.knowledge-stratum.glitch-shift {
    transform: translateX(3px);
}

/* Scroll depth indicator */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(94, 129, 172, 0.3);
    z-index: 998;
    background: conic-gradient(#5e81ac 0deg, transparent 0deg);
}

/* Responsive */
@media (max-width: 768px) {
    .knowledge-stratum {
        max-width: 90vw;
        padding: 2rem 1.5rem;
    }
    .stratum-1,
    .stratum-2,
    .stratum-3 {
        margin-left: 5%;
    }
}
