:root {
    color-scheme: dark;
    --bg: #080a0e;
    --surface: #0f131a;
    --surface-hover: #141923;
    --border: #1e2530;
    --border-accent: rgba(225, 29, 72, 0.35);
    --text: #eef2f6;
    --muted: #8892a0;
    --subtle: #555f6e;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --accent-glow: rgba(225, 29, 72, 0.12);
    --ok: #10b981;
    --radius-lg: 14px;
    --radius-md: 8px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
    position: relative;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.ambient-glow {
    position: fixed;
    inset: -20% 0 auto 0;
    height: 60vh;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-glow), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4rem;
}

/* --- Topbar --- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.brand-sep {
    color: var(--subtle);
}

.brand-sub {
    color: var(--muted);
    font-weight: 400;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--ok);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* --- Hero --- */

.hero {
    max-width: 660px;
    padding: 1rem 0;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.35rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ping-output {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted);
}

.ping-output.is-ok {
    color: var(--ok);
}

.ping-output.is-err {
    color: var(--accent);
}

/* --- Pillars --- */

.pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.pillar {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pillar:hover {
    background-color: var(--surface-hover);
    border-color: var(--border-accent);
}

.pillar-index {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.pillar-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pillar-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
}

/* --- Footer --- */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--subtle);
}

.footer-domain {
    font-family: var(--font-mono);
}

/* --- 404 Card --- */

.card {
    width: 100%;
    max-width: 520px;
    margin: auto;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lead {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .shell {
        gap: 2.75rem;
        padding: 1.5rem 1.25rem;
    }

    .pillars {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
