/* reiwa.boo - Ethereal Kaidan */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --spirit-dark: #0A0814;
    --candle-gold: #D4A850;
    --twilight-blue: #4A6080;
    --blood-red: #8A2A2A;
    --bone-white: #E8E0D8;
    --ash-gray: #8A8078;
    --bright-gold: #FFD700;
}
body {
    background: var(--spirit-dark);
    color: var(--bone-white);
    font-family: 'Noto Sans JP', 'Crimson Pro', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

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

/* Veil Sections */
.veil-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

/* Translucent Silk Veil Layer */
.veil-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10,8,20,0) 0%, rgba(74,96,128,0.04) 50%, rgba(10,8,20,0) 100%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 1s ease;
}

/* Candle Glow */
.candle-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    z-index: 0;
    filter: blur(80px);
    opacity: 0;
    transition: opacity 3s ease;
    animation: candleFlicker 6s ease-in-out infinite;
}
.candle-glow.lit {
    opacity: 0.08;
}
.glow-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--candle-gold) 0%, transparent 70%);
}
.glow-left {
    top: 40%;
    left: 20%;
    background: radial-gradient(circle, var(--candle-gold) 0%, transparent 70%);
}
.glow-right {
    top: 45%;
    right: 15%;
    background: radial-gradient(circle, var(--candle-gold) 0%, transparent 70%);
}
@keyframes candleFlicker {
    0%, 100% { opacity: 0.06; transform: translate(-50%, -50%) scale(1); }
    30% { opacity: 0.09; transform: translate(-50%, -50%) scale(1.05); }
    60% { opacity: 0.05; transform: translate(-50%, -50%) scale(0.97); }
}

/* Content */
.section-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: center;
    background: rgba(10,8,20,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 3rem;
    border: 1px solid rgba(212,168,80,0.08);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}
.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
.display-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--candle-gold);
    text-shadow: 0 0 40px rgba(212,168,80,0.15);
}
.hero-sub {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--ash-gray);
    margin-top: 1rem;
    font-style: italic;
}
.section-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 400;
    color: var(--candle-gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}
.section-body {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--bone-white);
    opacity: 0.85;
}
.vertical-jp {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.4rem;
    color: var(--blood-red);
    writing-mode: vertical-rl;
    display: inline-block;
    margin-bottom: 2rem;
    letter-spacing: 0.15em;
    opacity: 0.6;
}
.closing-text {
    font-style: italic;
    color: var(--ash-gray);
}

/* Section-specific background tints */
#hero { background: radial-gradient(ellipse at center 40%, rgba(212,168,80,0.03) 0%, transparent 60%); }
#kaidan { background: radial-gradient(ellipse at 20% 50%, rgba(138,42,42,0.04) 0%, transparent 50%); }
#spirits { background: radial-gradient(ellipse at 80% 40%, rgba(74,96,128,0.04) 0%, transparent 50%); }
#gathering { background: radial-gradient(ellipse at center, rgba(255,215,0,0.02) 0%, transparent 50%); }
#veil { background: radial-gradient(ellipse at center, rgba(138,42,42,0.03) 0%, transparent 50%); }

/* Footer */
#footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
}
.footer-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    color: var(--ash-gray);
    opacity: 0.3;
}

@media (max-width: 600px) {
    .section-content { padding: 2rem 1.5rem; }
    .candle-glow { width: 200px; height: 200px; }
}
