:root {
    --bg: #0d1117;
    --bg-2: #111821;
    --panel: #161d27;
    --panel-2: #1c2531;
    --border: #263241;
    --text: #e8edf3;
    --muted: #93a1b3;
    --accent: #5cd65c;
    --accent-2: #3fae3f;
    --accent-3: #2a7d2a;
    --gold: #f2d24b;
    --radius: 14px;
    --pixel: "Silkscreen", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.2; }

code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    background: #0a0e13;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: .85em;
    color: #b9f5b9;
    word-break: break-all;
}

.i { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(13, 17, 23, .75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.topbar nav a:hover { color: var(--text); background: var(--panel); }

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--pixel);
    font-weight: 700;
    font-size: 1.15rem;
}
.logo svg { width: 28px; height: 28px; image-rendering: pixelated; }
.logo.small { font-size: .95rem; }
.logo.small svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 90px;
    background:
        radial-gradient(800px 400px at 15% 0%, rgba(92, 214, 92, .16), transparent 60%),
        radial-gradient(600px 400px at 90% 30%, rgba(242, 210, 75, .08), transparent 60%),
        var(--bg);
}
.hero::before {
    /* pixel-grid baggrund */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, #000 30%, transparent);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-family: var(--pixel);
    font-size: .8rem;
    letter-spacing: .5px;
    color: var(--accent);
    background: rgba(92, 214, 92, .1);
    border: 1px solid rgba(92, 214, 92, .25);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero h1 {
    font-family: var(--pixel);
    font-size: clamp(2rem, 5.2vw, 3.4rem);
    margin: 0 0 16px;
    letter-spacing: -1px;
}
.hl {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(92, 214, 92, .45);
}
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 520px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.stats {
    display: flex;
    gap: 36px;
    margin: 40px 0 0;
    flex-wrap: wrap;
}
.stats div { border-left: 3px solid var(--accent-3); padding-left: 14px; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font-family: var(--pixel); font-size: 1.6rem; }

/* HUD-mockup */
.hud-scene {
    position: relative;
    aspect-ratio: 4 / 3.4;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, #7fb6ff 0%, #a9d2ff 45%, #5aa24a 45%, #4a8a3c 60%, #7a5230 60%, #5e3d22 100%);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 6px rgba(255,255,255,.02);
    overflow: hidden;
    transform: rotate(1.5deg);
    transition: transform .3s;
}
.hud-scene:hover { transform: rotate(0) scale(1.01); }
.hud-scene::after {
    /* pixel-blocks i "jorden" */
    content: "";
    position: absolute;
    inset: 60% 0 0 0;
    background-image:
        linear-gradient(rgba(0,0,0,.15) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0,0,0,.15) 2px, transparent 2px);
    background-size: 40px 40px;
}
.hud {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
    min-width: 220px;
    background: rgba(0, 0, 0, .55);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--pixel);
    font-size: .8rem;
    color: #fff;
    text-shadow: 2px 2px 0 #3f3f3f;
}
.hud-title { color: var(--gold); margin-bottom: 6px; }
.hud-row, .hud-total { display: flex; align-items: center; gap: 8px; }
.hud-row b, .hud-total b { margin-left: auto; font-weight: 400; }
.hud-row b { animation: tick 3s infinite steps(1); }
.dot { width: 8px; height: 8px; background: var(--c); box-shadow: 1px 1px 0 #000; }
.hud-total { border-top: 1px solid rgba(255,255,255,.2); margin-top: 6px; padding-top: 6px; color: var(--accent); }

@keyframes tick { 50% { color: var(--accent); } }

.chat {
    position: absolute;
    left: 14px;
    bottom: 14px;
    right: 14px;
    z-index: 1;
    font-family: var(--pixel);
    font-size: .68rem;
    color: #fff;
    text-shadow: 1px 1px 0 #3f3f3f;
}
.chat p { margin: 2px 0; background: rgba(0,0,0,.45); padding: 3px 8px; width: fit-content; max-width: 100%; }
.chat .g { color: var(--accent); }

/* ---------- Knapper ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #062006;
    font-weight: 700;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 10px;
    border: none;
    box-shadow: inset 0 -4px 0 var(--accent-3), 0 8px 24px -8px rgba(92, 214, 92, .5);
    transition: transform .1s, filter .15s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--accent-3); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-ghost {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: inset 0 -4px 0 #0a0e13;
}

/* ---------- Sektioner ---------- */
.section { padding: 80px 0 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-family: var(--pixel); font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.feature {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.feature span { font-size: 1.5rem; }
.feature h4 { margin: 10px 0 4px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Kort ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}
.card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover {
    border-color: rgba(92, 214, 92, .5);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(92, 214, 92, .35);
}
.card-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: #0a0e13;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.card-icon svg { width: 34px; height: 34px; image-rendering: pixelated; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.card p { color: var(--muted); margin: 6px 0 0; font-size: .95rem; }
.tag {
    font-family: var(--pixel);
    background: rgba(92, 214, 92, .12);
    color: var(--accent);
    font-size: .72rem;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.meta {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.meta li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0f141b;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 6px;
}
.card .btn { grid-column: 1 / -1; margin-top: 4px; }

/* ---------- Installation ---------- */
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.steps li {
    counter-increment: step;
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 20px;
}
.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    font-family: var(--pixel);
    background: var(--accent);
    color: #062006;
    border-radius: 8px;
    box-shadow: inset 0 -3px 0 var(--accent-3);
    margin-bottom: 12px;
}
.steps h4 { margin: 0 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

.commands {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.commands div {
    background: var(--bg-2);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.commands code { width: fit-content; }
.commands span { color: var(--muted); font-size: .88rem; }

/* ---------- Tom tilstand ---------- */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.012) 14px 28px);
}
.empty svg { width: 48px; height: 48px; opacity: .6; image-rendering: pixelated; }
.empty p { margin: 0; }

/* ---------- Footer ---------- */
footer {
    margin-top: 100px;
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    font-size: .9rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
    .hero { padding: 48px 0 60px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hud-scene { transform: none; }
    .grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .wrap { padding: 0 16px; }
    .topbar nav a { padding: 8px 8px; font-size: .9rem; }
    .topbar nav a[href="#install"] { display: none; }
    .stats { gap: 22px; }
    .card { grid-template-columns: 1fr; }
    .hud { min-width: 0; right: 18px; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
