:root {
    --bg: #08090c;
    --bg-2: #0a0d12;
    --surface: rgba(18, 20, 26, 0.72);
    --surface-strong: rgba(24, 27, 34, 0.92);
    --line: rgba(190, 60, 70, 0.18);
    --line-strong: rgba(190, 60, 70, 0.36);
    --text: #e7e9ee;
    --muted: #9aa1ad;
    --accent: #d23b3b;
    --accent-soft: #ff6b6b;
    --ok: #4fd08a;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    --radius-lg: 26px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --content-width: 980px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", system-ui, sans-serif;
    line-height: 1.6;
    background:
        radial-gradient(circle at top, rgba(160, 40, 50, 0.16), transparent 42%),
        linear-gradient(180deg, #0b0d12 0%, #08090c 60%, #060709 100%);
    background-attachment: fixed;
}

/* faint horror scanlines + grain */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.018) 0px,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    opacity: 0.5;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    margin-bottom: 36px;
    background: rgba(10, 11, 15, 0.7);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.wordmark {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: 0.42em;
    font-size: 0.95rem;
    color: var(--text);
    text-shadow: 0 0 18px rgba(210, 59, 59, 0.45);
}

.backlink {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.backlink:hover { color: var(--accent-soft); }
.topbar-tag { margin: 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; }
.footer-addr { font-family: "Space Grotesk", ui-monospace, monospace; letter-spacing: 0.03em; }

/* ===== hub nav ===== */
a.wordmark { text-decoration: none; }
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; transition: color 0.2s; }
.nav a:hover { color: var(--accent-soft); }
.nav a.active { color: var(--text); }
.nav a.soon { opacity: 0.5; }

/* ===== home hub cards ===== */
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 46px 0; }
.hub-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s; }
.hub-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.hub-icon { font-size: 1.5rem; }
.hub-card h3 { margin: 4px 0 0; font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; }
.hub-card > p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.hub-go { margin-top: auto; padding-top: 10px; color: var(--accent-soft); font-size: 0.82rem; font-weight: 700; }
.hub-card.soon { opacity: 0.72; }
.hub-card.soon:hover { transform: none; box-shadow: none; }

/* ===== private-testing banner ===== */
.banner { display: flex; align-items: center; gap: 12px; max-width: 620px; margin: 26px auto 0; padding: 12px 18px; background: rgba(210,59,59,0.07); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: 0.86rem; }
.banner strong { color: var(--accent-soft); }

/* ===== inner page header ===== */
.page-head { padding: 6px 0 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 10px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent-soft); }
.page-head h1 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-size: clamp(2.1rem, 7vw, 3.4rem); letter-spacing: 0.06em; text-shadow: 0 0 36px rgba(210,59,59,0.3); }
.page-lead { margin: 0; max-width: 640px; color: var(--muted); font-size: 1.02rem; }
.crumbs { margin: 26px 0 16px; font-size: 0.82rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-soft); }

