/* GoofySMP - colours taken from the server icon */
:root {
    --green: #8fd14f;
    --green-dark: #5f9a2c;      /* pressed/shadow edge of green buttons */
    --gold: #d99a3a;
    --gold-dark: #a06c20;
    --text: #f4eef6;
    --muted: #b4b8a0;
    --bg: #141a0f;
    --card: #1c2416;
    --card-2: #232d1b;
    --line: #34422a;
    --ink: #141a0f;              /* text on green/gold buttons (contrast > 9:1) */
    --danger: #ff6b6b;
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Outfit", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 1.0625rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: #a9e173; }
strong { font-weight: 800; }
h1, h2, h3 { line-height: 1.2; color: var(--green); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: .4rem; }
p + p { margin-top: .8rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--card-2); border: 1px solid var(--line); border-radius: 5px; padding: .05rem .35rem; font-size: .92em; color: var(--text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }

/* ---------- header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(20, 26, 15, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand img { width: 34px; height: 34px; border-radius: 6px; image-rendering: pixelated; }
.brand:hover { color: var(--green); }
.nav-links { display: flex; gap: .25rem; list-style: none; align-items: center; }
.nav-links a {
    color: var(--muted); text-decoration: none; font-weight: 600;
    padding: .5rem .75rem; border-radius: 8px; display: block;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--card-2); }
.nav-links a.nav-store { color: var(--ink); background: var(--gold); }
.nav-links a.nav-store:hover { background: #e6ab50; }
.nav-toggle {
    display: none; background: none; border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: .45rem .65rem; font: inherit; cursor: pointer;
}
@media (max-width: 56rem) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .8rem .75rem; }
}

/* ---------- hero (home) ---------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, rgba(20,26,15,.25) 0%, rgba(20,26,15,.55) 60%, var(--bg) 100%), url("/images/bg.jpg") center / cover no-repeat;
    padding: clamp(3rem, 10vw, 7rem) 1.25rem clamp(2rem, 6vw, 4rem);
    text-align: center;
}
.hero h1 { max-width: 44rem; margin: 0 auto; }
.hero h1 img { width: 100%; animation: pulse 4s infinite; filter: drop-shadow(0 0 1.75rem rgba(0,0,0,.6)); }
.hero .tagline { margin: 1.25rem auto 0; max-width: 38rem; color: var(--text); font-size: clamp(1.05rem, 2.6vw, 1.3rem); }
@keyframes pulse { 0%,50%,100% { transform: scale(1); } 25%,75% { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .hero h1 img { animation: none; } html { scroll-behavior: auto; } }

.page-head { padding: clamp(2.5rem, 7vw, 4rem) 0 1rem; }
.page-head h1 { font-size: clamp(2rem, 6vw, 3rem); }
.page-head p { color: var(--muted); max-width: 44rem; margin-top: .5rem; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
    color: var(--ink); background: var(--green);
    border: 2px solid rgba(255,255,255,.18); border-radius: var(--radius);
    padding: .8rem 1.3rem;
    box-shadow: 0 5px 0 var(--green-dark);
    transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.btn:hover { color: var(--ink); background: #9edc60; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-dark); }
.btn img { width: 1.6rem; height: 1.6rem; filter: brightness(0) saturate(100%) invert(7%) sepia(17%) saturate(1500%) hue-rotate(50deg); }
.btn-gold { background: var(--gold); box-shadow: 0 5px 0 var(--gold-dark); }
.btn-gold:hover { background: #e6ab50; }
.btn-gold:active { box-shadow: 0 1px 0 var(--gold-dark); }
.btn-ghost { background: var(--card-2); color: var(--text); box-shadow: 0 5px 0 #0c1009; border-color: var(--line); }
.btn-ghost:hover { background: #2b3822; color: var(--text); }
.btn-ghost img { filter: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-small { padding: .45rem .8rem; font-size: .95rem; box-shadow: 0 3px 0 var(--green-dark); }
.btn-big { font-size: clamp(1.15rem, 3vw, 1.45rem); padding: 1.3rem 1.5rem; width: 100%; }

/* ---------- join box with copy ---------- */
.ip-box {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem;
    background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin: 2rem auto 0; max-width: 40rem;
}
.ip-box .ip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(1.1rem, 3.6vw, 1.5rem); font-weight: 700; color: var(--text); word-break: break-all; }
.ip-box .label { color: var(--muted); font-size: .95rem; width: 100%; text-align: center; }
.online { margin-top: 1rem; color: var(--muted); }
.online strong { color: var(--green); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--green); margin-right: .4rem; box-shadow: 0 0 8px var(--green); }
.dot.off { background: var(--muted); box-shadow: none; }

/* ---------- link row (Discord / Store / Join) ---------- */
.link-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2.5rem 0; }
@media (max-width: 48rem) { .link-row { grid-template-columns: 1fr; } }

