:root {
    --deep-obsidian: #0a0a0f;
    --charcoal-slate: #16151e;
    --muted-violet: #4a3f6b;
    --alchemical-gold: #c9a84c;
    --psyche-rose: #b34d6d;
    --sage-teal: #3d8b8b;
    --parchment: #d4cfc4;
    --electric-lavender: #9b7ef0;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--deep-obsidian);
    color: var(--parchment);
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.15vw, 1.25rem);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

#grain-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 200px;
}

#spine {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: var(--muted-violet);
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.5;
}

/* Nav symbols */
#nav-symbols {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.nav-sym {
    color: var(--muted-violet);
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s;
    text-decoration: none;
}

.nav-sym.active { opacity: 1; color: var(--alchemical-gold); }
.nav-sym:hover { opacity: 1; }

/* Sections */
.archetype-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10;
    overflow: hidden;
}

/* Ghost text */
.ghost-text {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-size: 30vw;
    font-weight: 900;
    color: var(--charcoal-slate);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    left: -5vw;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}

/* Halos */
.halo {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.halo-gold { background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%); top: 20%; left: 10%; }
.halo-rose { background: radial-gradient(circle, rgba(179,77,109,0.08) 0%, transparent 70%); top: 15%; right: 5%; }
.halo-teal { background: radial-gradient(circle, rgba(61,139,139,0.08) 0%, transparent 70%); top: 25%; left: 5%; }
.halo-lavender { background: radial-gradient(circle, rgba(155,126,240,0.08) 0%, transparent 70%); top: 20%; right: 10%; }
.halo-all { background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, rgba(155,126,240,0.04) 40%, transparent 70%); top: 20%; left: 20%; }

/* Content positioning */
.section-content {
    position: relative;
    z-index: 10;
    max-width: 550px;
    padding: 3rem;
}

.content-left { margin-left: 8vw; margin-right: auto; }
.content-right { margin-right: 8vw; margin-left: auto; }
.content-center { margin: 0 auto; text-align: center; }

/* Sigils */
.sigil-container { margin-bottom: 2rem; }

.sigil-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.archetype-section.visible .sigil-path {
    stroke-dashoffset: 0;
}

/* Archetype names */
.archetype-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 10rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.section-hero .archetype-name { color: var(--alchemical-gold); }
.section-shadow .archetype-name { color: var(--psyche-rose); }
.section-sage .archetype-name { color: var(--sage-teal); }
.section-trickster .archetype-name { color: var(--electric-lavender); }
.section-self .archetype-name { color: var(--alchemical-gold); }

.archetype-text {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s 0.5s ease, transform 1.5s 0.5s ease;
}

.archetype-section.visible .archetype-text {
    opacity: 1;
    transform: translateY(0);
}

/* Spine annotations */
.spine-annotation {
    position: absolute;
    left: 50%;
    top: 2rem;
    transform: translateX(12px);
    font-family: 'Inconsolata', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-violet);
    opacity: 0.6;
}

/* Domain echo */
.domain-echo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--alchemical-gold);
    letter-spacing: 0.02em;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 2s 1s ease;
}

.archetype-section.visible .domain-echo {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .content-left, .content-right { margin: 0; padding: 2rem; }
    #spine { display: none; }
    .ghost-text { display: none; }
    #nav-symbols { bottom: 1rem; right: 1rem; gap: 0.8rem; }
    .spine-annotation { display: none; }
    .halo { width: 90vw; height: 90vw; }
}
