/* Murdie — site styles */

:root {
  --bg: #0b0d10;
  --bg-elev: #12151a;
  --card: #161a20;
  --card-hover: #1c2129;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f4;
  --text-muted: #9aa3ad;
  --text-faint: #7d8692;
  --accent: #9be22d;
  --accent-hover: #b5f25a;
  --accent-ink: #0b0d10;
  --accent-soft: rgba(155, 226, 45, 0.12);
  --accent-glow: rgba(155, 226, 45, 0.22);
  --amber: #ffb547;
  --live: #3ddc84;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.35);

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --wrap: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 50; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 16, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; max-width: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 17px; box-shadow: 0 0 24px var(--accent-glow); }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--text-faint); letter-spacing: 0; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card-hover); }
.ts-pill { display: none; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); font: 500 14px var(--font-body); white-space: nowrap; cursor: pointer; }
.ts-pill:hover { border-color: var(--accent); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.is-live .dot, .dot--live { background: var(--live); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18); }
.nav-toggle { display: none; margin-left: auto; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text); font: 500 14px var(--font-body); cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; display: none; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 16px; }
}

/* ---------- Shell + TeamSpeak dock ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.ts-dock { position: sticky; top: 68px; height: calc(100vh - 68px); height: calc(100dvh - 68px); display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--bg-elev); border-left: 1px solid var(--line); }
.ts-dock__head { display: flex; align-items: center; gap: 12px; }
.ts-dock__head h2 { font-size: 18px; }
.ts-dock__head .badge-live { margin-left: auto; }
.ts-dock__close { display: none; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.ts-dock .ts { flex: 1; max-height: none; min-height: 0; }
.ts-dock .ts-actions { margin-top: 0; }
.dock-backdrop { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.55); }

@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .ts-pill { display: inline-flex; }
  .nav-toggle { margin-left: 0; }
  .ts-dock { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(380px, 92vw); height: auto; border-left: 1px solid var(--line-strong); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5); transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .ts-dock.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .ts-dock__close { display: grid; place-items: center; }
}
@media (max-width: 1100px) and (min-width: 901px) { .nav { margin-left: auto; } }
@media (max-width: 1100px) { html { overflow-x: clip; } }
@media (max-width: 480px) { .brand small { display: none; } .site-header .wrap { gap: 12px; } }
@media (max-width: 900px) { .ts-pill { margin-left: auto; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font: 700 15px var(--font-body); cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 28px var(--accent-glow); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn--sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 820px; height: 820px; background: radial-gradient(closest-side, var(--accent-glow), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 20%, #000 0%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 0%, transparent 65%); pointer-events: none; opacity: .6; }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 7vw, 84px); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { margin-top: 22px; max-width: 56ch; font-size: 18px; color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 64px; max-width: 640px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { padding: 18px 22px; background: var(--bg-elev); }
.stats b { display: block; font-family: var(--font-head); font-size: 28px; line-height: 1.2; }
.stats span { font-size: 13px; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { margin-top: 8px; color: var(--text-muted); max-width: 60ch; }
.page-head { padding: 64px 0 8px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); }
.page-head p { margin-top: 14px; max-width: 60ch; font-size: 18px; color: var(--text-muted); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { font-size: 18px; }
.card__body { padding: 20px; }

/* Game grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text-muted); font: 500 14px var(--font-body); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.game { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background-color .15s, transform .15s; }
.game:hover { background: var(--card-hover); border-color: var(--line-strong); transform: translateY(-2px); }
.game__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.year { font-family: var(--font-head); font-size: 14px; color: var(--text-faint); }
.game h3 { font-size: 20px; }
.game__mod { margin-top: -8px; font-size: 14px; color: var(--text-muted); }
.game__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.addr { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.copy { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); font: 500 13px var(--font-body); cursor: pointer; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.games li[hidden] { display: none; }

/* TS viewer */
.ts { max-height: 440px; overflow: auto; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; scrollbar-color: var(--line-strong) transparent; }
.ts a { color: var(--live); }
.ts img { display: inline-block; vertical-align: middle; }
.ts-loading { color: var(--text-faint); }
.ts-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.badge-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); }

/* Events */
.events-next { display: grid; gap: 16px; }
.event-next h2 { margin-top: 18px; max-width: none; }
.cta .event-next__when { margin-top: 10px; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--accent); }
.events { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.event { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px 22px; }
.event__year { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--accent); }
.event h3 { font-size: 17px; }
.event p { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
@media (max-width: 600px) { .event { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 18px; } .event .btn { justify-self: start; } }

/* News */
.news { display: grid; gap: 16px; }
.news-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 24px; }
.news-item time { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text-muted); }
.news-item .new { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.news-item ul { margin: 0; padding-left: 18px; }
.news-item li + li { margin-top: 6px; }
.news-item li::marker { color: var(--accent); }
@media (max-width: 600px) { .news-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; } }

