/* mujun.day — Zen Contradiction */

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

:root {
    --burnt-orange: #e8652a;
    --deep-brown: #2a231c;
    --warm-brown: #3d3228;
    --teal: #2a8a7a;
    --purple: #7b4fbf;
    --muted: #8a847a;
    --darkest: #1e1a16;
    --parchment: #d4c5a9;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    color: var(--parchment);
    background-color: var(--darkest);
    background-image:
        radial-gradient(ellipse at 23% 45%, rgba(61,50,40,0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 78% 12%, rgba(61,50,40,0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 55% 80%, rgba(42,35,28,0.5) 0%, transparent 45%),
        radial-gradient(ellipse at 12% 88%, rgba(61,50,40,0.2) 0%, transparent 35%),
        radial-gradient(ellipse at 90% 60%, rgba(42,35,28,0.3) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Void Interstitials */
.void-interstitial {
    height: 80vh;
    position: relative;
}

.void-top {
    height: 100vh;
}

.void-bottom {
    height: 60vh;
}

/* Kōan Chambers */
.koan-chamber {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem;
}

.koan-content {
    max-width: 60%;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.koan-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.koan-headline {
    font-family: 'Noto Serif JP', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--parchment);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

#koan-spear .koan-headline {
    color: var(--burnt-orange);
}

#koan-shield .koan-headline {
    color: var(--teal);
}

#koan-meeting .koan-headline {
    color: var(--purple);
}

#koan-dissolution .koan-headline {
    color: var(--muted);
}

#koan-return .koan-headline {
    color: var(--burnt-orange);
}

.koan-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Incomplete Border */
.incomplete-border {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    pointer-events: none;
}

.incomplete-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, var(--warm-brown), transparent);
}

.incomplete-border::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 1px;
    background: linear-gradient(to left, var(--warm-brown), transparent);
}

/* Ensō SVG */
.enso-svg {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 80px;
    height: 80px;
    opacity: 0.3;
    z-index: 10;
}

.enso-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawEnso 8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 2s;
}

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

/* Kinetic text breathing */
@keyframes breathe {
    0%, 100% { letter-spacing: -0.02em; }
    50% { letter-spacing: 0.01em; }
}

.koan-content.visible .koan-headline {
    animation: breathe 8s ease-in-out infinite;
}

/* Counter label */
.koan-chamber::after {
    content: attr(data-chamber);
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--warm-brown);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#koan-spear::after { content: '一 / five'; }
#koan-shield::after { content: '二 / five'; }
#koan-meeting::after { content: '三 / five'; }
#koan-dissolution::after { content: '四 / five'; }
#koan-return::after { content: '五 / five'; }

/* Responsive */
@media (max-width: 768px) {
    .koan-content {
        max-width: 90%;
    }

    .koan-chamber {
        padding: 2rem;
    }

    .enso-svg {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
