/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--alkula-text);
    background: var(--alkula-page-bg);
}

/* =========================================================
   PAGE
   ========================================================= */

.page {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 2rem 1.25rem;
}

.status-panel {
    width: 100%;
    max-width: 42rem;

    padding: 2.875rem;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent
        ),
        var(--alkula-surface);

    border: 1px solid var(--alkula-border);
    border-radius: 1.375rem;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.01);
}

/* =========================================================
   HEADER
   ========================================================= */

.alkula-brand {
    margin-bottom: 1.5rem;
}

h1 {
    margin: 0;

    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 650;

    letter-spacing: -0.035em;
}

.subtitle {
    margin: 0.75rem 0 1.875rem;

    color: var(--alkula-muted);

    font-size: 1rem;
    line-height: 1.6;
}

/* =========================================================
   OVERALL STATUS
   ========================================================= */

.overall {
    display: inline-flex;
    align-items: center;

    gap: 0.625rem;

    margin: 0 auto 2.125rem;

    padding: 0.6875rem 1rem;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid var(--alkula-border);
    border-radius: 999px;

    font-size: 0.8125rem;
    font-weight: 600;

    transition:
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.status-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--alkula-unknown);
}

.overall.operational {
    border-color: rgba(67, 209, 139, 0.25);
    background: rgba(67, 209, 139, 0.055);

    box-shadow:
        0 0 28px var(--alkula-green-glow);
}

.overall.operational .status-dot {
    background: var(--alkula-green);

    box-shadow:
        0 0 10px var(--alkula-green);

    animation: pulse 2s ease-in-out infinite;
}

.overall.down {
    border-color: rgba(255, 104, 104, 0.25);
    background: rgba(255, 104, 104, 0.055);

    box-shadow:
        0 0 28px var(--alkula-red-glow);
}

.overall.down .status-dot {
    background: var(--alkula-red);

    box-shadow:
        0 0 10px var(--alkula-red);
}

/* =========================================================
   SERVICES
   ========================================================= */

.services {
    overflow: hidden;

    background: rgba(255, 255, 255, 0.015);

    border: 1px solid var(--alkula-border);
    border-radius: 0.875rem;
}

.service {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1.1875rem 1.3125rem;

    transition: background 150ms ease;
}

.service + .service {
    border-top: 1px solid var(--alkula-border);
}

.service:hover {
    background: rgba(255, 255, 255, 0.025);
}

.service-name {
    font-size: 0.9375rem;
    font-weight: 550;
}

.service-state {
    font-size: 0.875rem;
    font-weight: 600;
}

.service-state.operational {
    color: var(--alkula-green);
}

.service-state.down {
    color: var(--alkula-red);
}

.service-state.unavailable,
.service-state.checking {
    color: var(--alkula-unknown);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.status-nav {
    width: 100%;
    max-width: 42rem;

    margin-top: 3rem;

    text-align: left;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.92);
    }
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
    margin-top: 5rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;

    text-align: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 37.5rem) {
    .status-panel {
        padding: 2rem 1.5rem;
        border-radius: 1.125rem;
    }

    .service {
        padding: 1.0625rem 1.125rem;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .status-dot {
        animation: none !important;
    }
}
