/* Grain Forge — Dark MUD theme */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #12122a;
    --bg-card: #16213e;
    --border: #2a2a4e;
    --text: #e0e0e0;
    --text-muted: #8888bb;
    --text-heading: #c0c0e0;
    --accent: #e94560;
    --accent-hover: #ff5a7a;
    --green: #55cc88;
    --red: #e05555;
    --blue: #5588dd;
    --gold: #ccaa33;
    --font-mono: "Cascadia Code", "Fira Code", "Consolas", monospace;
    --max-width: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* ── Nav ── */

.nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.5px;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ── Hero ── */

.hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero h1 {
    font-size: 3rem;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.hero h1 span {
    color: var(--accent);
}

.hero .tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Status Widget ── */

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-dot.offline {
    background: var(--red);
}

.status-players {
    color: var(--text-muted);
    margin-left: 4px;
}

/* ── Buttons ── */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    border: none;
}

.btn:active {
    transform: scale(0.97);
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-secondary:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent-hover);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Sections ── */

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ── Cards ── */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.card h3 {
    color: var(--text-heading);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.card-accent {
    border-top: 2px solid var(--accent);
}

/* ── Feature Lists ── */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}

.feature-item h4 {
    color: var(--text-heading);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Tables ── */

.cmd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.cmd-table th {
    text-align: left;
    color: var(--text-heading);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
}

.cmd-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}

.cmd-table td:first-child {
    color: var(--accent);
    white-space: nowrap;
}

.cmd-table tr:hover {
    background: rgba(42, 42, 78, 0.3);
}

/* ── Steps ── */

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.step-content h3 {
    color: var(--text-heading);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── FAQ ── */

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

.faq-item h3 {
    color: var(--text-heading);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Footer ── */

.footer {
    margin-top: auto;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-muted);
}

.footer a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

/* ── Page Header (non-home pages) ── */

.page-header {
    background: var(--bg-secondary);
    padding: 3rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

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

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 2.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }
}
