/* ---------- SpoonSMP — "torchlit deepslate" ---------- */
:root {
    --ink: #0d0c0b;
    --deep: #151311;
    --stone: #1f1c19;
    --stone-2: #2a2622;
    --line: #36302a;
    --bone: #efe6d8;
    --dust: #a39886;
    --mute: #6d6458;
    --torch: #ffb23e;
    --torch-hot: #ff7a1a;
    --emerald: #3ddc84;
    --redstone: #ff4d4d;
    --discord: #5865f2;

    --f-pixel: 'Pixelify Sans', 'Press Start 2P', monospace;
    --f-retro: 'Press Start 2P', monospace;
    --f-body: 'Bricolage Grotesque', system-ui, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;

    --wrap: 1180px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--f-body);
    background: var(--ink);
    color: var(--bone);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--torch); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(13, 12, 11, .78);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(54, 48, 42, .6);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--stone-2); }
.brand b { font-family: var(--f-pixel); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.brand b i { font-style: normal; color: var(--torch); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
    text-decoration: none; font-size: 14px; font-weight: 500; color: var(--dust);
    padding: 8px 12px; border-radius: 6px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bone); background: var(--stone); }

/* ---------- buttons ---------- */
.btn {
    --c: var(--torch); --t: var(--ink);
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--f-body); font-weight: 700; font-size: 15px;
    background: var(--c); color: var(--t);
    border: 0; border-radius: 4px; padding: 13px 20px;
    text-decoration: none; cursor: pointer;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.28), 0 4px 0 rgba(0,0,0,.4);
    transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.28), 0 1px 0 rgba(0,0,0,.4); }
.btn:focus-visible, .ip-chip:focus-visible, .nav-links a:focus-visible { outline: 2px solid var(--torch); outline-offset: 3px; }
.btn-discord { --c: var(--discord); --t: #fff; }
.btn-ghost { --c: var(--stone); --t: var(--bone); box-shadow: inset 0 0 0 1px var(--line), 0 4px 0 rgba(0,0,0,.4); }
.btn-sm { font-size: 13px; padding: 9px 14px; }
.btn[disabled] { --c: var(--stone-2); --t: var(--mute); cursor: not-allowed; filter: none; transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100vh - 68px); display: flex; flex-direction: column; isolation: isolate; }
.hero-glow {
    position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(50% 45% at 20% 35%, rgba(255,178,62,.07), transparent 70%);
}
#terrain { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; z-index: -1; image-rendering: pixelated; }
.hero .wrap { flex: 1; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 46vh; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 600; color: var(--torch);
}

.hero h1 {
    font-family: var(--f-pixel); font-weight: 700;
    font-size: clamp(56px, 8vw, 104px); line-height: .95; letter-spacing: -.01em;
    margin: 22px 0 26px;
}
.hero h1 span { display: inline; }
.hero h1 .accent {
    color: var(--torch);
}
.hero p.lede { font-size: 19px; color: var(--dust); max-width: 30em; margin-bottom: 34px; }
.hero p.lede strong { color: var(--bone); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.ip-chip {
    display: inline-flex; align-items: stretch; cursor: pointer;
    font-family: var(--f-mono); font-size: 16px; font-weight: 600; color: var(--bone);
    background: var(--deep); border: 2px solid var(--torch); border-radius: 4px; overflow: hidden;
    box-shadow: 0 4px 0 rgba(0,0,0,.4);
    transition: transform .12s var(--ease), box-shadow .2s;
}
.ip-chip:hover { transform: translateY(-1px); }
.ip-chip .ip { padding: 13px 18px; display: flex; align-items: center; gap: 10px; }
.ip-chip .ip::before { content: ">"; color: var(--torch); }
.ip-chip .act {
    background: var(--torch); color: var(--ink); padding: 0 16px;
    display: flex; align-items: center; gap: 7px; font-family: var(--f-body); font-weight: 700; font-size: 14px;
    transition: background .2s;
}
.ip-chip.copied { border-color: var(--emerald); }
.ip-chip.copied .act { background: var(--emerald); }

/* status console */
.console {
    position: relative;
    background: linear-gradient(180deg, var(--stone) 0%, var(--deep) 100%);
    border: 2px solid var(--line); border-radius: 6px;
    padding: 24px;
    box-shadow: 0 6px 0 rgba(0,0,0,.4);
}
.console-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--f-mono); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    color: var(--dust);
}
.status-pill .dot { width: 10px; height: 10px; background: var(--mute); }
.status-pill.online { color: var(--emerald); }
.status-pill.online .dot { background: var(--emerald); box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: ping 1.8s infinite; }
.status-pill.offline { color: var(--redstone); }
.status-pill.offline .dot { background: var(--redstone); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 100% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } }
.console-head small { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }

.players-big { font-family: var(--f-pixel); font-weight: 700; font-size: 64px; line-height: 1; color: var(--bone); }
.players-big small { font-size: 26px; color: var(--mute); }
.players-lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 6px 0 20px; }
.motd {
    font-family: var(--f-mono); font-size: 13px; color: var(--dust);
    background: rgba(0,0,0,.35); border-left: 3px solid var(--torch); padding: 10px 12px; min-height: 42px;
}
.player-heads { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; min-height: 28px; }
.player-heads img { width: 28px; height: 28px; image-rendering: pixelated; border-radius: 3px; background: var(--stone-2); }
.player-heads .more { font-family: var(--f-mono); font-size: 12px; color: var(--mute); align-self: center; }

/* skeleton */
.skel { display: inline-block; min-width: 3ch; color: transparent !important; border-radius: 3px;
    background: linear-gradient(90deg, var(--stone-2) 25%, var(--line) 50%, var(--stone-2) 75%); background-size: 200% 100%;
    animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- sections ---------- */
section.block { padding: 96px 0; position: relative; scroll-margin-top: 68px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-num { font-size: 14px; font-weight: 600; color: var(--torch); margin-bottom: 8px; display: block; }
.sec-head h2 { font-family: var(--f-pixel); font-weight: 700; font-size: clamp(34px, 4.5vw, 52px); line-height: 1.05; }
.sec-head p { color: var(--dust); max-width: 26em; font-size: 17px; }

/* join steps */
.steps { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.step {
    grid-column: span 4; background: var(--deep); border: 1px solid var(--line); border-radius: 6px;
    padding: 30px 26px 28px; position: relative; overflow: hidden;
    transition: border-color .3s, transform .4s var(--ease);
}
.step:hover { border-color: var(--torch); transform: translateY(-4px); }
.step .n { font-family: var(--f-pixel); font-size: 64px; font-weight: 700; line-height: .8; color: var(--stone-2); position: absolute; right: 14px; top: 14px; transition: color .3s; }
.step:hover .n { color: rgba(255,178,62,.18); }
.step h3 { font-family: var(--f-pixel); font-size: 26px; font-weight: 600; margin: 30px 0 10px; position: relative; }
.step p { color: var(--dust); font-size: 15px; position: relative; }
.step code { font-family: var(--f-mono); color: var(--torch); font-size: 14px; }

.info-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 60px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.info-row > div { padding: 22px 24px; background: var(--deep); display: flex; flex-direction: column; gap: 6px; }
.info-row > div + div { border-left: 1px solid var(--line); }
.info-row dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.info-row dd { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.info-row dd .mono { font-family: var(--f-mono); }

/* stats */
.stats { background: var(--deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); position: relative; }
.stat { background: var(--ink); padding: 34px 28px; }
.stat .v { font-family: var(--f-pixel); font-weight: 700; font-size: clamp(36px, 4.4vw, 56px); line-height: 1; color: var(--torch); }
.stat .l { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-top: 12px; }
.stat .v.online { color: var(--emerald); }
.stat .v.offline { color: var(--redstone); }
.stat .v.skel { display: block; width: fit-content; }
.stats-note { font-family: var(--f-mono); font-size: 12px; color: var(--mute); margin-top: 18px; position: relative; }

/* community + store bento */
.duo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.discord-panel {
    position: relative; overflow: hidden; border-radius: 6px; padding: 44px;
    background: #4752c4;
    min-height: 380px; display: flex; flex-direction: column; justify-content: space-between;
}
.discord-panel .bg-logo { position: absolute; right: -60px; bottom: -70px; width: 360px; opacity: .1; transform: rotate(-12deg); }
.discord-panel h3 { font-family: var(--f-pixel); font-size: clamp(34px, 4vw, 48px); line-height: 1; max-width: 9em; position: relative; }
.discord-panel p { color: #dfe1ff; max-width: 26em; margin-top: 14px; position: relative; }
.discord-count { font-family: var(--f-pixel); font-weight: 700; font-size: 72px; line-height: 1; position: relative; }
.discord-count-lbl { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #c6c9ff; margin: 6px 0 22px; position: relative; }
.discord-panel .btn { position: relative; --c: #fff; --t: #2b2f8f; }

.store-panel {
    position: relative; border-radius: 6px; padding: 36px; overflow: hidden;
    background: var(--deep);
    border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
}
.store-panel .tag {
    align-self: flex-start; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    background: var(--ink); color: var(--torch); border: 1px solid var(--torch); padding: 4px 9px; border-radius: 2px;
}
.chest { width: 96px; height: 80px; position: relative; margin: 10px 0; filter: drop-shadow(6px 6px 0 rgba(0,0,0,.5)); }
.chest::before, .chest::after { content: ""; position: absolute; left: 0; right: 0; background: #9a6230; border: 4px solid #3b230f; }
.chest::before { top: 0; height: 34px; background: #b0743a; transform-origin: bottom; transition: transform .5s var(--ease); }
.chest::after { bottom: 0; height: 50px; }
.chest i { position: absolute; z-index: 2; left: 50%; top: 24px; width: 16px; height: 20px; margin-left: -8px; background: #cfcfcf; border: 3px solid #3b230f; }
.store-panel:hover .chest::before { transform: perspective(200px) rotateX(28deg) translateY(-6px); }
.store-panel h3 { font-family: var(--f-pixel); font-size: 34px; line-height: 1; }
.store-panel p { color: var(--dust); margin-top: 10px; font-size: 15px; }


/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
.load > * { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.load > *:nth-child(1) { animation-delay: .05s; } .load > *:nth-child(2) { animation-delay: .15s; }
.load > *:nth-child(3) { animation-delay: .28s; } .load > *:nth-child(4) { animation-delay: .4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--ink); }
.footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer .mark { font-family: var(--f-retro); font-size: clamp(16px, 3vw, 26px); letter-spacing: .1em; color: #fff; }
.footer small { color: var(--mute); font-size: 13px; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer nav a { color: var(--dust); text-decoration: none; font-size: 14px; }
.footer nav a:hover { color: var(--torch); }

/* ---------- legal / docs pages ---------- */
.doc-hero { padding: 90px 0 50px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.doc-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
    background: repeating-linear-gradient(90deg, var(--stone-2) 0 12px, var(--stone) 12px 24px, #24201c 24px 36px);
}
.doc-hero h1 { font-family: var(--f-pixel); font-size: clamp(54px, 9vw, 110px); line-height: .9; margin: 18px 0 18px; }
.doc-hero p { color: var(--dust); max-width: 36em; font-size: 18px; }
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 60px; padding: 70px 0 110px; }
.toc { position: sticky; top: 100px; align-self: start; list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--mute); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--bone); border-color: var(--torch); }
.doc-body { max-width: 720px; }
.doc-body h2 { font-family: var(--f-pixel); font-size: 32px; margin: 50px 0 14px; scroll-margin-top: 100px; display: flex; gap: 14px; align-items: baseline; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h2 span { font-family: var(--f-retro); font-size: 12px; color: var(--torch); }
.doc-body p, .doc-body li { color: var(--dust); font-size: 16.5px; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.doc-body li { padding-left: 24px; position: relative; }
.doc-body li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; background: var(--torch); }
.doc-body strong { color: var(--bone); }
.doc-body a { color: var(--torch); }
.callout { margin-top: 40px; padding: 20px 22px; border: 1px dashed var(--torch); border-radius: 4px; background: rgba(255,178,62,.05); color: var(--dust); font-size: 15px; }
.updated { font-family: var(--f-mono); font-size: 12px; color: var(--mute); margin-top: 18px; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .hero .wrap { grid-template-columns: 1fr; padding-bottom: 36vh; gap: 46px; }
    .console { transform: none; }
    .steps { grid-template-columns: 1fr; }
    .step { grid-column: auto; margin-top: 0 !important; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .duo { grid-template-columns: 1fr; }
    .info-row { grid-template-columns: 1fr; }
    .info-row > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .doc { grid-template-columns: 1fr; gap: 30px; }
    .toc { position: static; }
}
@media (max-width: 680px) {
    .wrap { padding: 0 20px; }
    .nav-links li:not(.keep) { display: none; }
    section.block { padding: 84px 0; }
    .discord-panel, .store-panel { padding: 28px; }
    .discord-count { font-size: 56px; }
    .ip-chip { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal, .load > * { opacity: 1; transform: none; }
}
