/* mujun.wiki - Zen Paradox Design */

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

:root {
    --charcoal: #1c1a17;
    --deep-brown: #2a2620;
    --amber: #d4a04c;
    --stone-gray: #9a9082;
    --parchment: #e8e0d0;
    --moss: #5a9a6a;
    --teal: #2d8a88;
    --sienna: #a0522d;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--charcoal);
    color: var(--parchment);
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Leather Texture Overlay */
.leather-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(42, 38, 32, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(42, 38, 32, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(160, 82, 45, 0.05) 0%, transparent 30%);
    opacity: 0.4;
}

/* ====== VOID GATE ====== */
#void-gate {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--charcoal);
}

#kanji-container {
    position: relative;
    z-index: 1;
}

#kanji-svg {
    width: 320px;
    height: 160px;
}

.kanji-stroke {
    font-family: 'Noto Serif JP', serif;
    font-weight: 900;
    font-size: 72px;
    fill: none;
    stroke: var(--amber);
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: strokeDraw 4s ease-out forwards;
}

@keyframes strokeDraw {
    to {
        stroke-dashoffset: 0;
        fill: var(--amber);
        fill-opacity: 1;
    }
}

#scroll-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--stone-gray));
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* ====== CATEGORY STONES ====== */
#category-stones {
    position: relative;
    padding: 15vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12vh;
}

.stone {
    position: relative;
    width: min(500px, 80vw);
    padding: 48px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.stone-border {
    position: absolute;
    inset: 0;
    border: 1px solid var(--stone-gray);
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.stone:hover .stone-border {
    opacity: 1;
    animation: borderTrace 2s linear infinite;
}

@keyframes borderTrace {
    0% { clip-path: inset(0 100% 100% 0); }
    25% { clip-path: inset(0 0 100% 0); }
    50% { clip-path: inset(0 0 0 0); }
    75% { clip-path: inset(0 0 0 100%); }
    100% { clip-path: inset(100% 0 0 100%); }
}

.stone-number {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: var(--amber);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.stone-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 28px;
    color: var(--parchment);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.stone-desc {
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--stone-gray);
    line-height: 1.6;
}

/* ====== AMBER CONSOLE ====== */
#amber-console {
    position: relative;
    padding: 15vh 0;
    display: flex;
    justify-content: center;
}

.console-frame {
    width: min(700px, 85vw);
    border: 1px solid var(--amber);
    background: rgba(28, 26, 23, 0.95);
    box-shadow:
        0 0 30px rgba(212, 160, 76, 0.05),
        inset 0 0 60px rgba(212, 160, 76, 0.02);
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(212, 160, 76, 0.3);
}

.console-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: var(--amber);
    letter-spacing: 2px;
}

.console-time {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: var(--stone-gray);
}

.console-body {
    padding: 24px 20px;
    min-height: 240px;
}

.console-line {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 13px;
    color: var(--amber);
    line-height: 2;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.console-line.typed {
    opacity: 1;
    transform: translateX(0);
}

/* ====== SAND FIELD ====== */
#sand-field {
    position: relative;
    padding: 20vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.sand-lines {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 0 10%;
    opacity: 0.15;
}

.sand-line {
    height: 1px;
    background: linear-gradient(to right,
        transparent 0%,
        var(--stone-gray) 20%,
        var(--stone-gray) 45%,
        transparent 50%,
        var(--stone-gray) 55%,
        var(--stone-gray) 80%,
        transparent 100%
    );
}

.sand-text {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.koan {
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    font-size: 22px;
    font-style: italic;
    color: var(--stone-gray);
    max-width: 500px;
    line-height: 1.8;
}

/* ====== FOOTER VOID ====== */
#footer-void {
    padding: 15vh 0 10vh;
    text-align: center;
}

.footer-mark {
    font-family: 'Noto Serif JP', serif;
    font-weight: 900;
    font-size: 36px;
    color: var(--amber);
    opacity: 0.6;
    margin-bottom: 16px;
}

.footer-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    color: var(--stone-gray);
    letter-spacing: 3px;
    text-transform: lowercase;
}
