/* --- Design System & Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: #c9cecf;
    font-family: 'Plus Jakarta Sans', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* --- Ghostly Background Canvas --- */
#ambient-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- CRT & Vignette Overlays --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: radial-gradient(circle at center, transparent 20%, rgba(3, 3, 3, 0.85) 100%);
    pointer-events: none;
}

/* Subtle Scanlines */
.overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
    z-index: 2;
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.15;
}

/* --- Layout Container --- */
.content-wrapper {
    position: relative;
    z-index: 3;
    width: 90%;
    max-width: 650px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

/* --- Header & Status --- */
header {
    width: 100%;
}

.status-indicator {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    color: #8fa2a6;
    opacity: 0.5;
    animation: statusPulse 5s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 0.35;
        text-shadow: 0 0 4px rgba(143, 162, 166, 0.1);
    }
    50% {
        opacity: 0.75;
        text-shadow: 0 0 10px rgba(143, 162, 166, 0.5);
    }
}

/* --- Main Central Typography --- */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin: auto 0;
}

.title {
    font-family: 'Special Elite', monospace;
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #f0f4f5;
    text-shadow: 0 0 20px rgba(240, 244, 245, 0.08);
    margin-bottom: 0.4rem;
    opacity: 0;
    animation: ghostlyFadeIn 3.5s forwards ease-out;
    animation-delay: 0.3s;
}

.tagline {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #8fa2a6;
    opacity: 0;
    animation: ghostlyFadeIn 3.5s forwards ease-out;
    animation-delay: 1s;
}

.description {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #7b8385;
    max-width: 420px;
    margin-top: 0.8rem;
    opacity: 0;
    animation: ghostlyFadeIn 3.5s forwards ease-out;
    animation-delay: 1.8s;
}

.description a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.description a:hover {
    color: #8fa2a6;
    text-decoration: underline;
}

@keyframes ghostlyFadeIn {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}


/* --- Footer & Interactive Drone Toggle --- */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.7rem;
    font-family: 'Courier Prime', monospace;
}

.sound-toggle {
    background: transparent;
    border: none;
    outline: none;
    color: #8fa2a6;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0.4;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.sound-toggle:hover {
    opacity: 0.85;
    color: #f0f4f5;
}

.sound-icon {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #8fa2a6;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.sound-toggle.active .sound-icon {
    background-color: #e58f8f; /* a soft, ghostly blood-red/rose glow when active */
    box-shadow: 0 0 8px #e58f8f;
    animation: soundHeartbeat 2s infinite ease-in-out;
}

.sound-toggle.active {
    opacity: 0.9;
    color: #f0f4f5;
}

@keyframes soundHeartbeat {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 1; }
}

.copyright {
    color: #4a5153;
    letter-spacing: 0.08em;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    .title {
        font-size: 2.2rem;
    }
    .tagline {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }
    .description {
        font-size: 0.75rem;
        padding: 0 0.5rem;
    }
    .content-wrapper {
        height: 85vh;
    }
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