/* ===== field-guide section cards ===== */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: transform 0.15s, border-color 0.2s; }
.guide-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.guide-card h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.guide-card .tag { margin-top: auto; padding-top: 10px; font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.guide-card.soon { opacity: 0.55; }

/* ===== bestiary ===== */
.beast { margin-bottom: 22px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-md); }
.beast.lethal { border-left-color: var(--accent); }
.beast-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.beast-head h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; }
.threat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.threat.lethal { color: var(--accent-soft); border-color: var(--accent); }
.threat.harmless { color: var(--ok); border-color: rgba(79,208,138,0.4); }
.beast .classification { margin: 0 0 12px; font-size: 0.82rem; color: var(--muted); font-style: italic; }
.beast p { margin: 0 0 10px; color: #c9cdd6; }
.beast .tell { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.beast .tell strong { color: var(--text); }

/* ===== status page ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 4px 0 24px; }
.stat-box { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.stat-box .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.stat-box .v { margin-top: 6px; font-size: 1.55rem; font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.player-list { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface-strong); border: 1px solid var(--line); border-radius: 999px; font-size: 0.86rem; }

/* ===== placeholder ===== */
.placeholder { text-align: center; padding: 70px 20px; }
.placeholder .big { font-size: 2.8rem; margin-bottom: 14px; opacity: 0.5; }
.placeholder p { color: var(--muted); max-width: 460px; margin: 0 auto; }

.lore-more { margin: 20px 0 0; }
.lore-more a { color: var(--accent-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.lore-more a:hover { text-decoration: underline; }
.section-h { font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; margin: 0 0 14px; }

.join { margin: 46px 0; }
.join-title { margin: 0 0 18px; font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; }
.join .card-grid { margin: 0; }

/* ===== wiki content panels ===== */
.panel { padding: 26px 28px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.panel h2 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-size: 1.3rem; }
.panel p { margin: 0 0 12px; color: #c9cdd6; }
.panel p:last-child { margin-bottom: 0; }
.panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.panel li { color: var(--muted); padding-left: 16px; border-left: 2px solid var(--line-strong); }
.panel li strong { color: var(--text); }
.panel .lead-note { color: var(--accent-soft); font-size: 0.92rem; }

@media (max-width: 560px) { .nav { gap: 15px; } }

/* hero */
.hero { text-align: center; padding: 26px 0 12px; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 26px;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}
.status-pill .dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
}
.status-pill[data-state="online"] { color: var(--ok); border-color: rgba(79, 208, 138, 0.4); }
.status-pill[data-state="online"] .dot { background: var(--ok); box-shadow: 0 0 12px rgba(79, 208, 138, 0.7); animation: pulse 2.4s infinite; }
.status-pill[data-state="offline"] { color: var(--accent-soft); border-color: var(--line-strong); }
.status-pill[data-state="offline"] .dot { background: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

h1 {
    margin: 0 0 18px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(3.2rem, 12vw, 6rem);
    letter-spacing: 0.16em;
    line-height: 0.95;
    text-shadow: 0 0 40px rgba(210, 59, 59, 0.35);
}

.lead {
    max-width: 620px;
    margin: 0 auto 34px;
    color: var(--muted);
    font-size: 1.06rem;
}

/* connect card */
.connect-card {
    max-width: 460px;
    margin: 0 auto;
    padding: 22px 24px;
    background: var(--surface-strong);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}
.connect-label {
    margin: 0 0 12px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
}
.connect-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
#addr {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.copy-btn {
    padding: 0 18px;
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a0c0d;
    background: var(--accent-soft);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.12s, background 0.2s;
}
.copy-btn:hover { background: #ff8585; }
.copy-btn:active { transform: scale(0.96); }
.copy-btn.copied { background: var(--ok); color: #04140b; }
.connect-meta { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); }

/* card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 52px 0;
}
.card {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}
.card-kicker {
    margin: 0 0 10px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-soft);
}
.card h2 { margin: 0 0 12px; font-size: 1.3rem; font-family: "Space Grotesk", sans-serif; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card-note { font-size: 0.82rem; opacity: 0.85; margin-top: auto; }

.button {
    display: inline-block;
    align-self: flex-start;
    padding: 12px 22px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #1a0c0d;
    text-decoration: none;
    background: linear-gradient(120deg, var(--accent-soft), var(--accent));
    border-radius: var(--radius-sm);
    transition: transform 0.12s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(210, 59, 59, 0.35); }

.block-code {
    display: block;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-size: 1.05rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
}

/* lore */
.lore {
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.lore h2 { margin: 0 0 18px; font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; }
.lore-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.lore-list li { color: var(--muted); padding-left: 18px; border-left: 2px solid var(--line-strong); }
.lore-list strong { color: var(--text); }

/* footer */
.footer {
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}
.footer a { color: var(--accent-soft); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .topbar { margin-bottom: 24px; }
    .connect-row { flex-direction: column; }
    .copy-btn { padding: 12px; }
    .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .status-pill[data-state="online"] .dot { animation: none; }
}
