/* ===== lovebot.quest - Spectral Love Letter ===== */

:root {
    --void-ground: #0A0E27;
    --primary-glow: #6B9FD4;
    --accent-radiance: #A8C8F0;
    --warm-pulse: #C4A8E0;
    --whisper-white: #E8EEF8;
    --deep-current: #1A2744;
    --signal-blush: #D4A8B8;
    --bioluminescent: #88D4C8;
}

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

body {
    background: var(--void-ground);
    color: var(--whisper-white);
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

/* Custom cursor */
#custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(168, 200, 240, 0.4);
    box-shadow: 0 0 30px 10px rgba(168, 200, 240, 0.15);
    pointer-events: none;
    z-index: 1000;
    transition: width 300ms ease, height 300ms ease, background 300ms ease, box-shadow 300ms ease;
    transform: translate(-50%, -50%);
}

#custom-cursor.blush {
    width: 20px;
    height: 20px;
    background: rgba(212, 168, 184, 0.4);
    box-shadow: 0 0 40px 15px rgba(212, 168, 184, 0.2);
}

/* Particle canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== Hero ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.dissolving-portrait {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 3rem;
}

.eye {
    position: absolute;
    width: 28px;
    height: 16px;
    border-radius: 50%;
    top: 55px;
}

.left-eye {
    left: 38px;
    box-shadow: 0 0 30px 12px rgba(136, 212, 200, 0.15);
}

.right-eye {
    right: 38px;
    box-shadow: 0 0 30px 12px rgba(136, 212, 200, 0.15);
}

.mouth-curve {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 20px;
    border-bottom: 2px solid rgba(212, 168, 184, 0.12);
    border-radius: 0 0 50% 50%;
}

#site-title {
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.3em;
    color: var(--whisper-white);
    opacity: 0;
}

#site-title .letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 200ms ease;
}

#site-title .letter.visible {
    opacity: 1;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent-radiance);
    opacity: 0;
    transition: opacity 600ms ease;
    margin-top: 1rem;
}

.hero-subtitle.visible {
    opacity: 0.6;
}

/* ===== Whisper Interludes ===== */
.whisper-interlude {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.whisper-text {
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    letter-spacing: 0.08em;
    color: var(--whisper-white);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease, transform 600ms ease, font-weight 400ms ease;
    line-height: 1.6;
}

.whisper-text.visible {
    opacity: 0.8;
    transform: translateY(0);
}

/* ===== Grid Container ===== */
.grid-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1rem, 3vw, 2.5rem);
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 3rem);
}

/* ===== Grid Cells ===== */
.grid-cell {
    background: var(--deep-current);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease, box-shadow 400ms ease;
    box-shadow: 0 0 60px 20px rgba(107, 159, 212, 0.08);
}

.grid-cell.visible {
    opacity: 1;
    transform: translateY(0);
}

.grid-cell:hover {
    box-shadow: 0 0 60px 20px rgba(107, 159, 212, 0.15);
}

.grid-cell.span-2 {
    grid-column: span 2;
}

.cell-meta {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.625rem, 1vw, 0.75rem);
    color: var(--primary-glow);
    opacity: 0.4;
    display: block;
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
}

.grid-cell h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.08em;
    color: var(--accent-radiance);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.grid-cell p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
    color: var(--whisper-white);
    opacity: 0.75;
}

/* ===== Heartbeat Wave ===== */
.heartbeat-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    pointer-events: none;
    opacity: 0.2;
}

/* ===== Pulse Bar Navigation ===== */
#pulse-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    z-index: 50;
    padding: 0.75rem 1.5rem;
    background: rgba(10, 14, 39, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-glow);
    opacity: 0.3;
    cursor: pointer;
    position: relative;
    transition: opacity 300ms ease;
}

.pulse-dot.active {
    opacity: 1;
    animation: dotPulse 2s ease-in-out infinite;
}

.pulse-dot::after {
    content: attr(data-label);
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--accent-radiance);
    opacity: 0;
    transition: opacity 300ms ease;
    white-space: nowrap;
}

.pulse-dot:hover::after {
    opacity: 0.6;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107, 159, 212, 0.4); }
    50% { box-shadow: 0 0 8px 4px rgba(107, 159, 212, 0.2); }
}

/* ===== Ether Background Animation ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(74, 126, 194, 0.03), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(74, 126, 194, 0.03), transparent 60%);
    animation: etherDrift 40s ease-in-out infinite alternate;
}

@keyframes etherDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, -20px) scale(1.05); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .grid-cell.span-2 {
        grid-column: span 1;
    }

    .whisper-interlude {
        padding: 5rem 1.5rem;
    }

    body {
        cursor: auto;
    }

    #custom-cursor {
        display: none;
    }
}
