/* luminous.day -- a meditation on light */

/*
 * Design references (from DESIGN.md): "Cormorant Garamond" "Source Sans 3" "Lora" (Google Fonts).
 * IntersectionObserver toggles the `.illuminated` class which transitions the
 * radial-gradient background intensity. Soft halos breathe; the pulse intensifies.
 */

:root {
    --void: #0a0a12;
    --filament: #ffdca0;
    --halo: #ffe8c2;
    --moonlight: #e8e4f0;
    --twilight: #0d1b2a;
    --biolume: #64ffda;
    --corona: #ff9f43;
    --mist: rgba(255, 220, 160, 0.08);

    --font-display: 'Cormorant Garamond', 'Lora', Georgia, serif;
    --font-body: 'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Lora', Georgia, serif;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--void);
    color: var(--moonlight);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.85;
    font-size: 1rem;
    min-height: 100vh;
    position: relative;
    background-image:
        radial-gradient(ellipse at 15% 8%, rgba(255, 220, 160, 0.04) 0%, transparent 38%),
        radial-gradient(ellipse at 85% 92%, rgba(100, 255, 218, 0.03) 0%, transparent 42%);
}

/* ---- Particle Field ---- */
.particle-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle-field span {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--biolume);
    opacity: 0.3;
    box-shadow: 0 0 6px rgba(100, 255, 218, 0.6);
    animation-name: float;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}

@keyframes float {
    from {
        transform: translateY(110vh) translateX(0);
        opacity: 0;
    }
    8% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.6;
    }
    92% {
        opacity: 0.35;
    }
    to {
        transform: translateY(-12vh) translateX(var(--drift, 12px));
        opacity: 0;
    }
}

/* ---- Stage Layout ---- */
.luminous-stage {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- The Dawn (Hero) ---- */
.dawn {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem;
    overflow: hidden;
}

.light-rays {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 140vh;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 220, 160, 0.0) 20%,
        rgba(255, 220, 160, 0.18) 50%,
        rgba(255, 220, 160, 0.0) 80%,
        transparent 100%
    );
    transform-origin: center top;
    opacity: 0;
    animation: ray-emerge 3s 0.6s ease-out forwards, ray-breathe 8s 3.6s ease-in-out infinite;
}

.ray-1 { transform: translate(-50%, -30%) rotate(15deg); }
.ray-2 { transform: translate(-50%, -30%) rotate(45deg); }
.ray-3 { transform: translate(-50%, -30%) rotate(75deg); }

@keyframes ray-emerge {
    from { opacity: 0; }
    to   { opacity: 0.9; }
}

@keyframes ray-breathe {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

.hero-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2rem, 7vw, 4rem);
    letter-spacing: 0.02em;
    color: var(--filament);
    line-height: 1.1;
    margin: 0;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.3em);
    animation: appear 0.9s forwards;
    text-shadow:
        0 0 20px var(--filament),
        0 0 40px rgba(255, 220, 160, 0.3);
    will-change: opacity, transform;
}

.hero-title .char.dot {
    color: var(--halo);
    margin: 0 0.04em;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(0.3em);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Stagger characters */
.hero-title .char:nth-child(1)  { animation-delay: 0.30s; }
.hero-title .char:nth-child(2)  { animation-delay: 0.45s; }
.hero-title .char:nth-child(3)  { animation-delay: 0.60s; }
.hero-title .char:nth-child(4)  { animation-delay: 0.75s; }
.hero-title .char:nth-child(5)  { animation-delay: 0.90s; }
.hero-title .char:nth-child(6)  { animation-delay: 1.05s; }
.hero-title .char:nth-child(7)  { animation-delay: 1.20s; }
.hero-title .char:nth-child(8)  { animation-delay: 1.35s; }
.hero-title .char:nth-child(9)  { animation-delay: 1.50s; }
.hero-title .char:nth-child(10) { animation-delay: 1.65s; }
.hero-title .char:nth-child(11) { animation-delay: 1.80s; }
.hero-title .char:nth-child(12) { animation-delay: 1.95s; }

/* Pulse: applied after typewriter completes */
.hero-title.is-pulsing .char {
    animation: appear 0.9s forwards, halo-pulse 4s ease-in-out infinite;
}

@keyframes halo-pulse {
    0%, 100% {
        text-shadow:
            0 0 20px var(--filament),
            0 0 40px rgba(255, 220, 160, 0.3);
    }
    50% {
        text-shadow:
            0 0 28px var(--filament),
            0 0 60px rgba(255, 220, 160, 0.55),
            0 0 90px rgba(255, 159, 67, 0.18);
    }
}

.hero-tagline {
    position: relative;
    z-index: 1;
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    color: var(--moonlight);
    margin-top: 2.5rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fade-in 2s 2.4s ease-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(0.6rem); }
    to   { opacity: 0.85; transform: translateY(0); }
}