/* Steps */
.steps { counter-reset: s; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-head); font-weight: 700; }
.steps li > div { padding-top: 5px; }
.steps code, .kbd { font-family: var(--font-mono); font-size: 14px; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--text); }

/* Project */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project { overflow: hidden; }
.project img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--line); }
.project .card__body p { margin-top: 8px; color: var(--text-muted); }
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status--wip { background: rgba(255, 181, 71, 0.14); color: var(--amber); }
.status--done { background: var(--accent-soft); color: var(--accent); }

/* Contact / CTA */
.cta { position: relative; overflow: hidden; padding: 48px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #18202a, #12151a 60%); border: 1px solid var(--line); }
.cta::before { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; background: radial-gradient(closest-side, var(--accent-glow), transparent); }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: 20ch; }
.cta p { margin-top: 12px; max-width: 58ch; color: var(--text-muted); }
.cta .hero__actions { margin-top: 26px; }
.mail { font-family: var(--font-head); font-weight: 700; font-size: clamp(24px, 4vw, 40px); }
@media (max-width: 600px) { .cta { padding: 28px; } }

/* Footer */
.site-footer { margin-top: 56px; padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .game { transition: none; }
  .game:hover { transform: none; }
}

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--text-faint); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--text); }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head .tag { vertical-align: 2px; }
.game-head { display: flex; align-items: center; gap: 28px; }
.game-logo { flex: none; width: auto; height: 132px; max-width: 260px; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.game-logo[src$=".jpg"] { border-radius: var(--radius); }

/* Live server status (banners on game pages, badges on cards) */
.status-list { display: grid; gap: 16px; }
.status-list[hidden], .status[hidden], .status [hidden], .game__live[hidden] { display: none; }
.status { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 24px; padding: 20px 22px; background: linear-gradient(135deg, var(--card), var(--bg-elev)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.status__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.status__state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.status__label { color: var(--text-faint); }
.status__name { margin-top: 8px; font-size: 20px; overflow-wrap: anywhere; }
.status__facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 14px 0 0; }
.status__facts > div { min-width: 0; }
.status__facts dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.status__facts dd { margin: 2px 0 0; font-family: var(--font-head); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.status__facts code { font-family: var(--font-mono); font-size: 14px; font-weight: 400; color: var(--text-muted); }
.status__meter { height: 6px; margin-top: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.status__meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s; }
.status__graph { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; margin: 0; }
.status__graph svg { display: block; width: 100%; height: 84px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.status__graph figcaption { font-size: 12px; color: var(--text-faint); }
.graph-area { fill: var(--accent-soft); }
.graph-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.graph-off { fill: var(--amber); opacity: .5; }
.status.is-online .status__state, .game__live.is-online { color: var(--live); }
.status.is-online .dot, .game__live.is-online .dot { background: var(--live); box-shadow: 0 0 0 4px rgba(61, 220, 132, .15); }
.status.is-offline .status__state { color: var(--amber); }
.status.is-offline .dot { background: var(--amber); }
.game__live { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 12px; font-weight: 700; color: var(--text-faint); }
@media (max-width: 720px) {
  .status { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .game-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .game-logo { height: 96px; }
}

/* Clickable game cards */
.game--link h3 a { color: var(--text); }
.game--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.game--link .copy { position: relative; z-index: 1; }
.game--link:hover h3 a { color: var(--accent); }

/* Game detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.detail__main { display: grid; gap: 24px; }
.detail__side { position: sticky; top: 92px; }
.side-title { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.side-title + .facts, .side-links + .side-title { margin-top: 0; }
.side-links + .side-title, .facts + .side-meta + .side-title, .facts + .side-title { margin-top: 24px; }
.facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; gap: 6px; }
.facts li > span:first-child { font-size: 13px; color: var(--text-muted); }
.addr-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.addr-row code { font-family: var(--font-mono); font-size: 14px; padding: 4px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); word-break: break-all; }
.side-meta { margin-top: 14px; font-size: 14px; }
.side-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
@media (max-width: 1280px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail__side { position: static; order: -1; } }

/* Long-form text (guides, builds) */
.prose { max-width: 75ch; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 26px; margin-top: 32px; }
.prose h3 { font-size: 20px; margin-top: 28px; }
.prose h4 { font-size: 17px; margin-top: 20px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose li::marker { color: var(--accent); }
.prose img { border-radius: var(--radius-sm); margin: 8px 0; }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--line-strong); color: var(--text-muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.prose td, .prose th { padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.prose code, .detail code { font-family: var(--font-mono); font-size: 14px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(155, 226, 45, 0.4); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-width: none; }
.prose:has(.gallery) { max-width: none; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border-radius: 0; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.04); }

.section-head--spaced { margin-top: 56px; }
.project__title { font-size: 22px; }
.cta .mail-line { margin-top: 28px; }
