:root {
    --midnight: #0d1b2a;
    --midnight-mid: #0f1d2c;
    --midnight-light: #152238;
    --forensic: #4a6fa5;
    --slate: #6a7a8a;
    --amber: #d4943a;
    --crimson: #8c3a3a;
    --bone: #d4cfc4;
}

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

body {
    background: var(--midnight);
    color: var(--bone);
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Candle glow -- follows scroll */
.candle-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(212, 148, 58, 0.06) 0%,
        rgba(212, 148, 58, 0.02) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: glow-fade-in 2s ease 1.5s forwards;
}

@keyframes glow-fade-in {
    to { opacity: 1; }
}

/* River column */
.river {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 0 24px 120px;
}

/* Zones with varying widths */
.zone {
    margin: 0 auto;
    padding: 40px 0;
}

.zone-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 70ch;
    margin: 0 auto;
}

.zone-narrow {
    max-width: 45ch;
    transition: max-width 0.6s ease;
}

.zone-wide {
    max-width: 70ch;
    transition: max-width 0.6s ease;
}

.zone-end {
    max-width: 45ch;
    text-align: center;
    padding: 80px 0;
}

/* Hero */
.hero-title {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 8vw, 4.5rem);
    color: var(--bone);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: char-fade 2s ease 1.5s forwards;
}

@keyframes char-fade {
    to { opacity: 1; }
}

.hero-mono {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--forensic);
    letter-spacing: 0.04em;
    margin-top: 16px;
    opacity: 0;
    animation: char-fade 1.5s ease 3s forwards;
}

/* Section headings */
.section-heading {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--bone);
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

/* Body text */
.body-text {
    font-family: 'Noto Serif JP', serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.85;
    color: var(--bone);
    margin-bottom: 14px;
    opacity: 0.85;
}

/* Tokonoma recess */
.tokonoma {
    border-left: 2px solid var(--crimson);
    padding-left: 24px;
    margin: 16px 0;
}

/* Data notes */
.data-note {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    margin-top: 16px;
    border-top: 1px solid rgba(74, 111, 165, 0.2);
}

.data-key {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--slate);
    text-transform: uppercase;
}

.data-val {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    color: var(--forensic);
}

/* Breathing marks */
.breathing-mark {
    text-align: center;
    padding: 40px 0;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.breathing-mark.in-view {
    opacity: 0.6;
}

/* Reveal animation */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1s ease, transform 1s ease;
}

[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Specimen SVG path-draw */
.specimen-svg path,
.specimen-svg circle,
.specimen-svg rect,
.specimen-svg line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.in-view .specimen-svg path,
.in-view .specimen-svg circle,
.in-view .specimen-svg rect,
.in-view .specimen-svg line {
    stroke-dashoffset: 0;
}

/* End domain */
.end-domain {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: var(--amber);
}