/* ---- Light Pool Sections ---- */
.light-pool {
    position: relative;
    margin: 0 auto;
    padding: 8rem 1.5rem;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(255, 220, 160, 0.02) 0%, transparent 70%);
    transition: background 1.2s ease-out;
}

.light-pool.illuminated {
    background: radial-gradient(ellipse at center, rgba(255, 220, 160, 0.08) 0%, transparent 70%);
}

.pool-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--filament);
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
    text-shadow:
        0 0 15px rgba(255, 220, 160, 0.5),
        0 0 30px rgba(255, 220, 160, 0.2);
    animation: heading-breathe 4s ease-in-out infinite;
}

@keyframes heading-breathe {
    0%, 100% {
        text-shadow:
            0 0 15px rgba(255, 220, 160, 0.5),
            0 0 30px rgba(255, 220, 160, 0.2);
        opacity: 0.85;
    }
    50% {
        text-shadow:
            0 0 22px rgba(255, 220, 160, 0.75),
            0 0 50px rgba(255, 220, 160, 0.4);
        opacity: 1;
    }
}

.pool-body {
    color: var(--moonlight);
    font-size: 1.05rem;
    line-height: 1.85;
    margin: 0 auto 1.5rem;
    max-width: 36em;
    opacity: 0.92;
}

.pool-quote {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    color: var(--halo);
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 3rem auto 0;
    max-width: 32em;
    padding: 0 2rem;
    border-left: 1px solid rgba(255, 220, 160, 0.18);
    border-right: 1px solid rgba(255, 220, 160, 0.18);
    text-shadow: 0 0 24px rgba(255, 232, 194, 0.18);
}

.pool-list {
    list-style: none;
    margin: 1.5rem auto 0;
    padding: 0;
    max-width: 30em;
    text-align: left;
}

.pool-list li {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.55rem 0;
    color: var(--moonlight);
    font-size: 1rem;
    border-bottom: 1px solid rgba(232, 228, 240, 0.06);
}

.pool-list li:last-child { border-bottom: none; }

.list-mark {
    flex: 0 0 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--biolume);
    box-shadow: 0 0 8px rgba(100, 255, 218, 0.7);
    transform: translateY(-2px);
}

.list-text { flex: 1 1 auto; }

/* ---- Hours Section ---- */
.hours-list {
    margin: 1rem auto 0;
    max-width: 36em;
    text-align: left;
}

.hour-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(232, 228, 240, 0.06);
}

.hour-row:last-child { border-bottom: none; }

.hour-name {
    flex: 0 0 5.5rem;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--filament);
    letter-spacing: 0.05em;
    text-shadow: 0 0 12px rgba(255, 220, 160, 0.35);
}

.hour-line {
    flex: 0 0 2.5rem;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 220, 160, 0.5), rgba(255, 220, 160, 0));
}

.hour-note {
    flex: 1 1 auto;
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 0.98rem;
    color: var(--moonlight);
    opacity: 0.78;
    line-height: 1.5;
}

/* ---- Correspondence ---- */
.pool-link-line {
    margin-top: 2rem;
    font-size: 1.1rem;
}

.pool-link {
    color: var(--biolume);
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-bottom: 1px solid rgba(100, 255, 218, 0.3);
    padding-bottom: 0.15rem;
    text-shadow: 0 0 18px rgba(100, 255, 218, 0.45);
    transition: color 0.5s ease, text-shadow 0.5s ease, border-color 0.5s ease;
}

.pool-link:hover {
    color: var(--corona);
    border-bottom-color: rgba(255, 159, 67, 0.6);
    text-shadow:
        0 0 18px rgba(255, 159, 67, 0.55),
        0 0 36px rgba(255, 159, 67, 0.25);
}

/* ---- The Dusk (Footer) ---- */
.dusk {
    position: relative;
    margin-top: 6rem;
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    background: linear-gradient(to bottom, transparent 0%, var(--twilight) 80%, var(--twilight) 100%);
}

.dusk-line {
    color: var(--moonlight);
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.4;
    letter-spacing: 0.05em;
}

.dusk-line-faint { opacity: 0.28; margin-top: 0.5rem; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .luminous-stage { padding: 0 1rem; }
    .dawn { padding: 4rem 0.5rem; }
    .light-pool { padding: 5rem 1rem; }
    .pool-quote { padding: 0 1rem; font-size: 1.05rem; }
    .hour-row { flex-wrap: wrap; }
    .hour-name { flex: 0 0 4.5rem; font-size: 1.1rem; }
    .hour-line { flex: 0 0 1.5rem; }
    .hour-note { flex: 1 1 100%; padding-left: 6rem; margin-top: -0.4rem; font-size: 0.9rem; }
}

@media (max-width: 400px) {
    .hero-title { font-size: clamp(1.75rem, 9vw, 2.5rem); }
    .pool-heading { font-size: 1.5rem; }
}
