/* =========================================================
   Pixel SMP — Theme tokens, font, reset, base typografi,
   knapper, kort. Loadet før layout.css.
   ========================================================= */

/* ---------- Font ---------- */
@font-face {
    font-family: 'Minecraft';
    src: url('/assets/fonts/Minecraft-Bold.woff2') format('woff2'),
         url('/assets/fonts/Minecraft-Bold.woff')  format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Minecraft';
    src: url('/assets/fonts/Minecraft.woff2') format('woff2'),
         url('/assets/fonts/Minecraft.woff')  format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    /* Surfaces */
    --c-bg-0: #0b0814;
    --c-bg-1: #120a1f;
    --c-bg-2: #1a0f2e;
    --c-panel: #160c25;
    --c-panel-2: #1f1334;
    --c-border: rgba(162, 89, 255, .18);
    --c-border-soft: rgba(255, 255, 255, .06);

    /* Brand / accents */
    --c-purple:      #a259ff;
    --c-purple-deep: #7b2dff;
    --c-purple-dim:  #6b39c4;
    --c-cyan:        #5cd1ff;
    --c-green:       #3ed35a;
    --c-pink:        #ff6cb6;

    /* Text */
    --c-text:     #f4f0ff;
    --c-text-dim: #a89cc4;
    --c-text-mut: #6b6184;

    /* Effects */
    --shadow-card: 0 12px 40px -12px rgba(123, 45, 255, .35),
                   0 2px 0 rgba(255, 255, 255, .03) inset;
    --shadow-cta:  0 10px 30px -8px rgba(162, 89, 255, .55);
    --glow-purple: 0 0 60px rgba(162, 89, 255, .35);

    --radius-sm: 6px;
    --radius:    12px;
    --radius-lg: 18px;

    --container: 1180px;

    --f-body: 'Minecraft', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --t-fast: 160ms ease;
    --t-base: 240ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 93.75%; /* 15px base — skalerer alle rem-størrelser ned ~6% */ }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- Body ---------- */
body {
    font-family: var(--f-body);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--c-text);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(162, 89, 255, .18), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(123, 45, 255, .12), transparent 60%),
        linear-gradient(180deg, var(--c-bg-0) 0%, var(--c-bg-1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Typografi ---------- */
h1, h2, h3, h4 {
    font-family: var(--f-body);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--c-text);
    text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { color: var(--c-text-dim); }
strong { color: var(--c-text); font-weight: 700; }
.text-purple { color: var(--c-purple); }
.text-green  { color: var(--c-green); }
.text-dim    { color: var(--c-text-dim); }
.text-mut    { color: var(--c-text-mut); }

::selection { background: var(--c-purple); color: #fff; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 1.75rem);
}

/* ---------- Eyebrow ---------- */
.eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--c-purple);
    margin-bottom: .9rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .9rem 1.35rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: transform var(--t-fast), box-shadow var(--t-fast),
                background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible {
    outline: 2px solid var(--c-purple);
    outline-offset: 3px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--c-purple) 0%, var(--c-purple-deep) 100%);
    color: #fff;
    box-shadow: var(--shadow-cta);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -6px rgba(162, 89, 255, .7); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: rgba(255, 255, 255, .04);
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
.btn-ghost:hover { background: rgba(162, 89, 255, .12); border-color: var(--c-purple); }

.btn-discord {
    background: #5865F2;
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(88, 101, 242, .7);
}
.btn-discord:hover { transform: translateY(-2px); background: #4752c4; }

.btn-sm  { padding: .55rem .9rem;  font-size: .9rem; }
.btn-lg  { padding: 1.05rem 1.6rem; font-size: 1.05rem; }

.btn .arrow {
    display: inline-block;
    transition: transform var(--t-fast);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
    background: linear-gradient(180deg, var(--c-panel) 0%, var(--c-panel-2) 100%);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: clamp(1.4rem, 2.6vw, 2rem);
    position: relative;
}

/* ---------- Live dot ---------- */
.live-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 0 0 rgba(62, 211, 90, .6);
    animation: livePulse 1.8s ease-out infinite;
    vertical-align: middle;
    margin-right: .45rem;
}
.live-dot.is-purple { background: var(--c-purple); box-shadow: 0 0 0 0 rgba(162, 89, 255, .6); animation-name: livePulsePurple; }

@keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(62, 211, 90, .6); }
    70%  { box-shadow: 0 0 0 12px rgba(62, 211, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(62, 211, 90, 0); }
}
@keyframes livePulsePurple {
    0%   { box-shadow: 0 0 0 0 rgba(162, 89, 255, .6); }
    70%  { box-shadow: 0 0 0 12px rgba(162, 89, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(162, 89, 255, 0); }
}

/* ---------- Pixelated images (for avatars + hero) ---------- */
.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
}

/* ---------- Skip-link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--c-purple);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .live-dot { animation: none; }
    * { scroll-behavior: auto !important; }
}
