:root {
    /* Design typography notes: IBM Plex Mono appears only in metadata labels at 0.75rem; Albert Sans, Cormorant Garamond, Nunito Sans, and IBM Plex Mono" (Google Fonts) define the system. Intersection Observer (vanilla JS only) triggers the focus reveal. */
    --obsidian: #0a0a0a;
    --lacquer: #121008;
    --gold: #c9a84c;
    --pale-gold: #f5e6c8;
    --muted-gold: #d4c5a9;
    --bronze: #8a7d65;
    --jade: #2d8a6e;
    --violet: #6b4d8a;
    --ember: #a3522a;
    --focus: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    background: var(--obsidian);
}

body {
    min-height: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 12%, rgba(201, 168, 76, 0.055), transparent 28rem),
        linear-gradient(180deg, var(--lacquer), var(--obsidian) 46%, var(--lacquer));
    color: var(--muted-gold);
    font-family: "Nunito Sans", "Inter", sans-serif;
    font-weight: 300;
    animation: page-emerge 1500ms ease-out both;
}

@keyframes page-emerge {
    from { opacity: 0; }
    to { opacity: 1; }
}

.grain,
.grain::after {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.grain {
    z-index: 50;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

.grain::after {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' seed='17'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E");
}

.scroll-progress {
    position: fixed;
    top: 0;
    right: 16px;
    z-index: 40;
    width: 1px;
    height: 100vh;
    background: rgba(138, 125, 101, 0.16);
}

.scroll-progress span {
    display: block;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--gold), var(--pale-gold), var(--gold));
    box-shadow: 0 0 18px rgba(201, 168, 76, 0.35);
}

.pilgrimage {
    position: relative;
}

.chamber {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 9vh 5vw;
    isolation: isolate;
}

.chamber-2 { min-height: 108vh; }
.chamber-3 { min-height: 96vh; }
.chamber-4 { min-height: 112vh; }
.chamber-5 { min-height: 140vh; }

.washi-edge {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    height: 4px;
    background: repeating-linear-gradient(90deg, rgba(201, 168, 76, 0.05) 0 8px, rgba(138, 125, 101, 0.03) 8px 16px);
}

.aurora {
    position: absolute;
    top: -8%;
    bottom: -8%;
    z-index: -1;
    width: 38.2%;
    background:
        radial-gradient(ellipse 95% 52% at 68% 24%, rgba(45, 138, 110, 0.08), transparent 64%),
        radial-gradient(ellipse 120% 70% at 85% 60%, rgba(107, 77, 138, 0.06), transparent 68%),
        linear-gradient(90deg, transparent, rgba(245, 230, 200, 0.018), transparent);
    mix-blend-mode: screen;
    filter: blur(0.2px);
    animation: aurora-drift 30s ease-in-out infinite;
}

.aurora-right { right: 0; }
.aurora-left { left: 0; }
.aurora-center { left: 30.9%; opacity: 0.7; }
.aurora-peak {
    opacity: 1.75;
    background:
        radial-gradient(ellipse 110% 58% at 24% 30%, rgba(45, 138, 110, 0.15), transparent 66%),
        radial-gradient(ellipse 130% 76% at 16% 70%, rgba(107, 77, 138, 0.12), transparent 70%);
}

@keyframes aurora-drift {
    0% { transform: translateY(0) scaleX(1); }
    50% { transform: translateY(-30px) scaleX(1.05); }
    100% { transform: translateY(0) scaleX(1); }
}

.reveal-item {
    opacity: 0.3;
    transform: scale(1.15);
    filter: blur(2px);
    transition:
        opacity 1200ms var(--focus),
        transform 1200ms var(--focus),
        filter 1200ms var(--focus);
    transition-delay: calc(var(--stagger, 0) * 150ms);
}

.chamber.in-view .reveal-item {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.metadata {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--bronze);
}

.body-text {
    max-width: 58ch;
    color: var(--muted-gold);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
}

.hero {
    position: absolute;
    bottom: 15vh;
    left: 10vw;
    width: min(61.8vw, 980px);
}

.hero-title {
    margin: 0.35rem 0 1.65rem;
    color: var(--gold);
    font-family: "Albert Sans", "Inter", sans-serif;
    font-size: clamp(5rem, 14vw, 12rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 0 46px rgba(201, 168, 76, 0.11);
}

.hero-tagline,
.pull-quote,
.final-name {
    color: var(--pale-gold);
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 400;
}

.hero-tagline,
.pull-quote {
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.35;
}

.golden-columns {
    display: grid;
    grid-template-columns: 38fr 55fr;
    gap: 7%;
    width: min(1180px, 90vw);
    margin-top: 10vh;
}

.quote-side {
    position: relative;
    padding-left: 2rem;
}

.ember-line {
    position: absolute;
    top: 0.3rem;
    left: 0;
    width: 3px;
    height: 64px;
    background: var(--ember);
    box-shadow: 0 0 22px rgba(163, 82, 42, 0.28);
}

.quote-side .metadata { margin-top: 2.5rem; }

.text-side {
    padding-top: 12vh;
}

.narrow-passage {
    width: min(520px, 75vw);
    margin-top: 16vh;
    margin-left: 20%;
}

.narrow-passage .metadata,
.right-reflection .metadata {
    margin-bottom: 1.8rem;
}

.right-reflection {
    width: min(520px, 33vw);
    margin-top: 19vh;
    margin-left: 62%;
}

.gold-mark {
    position: absolute;
    bottom: 20px;
    left: 5vw;
    z-index: 8;
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
    cursor: pointer;
}

.gold-mark span,
.gold-mark::before {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 1px;
    width: 0;
    content: "";
    background: var(--gold);
    transform: translate(-50%, -50%);
    transition: width 600ms ease-out;
}

.gold-mark:hover span,
.gold-mark:hover::before {
    width: 160px;
}

.gold-mark.pulse {
    animation: dot-pulse 1000ms ease-out;
}

@keyframes dot-pulse {
    0% { transform: scale(1); }
    55% { transform: scale(1.65); }
    100% { transform: scale(1); }
}

.chamber-5 {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 31vh;
}

.closing {
    position: relative;
    z-index: 2;
    text-align: center;
}

.final-name {
    margin-bottom: 2.6rem;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.final-dot {
    width: 24px;
    height: 24px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.4);
}

.chamber-5.in-view .final-dot {
    animation: soft-pulse 3s ease-in-out infinite;
}

@keyframes soft-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(201, 168, 76, 0.4); }
    50% { transform: scale(1.2); box-shadow: 0 0 50px rgba(201, 168, 76, 0.6); }
}

.void {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 40vh;
    width: 100%;
}

@media (max-width: 768px) {
    .chamber {
        padding: 8vh 12vw 8vh 5vw;
    }

    .scroll-progress { right: 4px; }

    .aurora {
        right: 0;
        left: 0;
        width: 100%;
        opacity: 0.5;
    }

    .hero {
        left: 5vw;
        right: 12vw;
        width: auto;
    }

    .golden-columns {
        display: block;
        width: 100%;
        margin-top: 9vh;
    }

    .text-side { padding-top: 3.5rem; }

    .narrow-passage,
    .right-reflection {
        width: 100%;
        margin-left: 0;
    }

    .gold-mark:hover span,
    .gold-mark:hover::before { width: 0; }
}
