:root {
    --bg: #0b0d0c;
    --panel: #111410;
    --line: #3c4038;
    --ink: #ddd8ca;
    --muted: #9c9b91;
    --rust: #9d5839;
    --army: #66705a;
    --online: #8fbf8a;
    --offline: #c17a6e;
}

* { box-sizing: border-box; }

html { background: #080a09; scroll-behavior: smooth; }

body {
    margin: 0;
    background: #080a09;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.12;
    mix-blend-mode: overlay;
    background-image: repeating-linear-gradient(0deg, transparent 0 3px, #fff 4px);
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero.page-banner { min-height: 42vh; }

.hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

.vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(4,6,5,0.2), rgba(4,6,5,0.3) 48%, #080a09 98%);
}

.topnav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 5vw;
    border-bottom: 1px solid #ffffff18;
    background: #080a09a8;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.topnav .brand {
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.nav-toggle-input { display: none; }

.nav-burger {
    display: none;
    color: var(--ink);
    font-size: 1.4rem;
    cursor: pointer;
}

.topnav .links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px;
}

.topnav .links a {
    color: #d5d2c8;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
    transition: color 0.2s;
}

.topnav .links a:hover { color: #fff; }

.topnav .links a.current {
    color: #fff;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
}

.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-trigger {
    color: #d5d2c8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.dropdown-trigger::after {
    content: ' \25BE';
    font-size: 0.85em;
}

.dropdown-trigger:hover,
.dropdown-trigger:focus-visible { color: #fff; }

.dropdown-trigger.current {
    color: #fff;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 0.9rem;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #0c0f0dee;
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    padding: 1rem 1.25rem;
    min-width: 170px;
}

.dropdown-menu a {
    color: #d5d2c8;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
    transition: color 0.2s;
}

.dropdown-menu a:hover { color: #fff; }
.dropdown-menu a.current { color: #fff; }

@media (max-width: 760px) {
    .nav-burger { display: block; }
    .topnav .links {
        display: none;
        position: absolute;
        top: 100%;
        right: 5vw;
        left: 5vw;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.1rem;
        background: #0c0f0dee;
        backdrop-filter: blur(14px);
        border: 1px solid var(--line);
        padding: 1.25rem 1.5rem;
    }
    .nav-toggle-input:checked ~ .hero .links { display: flex; }

    .dropdown { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
    .dropdown-trigger { pointer-events: none; color: var(--ink); font-weight: 700; }
    .dropdown-trigger.current { border-bottom: none; padding-bottom: 0; }
    .dropdown-menu { position: static; transform: none; padding-top: 0; opacity: 1; visibility: visible; pointer-events: auto; }
    .dropdown-menu-inner { margin-left: 1rem; gap: 0.9rem; background: none; backdrop-filter: none; border: none; padding: 0; min-width: 0; }
}

.hero-card {
    position: relative;
    z-index: 2;
    margin: auto 0 8vh 6vw;
    max-width: min(680px, 88vw);
    text-shadow: 0 2px 14px #000;
}

.page-banner-card { margin: auto 0 6vh 6vw; }

.page-banner-card h1 {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    margin: 0 0 0.6rem;
}

.page-banner-card .tagline { max-width: 60ch; }

.kicker {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #c0b8a3;
}

.title-block h1 {
    margin: 14px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.82;
    letter-spacing: -0.055em;
    color: var(--ink);
}

.tagline {
    font-family: Arial, Helvetica, sans-serif;
    color: #d0cdc4;
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 570px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.cta {
    display: inline-block;
    margin-top: 16px;
    color: #eee9dd;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid #aaa99c;
    padding: 14px 20px;
    background: #0c0f0d99;
    transition: background 0.15s;
}

.cta:hover { background: rgba(255, 255, 255, 0.08); }

.cta-discord {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #aaa99c;
}

.cta-discord:hover { background: rgba(255, 255, 255, 0.18); }

.status-chip {
    position: relative;
    z-index: 2;
    align-self: flex-end;
    margin: 0 5vw 2.5rem auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #0c0f0dcc;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    font-size: 0.8rem;
    color: var(--ink);
    width: fit-content;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--muted);
}
.dot.online { background: var(--online); box-shadow: 0 0 8px rgba(111, 174, 114, 0.7); }
.dot.offline { background: var(--offline); box-shadow: 0 0 8px rgba(193, 122, 110, 0.6); }

/* ---------- main layout ---------- */

main {
    max-width: 1180px;
    margin: auto;
    padding: 90px 28px;
    display: grid;
    gap: 60px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 30px;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

h2 {
    font-size: clamp(32px, 5vw, 60px);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.section-head p {
    color: var(--muted);
    max-width: 440px;
    line-height: 1.55;
    margin: 0;
}

.lede {
    color: var(--muted);
    margin: -0.5rem 0 1.5rem;
    line-height: 1.55;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.card {
    display: block;
    min-height: 390px;
    border: 1px solid var(--line);
    padding: 28px;
    background: linear-gradient(145deg, #171a17, #0d100e);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s;
}

.card:hover { border-color: #ffffff40; }

.card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid #ffffff10;
    transform: rotate(45deg);
    right: -110px;
    top: -70px;
}

.tag {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #aaa;
}

.card h3 {
    font-size: 30px;
    margin: 15px 0 6px;
    text-transform: uppercase;
    color: var(--ink);
}

.card p { color: #aaa99f; line-height: 1.6; }

.ledger { border-top: 3px solid #8c7559; }
.cordon { border-top: 3px solid #68705e; }
.commons { border-top: 3px solid #8a5544; }

.stat {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid #ffffff17;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    color: #8e9088;
}

@media (max-width: 800px) {
    .grid { grid-template-columns: 1fr; }
    .section-head { display: block; }
}

/* ---------- activity grid (compact link list, e.g. Survive The Outbreak) ---------- */

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.activity {
    display: block;
    text-decoration: none;
    padding: 1.3rem 1.4rem;
    background: #0d100e;
    transition: background 0.15s;
}

.activity:hover { background: #171a17; }

.activity h4 {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    font-weight: 700;
}

.activity p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.activity.ledger h4 { color: #c9b592; }
.activity.cordon h4 { color: #a3b08e; }
.activity.commons h4 { color: #c99384; }

/* ---------- panel (content sections on sub-pages) ---------- */

.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 45px;
}

.panel h2 {
    font-size: 1.7rem;
    margin: 0 0 1.5rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.panel h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 1.75rem 0 0.6rem;
    font-weight: 700;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 1.75rem 0 0.6rem;
}

.subsystem + .subsystem {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.subsystem h3.sub-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.2rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
}

.stat-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem 1.5rem;
    margin: 1.25rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stat-table .stat {
    margin: 0;
    padding: 0;
    border: none;
    display: block;
    font-size: inherit;
    text-transform: none;
    color: inherit;
}

.stat-table .stat .k {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.stat-table .stat .v { font-size: 1rem; color: var(--ink); }

.figure {
    margin: 1.75rem 0;
    border: 1px solid var(--line);
    overflow: hidden;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
}

.figure figcaption {
    padding: 0.55rem 0.9rem;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    border-top: 1px solid var(--line);
}

.trade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem 2rem;
}

.trade-card {
    padding: 0 0 0 1rem;
    border-left: 2px solid var(--line);
}

.trade-card h4 {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    font-weight: 700;
}

.trade-card p { margin: 0 0 0.6rem; font-size: 0.88rem; color: var(--muted); }

.trade-card .facts { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

.step-list {
    counter-reset: step;
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.step-list li {
    position: relative;
    padding-left: 2.6rem;
    font-size: 0.94rem;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step) '.';
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.discord-cta {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.discord-cta a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.discord-cta a:hover { text-decoration: underline; }

.typewriter { font-family: 'Courier New', Courier, monospace; }

.connect-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--muted);
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
    color: var(--ink);
}

.connect-box .label {
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.rules { color: var(--ink); padding-left: 1.4rem; margin: 0; }
.rules li { margin-bottom: 0.6rem; }

.empty { color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */

footer {
    padding: 32px 5vw;
    border-top: 1px solid var(--line);
    color: #6f746c;
    font-size: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 700px) {
    main { padding: 60px 20px; }
    .panel { padding: 28px; }
}
