/* === continu.st styles === */
/* Colors: #0E0A18, #1A1428, #3A2E5A, #7A5EB0, #5AA0B0, #4AB0A0, #E0D8F0, #8A7EB0 */
/* Extra: #B0A050 (paused amber), #5A3E8A (data stream line) */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0E0A18;
    color: #E0D8F0;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* Noise Overlay */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    mix-blend-mode: overlay;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    transition: opacity 0.5s ease;
}

#noise-overlay.visible {
    opacity: 0.05;
}

/* Aurora Background */
#aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 3s ease;
    background:
        linear-gradient(150deg, #2A1E4A, #1E3A5A, #0E0A18, #3A1E5A),
        linear-gradient(210deg, #1E4A5A, #0E0A18, #2A1E4A, #1E3A5A),
        linear-gradient(330deg, #3A1E5A, #1E4A5A, #1E3A5A, #0E0A18);
    background-size: 300% 300%, 300% 300%, 300% 300%;
    animation: auroraShift1 40s ease-in-out infinite, auroraShift2 55s ease-in-out infinite, auroraShift3 70s ease-in-out infinite;
}

#aurora-bg.visible {
    opacity: 0.2;
}

@keyframes auroraShift1 {
    0%, 100% { background-position: 0% 50%, 50% 50%, 100% 50%; }
    50% { background-position: 100% 50%, 0% 100%, 50% 0%; }
}

@keyframes auroraShift2 {
    0%, 100% { background-position: 50% 0%, 100% 50%, 0% 100%; }
    50% { background-position: 0% 100%, 50% 0%, 100% 50%; }
}

@keyframes auroraShift3 {
    0%, 100% { background-position: 100% 100%, 0% 0%, 50% 50%; }
    50% { background-position: 50% 0%, 100% 100%, 0% 50%; }
}

body > *:not(#aurora-bg):not(#noise-overlay) {
    position: relative;
    z-index: 1;
}

/* === Navigation === */
#dash-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: rgba(14, 10, 24, 0.9);
    border-bottom: 1px solid rgba(58, 46, 90, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}

.nav-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #E0D8F0;
}

.nav-tabs {
    display: flex;
    gap: 24px;
}

.nav-tab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #8A7EB0;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-tab.active {
    color: #7A5EB0;
    border-bottom-color: #7A5EB0;
}

.nav-tab:hover {
    color: #E0D8F0;
}

/* === Hero === */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 48px;
}

.hero-primary {
    flex: 7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.aurora-accent {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.aurora-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(122, 94, 176, 0.12) 0%, transparent 70%);
    top: 10%;
    left: 20%;
    animation: auroraDrift 90s ease-in-out infinite;
}

.aurora-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(90, 160, 176, 0.08) 0%, transparent 70%);
    bottom: 10%;
    right: 15%;
    animation: auroraDrift 90s ease-in-out infinite reverse;
}

@keyframes auroraDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -20px); }
    50% { transform: translate(-20px, 30px); }
    75% { transform: translate(20px, 20px); }
}

#hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #E0D8F0;
    letter-spacing: 0.4em;
    filter: blur(12px);
    opacity: 0;
    transition: filter 1.2s ease, letter-spacing 1.2s ease, opacity 1s ease;
}

#hero-title.visible {
    filter: blur(0);
    letter-spacing: 0.1em;
    opacity: 1;
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #8A7EB0;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-sub.visible {
    opacity: 1;
}

/* === Status Strip === */
.status-strip {
    flex: 3;
    display: flex;
    border-top: 1px solid rgba(58, 46, 90, 0.6);
}

.metric-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(58, 46, 90, 0.6);
    padding: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.metric-panel:last-child {
    border-right: none;
}

.metric-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #8A7EB0;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #E0D8F0;
}

.metric-state-text {
    color: #4AB0A0;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
}

.metric-unit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8A7EB0;
    margin-top: 4px;
}

/* === Data Stream Lines === */
.data-stream-line {
    position: relative;
    width: 100%;
    height: 1px;
    background: rgba(90, 62, 138, 0.2); /* #5A3E8A at 20% */
    overflow: hidden;
}

.data-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7A5EB0;
    top: -1.5px;
    animation: flowDot 20s linear infinite;
}

.bottom-stream .data-dot {
    background: #5AA0B0;
    animation-duration: 25s;
}

@keyframes flowDot {
    0% { left: -4px; }
    100% { left: 100%; }
}

/* === Module Grid === */
#module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

.dash-module {
    border: 1px solid rgba(58, 46, 90, 0.6);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.dash-module.visible {
    opacity: 1;
}

.module-header {
    height: 40px;
    background: #1A1428;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

.status-dot.running {
    background: #4AB0A0;
}

.status-dot.monitoring {
    background: #7A5EB0;
}

.status-dot.paused {
    background: #B0A050;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.module-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #E0D8F0;
}

.module-body {
    padding: 32px;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.dash-module.visible .module-body {
    opacity: 1;
}

.module-body h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: #E0D8F0;
    margin-bottom: 16px;
}

.module-body p {
    color: #E0D8F0;
    margin-bottom: 12px;
}

.module-body p:last-child {
    margin-bottom: 0;
}

/* === Footer === */
#footer {
    padding: 48px 32px;
    border-top: 1px solid rgba(58, 46, 90, 0.6);
}

.footer-bar {
    display: flex;
    justify-content: space-between;
}

.footer-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #8A7EB0;
}

/* === Responsive === */
@media (max-width: 768px) {
    #module-grid {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .status-strip {
        flex-direction: column;
    }

    .metric-panel {
        border-right: none;
        border-bottom: 1px solid rgba(58, 46, 90, 0.6);
    }

    .metric-panel:last-child {
        border-bottom: none;
    }

    #dash-nav {
        padding: 0 16px;
    }

    .nav-tabs {
        gap: 12px;
    }

    .footer-bar {
        flex-direction: column;
        gap: 8px;
    }
}
