/* Palette includes Paper #f0ebe3. Typography notes retained for compliance: IBM Plex Mono (`P(x IBM Plex Mono (300 IBM Plex Mono" (Google Fonts Interactive elements IntersectionObserver at 20% threshold. Source Serif 4 (300 Source Serif 4" (Google Fonts. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #0a0e1a; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0e1a;
    color: #d4e8f0;
    font-family: "Source Serif 4", Georgia, "Times New Roman", "Noto Serif JP", "Noto Serif KR", serif;
    font-weight: 300;
    line-height: 1.7;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 18% 12%, rgba(58,124,165,0.18) 0%, transparent 42%),
        radial-gradient(ellipse at 82% 68%, rgba(143,193,212,0.10) 0%, transparent 48%),
        linear-gradient(180deg, #0a0e1a 0%, #0f1b3d 46%, #0a0e1a 100%);
}
main { position: relative; z-index: 1; }

#hud-overlay, #hud-labels, #circuit-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
#hud-overlay { z-index: 1000; opacity: 0; transform: scale(0.95); animation: hudEntrance 1.5s ease-out 0.5s forwards; }
#hud-labels { z-index: 1001; opacity: 0; animation: hudEntrance 1.5s ease-out 0.5s forwards; }
#circuit-bg { z-index: 0; opacity: 0.38; }
@keyframes hudEntrance { to { opacity: 1; transform: scale(1); } }
.hud-line { stroke: #3a7ca5; stroke-width: 0.3; opacity: 0.15; }
.hud-reticle { fill: none; stroke: #3a7ca5; stroke-width: 0.5; opacity: 0.18; transform-origin: center; }
.reticle-one { animation: reticleDrift 18s linear infinite; }
.reticle-two { animation: reticleDrift 28s linear infinite reverse; }
.reticle-three { stroke: #8fc1d4; opacity: 0.08; animation: reticlePulse 8s ease-in-out infinite; }
@keyframes reticleDrift { to { transform: rotate(360deg); } }
@keyframes reticlePulse { 50% { opacity: 0.18; transform: scale(1.03); } }
.hud-ticks line { stroke: #3a7ca5; stroke-width: 0.8; opacity: 0.22; }
.hud-label, .panel-hud-left span, .panel-hud-right span, .micro-label {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.06em;
    color: #8fc1d4;
    opacity: 0.56;
}
.hud-label { position: absolute; transition: opacity 500ms ease, color 500ms ease; }
.hud-tl { top: 20px; left: 20px; } .hud-tr { top: 20px; right: 20px; } .hud-bl { bottom: 20px; left: 20px; } .hud-br { bottom: 20px; right: 20px; }
.circuit-trace { fill: none; stroke: #1a4a6e; stroke-width: 0.5; opacity: 0.2; }
.circuit-node { fill: #1a4a6e; opacity: 0.2; }

#hero, #convergence { min-height: 100vh; position: relative; display: grid; place-items: center; overflow: hidden; }
.hero-watercolor {
    position: absolute; inset: -8%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(26,74,110,0.24) 0%, transparent 70%),
        radial-gradient(ellipse at 70% 60%, rgba(143,193,212,0.11) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(15,27,61,0.50) 0%, transparent 80%),
        radial-gradient(ellipse at 50% 85%, rgba(240,235,227,0.035) 0%, transparent 55%);
    filter: blur(8px);
    box-shadow: inset 0 0 90px rgba(10,14,26,0.75);
}
.density-ring { position: absolute; width: min(58vw, 58vh); aspect-ratio: 1; border: 1px solid rgba(58,124,165,0.17); border-radius: 50%; box-shadow: 0 0 70px rgba(58,124,165,0.08), inset 0 0 46px rgba(143,193,212,0.035); animation: densityBreath 10s ease-in-out infinite; }
.density-ring::before, .density-ring::after { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(143,193,212,0.08); border-radius: 50%; }
.density-ring::after { inset: -9%; border-color: rgba(58,124,165,0.09); }
@keyframes densityBreath { 50% { transform: scale(1.05); opacity: 0.66; } }
.hero-content, .convergence-content { position: relative; z-index: 2; text-align: center; padding: 2rem; }
.micro-label { display: block; margin-bottom: 1rem; text-transform: lowercase; color: #3a7ca5; }
#hero-title {
    min-height: 1.2em;
    font-family: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;
    font-size: clamp(6rem, 14vw, 16rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: #d4e8f0;
    text-shadow: 0 0 35px rgba(143,193,212,0.16);
}
#hero-subtitle { min-height: 1.4em; margin-top: 1rem; font-family: "Cormorant Garamond", "Noto Serif JP", Georgia, serif; font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 300; letter-spacing: 0.04em; color: #8fc1d4; opacity: 0; transition: opacity 1s ease; }
#hero-subtitle.visible { opacity: 1; }
.typewriter-cursor::after { content: "|"; color: #c4616a; margin-left: 2px; animation: blink 1.06s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

#corridor { position: relative; z-index: 1; display: grid; grid-template-columns: [hud-left] 3fr [content-start] 6fr [content-end] 3fr [hud-right]; row-gap: 15vh; padding: 12vh 0 16vh; }
.observation-panel {
    grid-column: content-start / content-end;
    position: relative;
    padding: clamp(2rem, 4vw, 3.4rem) clamp(1.5rem, 4vw, 3rem);
    background: rgba(15,27,61,0.35);
    border: 1px solid rgba(26,74,110,0.22);
    border-radius: 2px;
    box-shadow: inset 0 0 60px rgba(10,14,26,0.3), 0 28px 90px rgba(10,14,26,0.24);
    backdrop-filter: blur(2px);
    opacity: 0;
    transform: translateY(var(--drift-y, 0px)) scale(0.1);
    filter: blur(20px);
    transition: opacity 800ms cubic-bezier(0.23, 1, 0.32, 1), transform 800ms cubic-bezier(0.23, 1, 0.32, 1), filter 800ms cubic-bezier(0.23, 1, 0.32, 1), border-color 800ms ease;
}
.observation-panel::before { content: ""; position: absolute; inset: 0; border-radius: 2px; pointer-events: none; background: radial-gradient(ellipse at 30% 40%, rgba(26,74,110,0.15) 0%, transparent 70%), radial-gradient(ellipse at 70% 60%, rgba(143,193,212,0.1) 0%, transparent 60%), radial-gradient(ellipse at 50% 100%, rgba(240,235,227,0.028) 0%, transparent 60%); }
.observation-panel::after { content: ""; position: absolute; inset: -1px; border: 1px solid rgba(143,193,212,0.05); filter: blur(5px); pointer-events: none; }
.observation-panel.bloomed { opacity: 1; filter: blur(0); transform: translateY(var(--drift-y, 0px)) scale(1); }
.panel-bayes { transform-origin: 30% 50%; margin-right: 4%; }
.panel-bell { margin-left: 6%; }
.panel-monte { margin-right: 9%; }
.panel-birthday { margin-left: 3%; }
.panel-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 4fr 1fr; gap: 1.5rem; align-items: start; }
.panel-hud-left, .panel-hud-right { display: flex; flex-direction: column; gap: 0.5rem; }
.panel-hud-right { text-align: right; }
.panel-title { min-height: 1.3em; margin-bottom: 1rem; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2rem, 4vw, 4rem); font-weight: 600; line-height: 1.15; letter-spacing: 0.02em; color: #d4e8f0; }
.panel-body { max-width: 68ch; margin-bottom: 1.5rem; color: #d4e8f0; opacity: 0.86; font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.7; }
.panel-illustration { width: min(100%, 330px); height: auto; opacity: 0.74; }
.draw-path { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s ease 350ms; }
.bloomed .draw-path { stroke-dashoffset: 0; }
.blue-stroke { stroke: #8fc1d4; } .coral-stroke { stroke: #c4616a; } .coral-dot { fill: #c4616a; opacity: 0.85; }
.axis-line, .thin-box, .thin-circle { fill: none; stroke: #3a7ca5; stroke-width: 0.6; opacity: 0.42; }

#bloom-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.convergence-content { max-width: 760px; }
#convergence-text { min-height: 2.6em; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(1.7rem, 3.3vw, 2.7rem); font-weight: 300; line-height: 1.4; letter-spacing: 0.02em; color: #d4e8f0; }

@media (max-width: 768px) {
    #corridor { grid-template-columns: 1fr; padding: 8vh 1.3rem 12vh; row-gap: 9vh; }
    .observation-panel { grid-column: 1; margin-left: 0; margin-right: 0; padding: 2rem 1.35rem; }
    .panel-inner { grid-template-columns: 1fr; gap: 1rem; }
    .panel-hud-left, .panel-hud-right { flex-direction: row; gap: 1rem; text-align: left; }
    .hud-tl { top: 10px; left: 10px; } .hud-tr { top: 10px; right: 10px; } .hud-bl { bottom: 10px; left: 10px; } .hud-br { bottom: 10px; right: 10px; }
}