/* ---------- sections / cards ---------- */
.section { padding: 2.5rem 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem;
}
.card h3 { color: var(--green); }
.card p, .card li { color: var(--muted); }
.card ul, .card ol { padding-left: 1.2rem; }
.card li + li { margin-top: .35rem; }
.card .icon-big { font-size: 1.8rem; margin-bottom: .4rem; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-top: .9rem !important; color: var(--text); }
.steps li::before {
    content: counter(s); position: absolute; left: 0; top: -.05rem;
    width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: var(--green); color: var(--ink); font-weight: 800;
    display: grid; place-items: center; font-size: .95rem;
}
.note { border-left: 4px solid var(--gold); background: var(--card-2); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); margin-top: 1rem; }
.prose { max-width: 48rem; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-top: .6rem; }
.prose li + li { margin-top: .35rem; }
.prose p { color: var(--text); }

.rule-list { list-style: none; padding: 0 !important; }
.rule-list li { padding: .6rem 0 .6rem 1.8rem; border-bottom: 1px solid var(--line); position: relative; color: var(--text) !important; margin: 0 !important; }
.rule-list li::before { content: "▶"; color: var(--green); position: absolute; left: .1rem; font-size: .8rem; top: .9rem; }
.rule-list li:last-child { border-bottom: 0; }
.rule-list small { color: var(--muted); }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: .75rem; }
details.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--green); font-size: 1.4rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq div { padding: 0 1.2rem 1.1rem; color: var(--muted); }

.badge { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; background: var(--gold); color: var(--ink); }
.badge-green { background: var(--green); }
.badge-outline { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.staff-card { display: flex; align-items: center; gap: 1rem; }
.staff-card img { width: 64px; height: 64px; border-radius: 8px; image-rendering: pixelated; background: var(--card-2); }
.role-owner { color: #ff6b6b; } .role-admin { color: #7d9bff; } .role-mod { color: #ff7fbf; } .role-helper { color: #3ae8b4; }

/* ---------- footer ---------- */
footer { margin-top: 4rem; background: #0d1209; border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .95rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.disclaimer { margin-top: 1.25rem; font-size: .85rem; color: #8d917c; }

/* ---------- toast ---------- */
.toast {
    position: fixed; left: 50%; top: 4.75rem; transform: translate(-50%, -12rem);
    background: var(--green); color: var(--ink); font-weight: 800;
    padding: .75rem 1.2rem; border-radius: var(--radius); z-index: 100;
    transition: transform .25s ease; box-shadow: 0 8px 30px rgba(0,0,0,.5);
    max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ---------- store ---------- */
.store-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem;
}
.buyer { display: flex; align-items: center; gap: .75rem; }
.buyer img { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; background: var(--card-2); }
.buyer .who { font-weight: 700; }
.linkish { background: none; border: 0; color: var(--green); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.cart-btn { position: relative; }
.cart-count { background: var(--ink); color: var(--gold); border-radius: 999px; padding: 0 .5rem; font-size: .9rem; }

.login-card { max-width: 30rem; margin: 1rem auto 0; text-align: center; }
.login-card form { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.input {
    flex: 1 1 12rem; min-width: 0; font: inherit; color: var(--text); background: var(--bg);
    border: 2px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem;
}
.input:focus { border-color: var(--green); outline: none; }
.field-error { color: var(--danger); font-size: .95rem; margin-top: .5rem; min-height: 1.4em; }

.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.75rem 0 1.25rem; }
.tab {
    font: inherit; font-weight: 700; cursor: pointer; color: var(--muted);
    background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1.1rem;
}
.tab[aria-selected="true"] { background: var(--green); color: var(--ink); border-color: var(--green); }
.cat-desc { color: var(--muted); margin-bottom: 1rem; }

.pkg-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.pkg {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.pkg .badge { position: absolute; top: .75rem; right: .75rem; }
.pkg-img { aspect-ratio: 16 / 10; background: var(--card-2); display: grid; place-items: center; }
.pkg-img img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.pkg-img.noimg { aspect-ratio: auto; height: 6.5rem; }
.pkg-img .ph { font-size: 2.6rem; }
.pkg-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.pkg-body h3 { color: var(--text); margin: 0; }
.pkg-desc { color: var(--muted); font-size: .98rem; flex: 1; }
.pkg-desc ul { padding-left: 1.1rem; }
.pkg-desc img { max-width: 100%; height: auto; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.price { color: var(--gold); font-weight: 800; font-size: 1.4rem; }
.price s { color: var(--muted); font-weight: 500; font-size: 1rem; margin-right: .35rem; }
.pkg .btn { width: 100%; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: none; }
.drawer-backdrop.open { display: block; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(26rem, 100%); z-index: 90;
    background: var(--bg); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 1.4rem; margin: 0; }
.drawer .close { background: none; border: 0; color: var(--text); font-size: 1.8rem; cursor: pointer; line-height: 1; padding: .2rem .5rem; }
.drawer .items { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.line-item { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.line-item .n { font-weight: 700; }
.line-item .q { color: var(--muted); font-size: .9rem; }
.line-item .p { color: var(--gold); font-weight: 800; white-space: nowrap; }
.drawer footer.sum { margin: 0; padding: 1.1rem 1.25rem; background: var(--card); border-top: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; margin-bottom: 1rem; }
.total span:last-child { color: var(--gold); }
.drawer .btn { width: 100%; }

.banner { border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1rem; border: 1px solid var(--line); background: var(--card); }
.banner.ok { border-color: var(--green); }
.banner.warn { border-color: var(--gold); }
.spinner { width: 2.2rem; height: 2.2rem; border: 4px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
