/* ppuzzle.dev -- Minimalist Zen Karesansui */
:root {
    --washi: #F4F0E8;
    --sumi: #3A3632;
    --stone: #504A44;
    --sand: #B8B0A4;
    --weathered: #8A8278;
    --night: #1E1C19;
    --persimmon: #C2764A;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Libre Baskerville', serif; font-weight: 400; font-size: 16px; line-height: 1.9; color: var(--stone); background: var(--washi); overflow-x: hidden; }

.raked-gravel { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 2.5s cubic-bezier(0.33, 0, 0.67, 1); }
.raked-gravel.on { opacity: 1; }

.nav-circle { position: fixed; top: 32px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border: 1px solid var(--weathered); border-radius: 50%; z-index: 100; cursor: pointer; transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-circle:hover { width: 16px; height: 16px; }
.nav-menu { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.nav-circle:hover .nav-menu { opacity: 1; pointer-events: auto; }
.nav-item { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--weathered); text-decoration: none; filter: blur(4px); opacity: 0; transition: filter 0.3s, opacity 0.3s; }
.nav-circle:hover .nav-item { filter: blur(0); opacity: 1; }
.nav-circle:hover .nav-item:nth-child(1) { transition-delay: 0s; }
.nav-circle:hover .nav-item:nth-child(2) { transition-delay: 0.12s; }
.nav-circle:hover .nav-item:nth-child(3) { transition-delay: 0.24s; }
.nav-circle:hover .nav-item:nth-child(4) { transition-delay: 0.36s; }

.scroll-column { max-width: 640px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.hero-section { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.hero-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 38px; letter-spacing: 0.04em; line-height: 1.3; color: var(--sumi); text-transform: lowercase; filter: blur(12px); opacity: 0.3; transition: filter 1.8s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 1.8s cubic-bezier(0.25, 0.1, 0.25, 1); }
.hero-title.on { filter: blur(0); opacity: 1; }
.hero-subtitle { font-family: 'Josefin Sans', sans-serif; font-weight: 200; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--weathered); opacity: 0; transition: opacity 1.2s; }
.hero-subtitle.on { opacity: 1; }

.puzzle-section { margin-top: 20vh; }
.puzzle-entry { margin-bottom: 20vh; opacity: 0; transform: translateY(0); }
.puzzle-entry.visible .top-rule,
.puzzle-entry.visible .bottom-rule { width: 100%; }
.puzzle-entry.visible .stone-emblem { filter: blur(0); opacity: 1; }
.puzzle-entry.visible .puzzle-title { filter: blur(0); opacity: 1; }
.puzzle-entry.visible .puzzle-body,
.puzzle-entry.visible .puzzle-label,
.puzzle-entry.visible .puzzle-meta { opacity: 1; }

.hairline { height: 1px; background: var(--sand); width: 0; margin: 0 auto; transition: width 0.6s cubic-bezier(0.33, 0, 0.67, 1); }
.top-rule { margin-bottom: 48px; }
.bottom-rule { margin-top: 48px; }

.stone-emblem { display: block; width: 80px; height: 60px; margin: 0 auto 24px; filter: blur(8px); opacity: 0.2; transition: filter 1s 0.2s, opacity 1s 0.2s; }
.stone-emblem:hover { animation: stonePulse 3s ease-in-out infinite; }
@keyframes stonePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.puzzle-label { display: block; font-family: 'Josefin Sans', sans-serif; font-weight: 200; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--weathered); text-align: center; margin-bottom: 8px; opacity: 0; transition: opacity 0.6s 0.6s; }
.puzzle-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 30px; letter-spacing: 0.04em; line-height: 1.3; color: var(--sumi); text-align: center; text-transform: lowercase; filter: blur(6px); opacity: 0; transition: filter 0.8s 0.4s, opacity 0.8s 0.4s; margin-bottom: 16px; }
.puzzle-body { font-family: 'Libre Baskerville', serif; font-weight: 400; font-size: 16px; line-height: 1.9; color: var(--stone); text-align: center; max-width: 520px; margin: 0 auto 16px; opacity: 0; transition: opacity 0.6s 0.6s; }
.puzzle-meta { display: block; font-family: 'Josefin Sans', sans-serif; font-weight: 200; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--weathered); text-align: center; opacity: 0; transition: opacity 0.6s 0.6s; }

.ink-wash { width: 100%; height: 120px; margin: 10vh 0; background: linear-gradient(180deg, transparent 0%, rgba(58,54,50,0.03) 20%, rgba(58,54,50,0.08) 40%, rgba(58,54,50,0.12) 50%, rgba(58,54,50,0.08) 60%, rgba(58,54,50,0.03) 80%, transparent 100%); }

.night-section { background: var(--night); margin: 0 -24px; padding: 20vh 24px; }
.night-entry { margin-bottom: 0; }
.night-rule { background: #504A44; }
.night-label { color: #6A645E; }
.night-title { color: #C5BFB7; }
.night-body { color: #C5BFB7; }
.night-meta { color: #6A645E; }
.night-stone path { stroke: #504A44; }

.branch-motif { position: absolute; right: -80px; top: 60%; width: 120px; height: 300px; opacity: 0.6; }

.footer-section { padding: 20vh 0 10vh; text-align: center; }
.footer-mark { font-family: 'Josefin Sans', sans-serif; font-weight: 200; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--weathered); opacity: 0.4; }

@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .puzzle-title { font-size: 24px; }
    .branch-motif { display: none; }
    .night-section { margin: 0 -24px; }
}
