:root {
  --bg: #0b0c0e;
  --surface: #111317;
  --line: #23262d;
  --text: #e7e6e1;
  --muted: #8a8f99;
  --dim: #5b606b;
  --accent: #67e8f9;
  --ok: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --tarkov: #d6b46a;
  --tarkov-bg: #15160f;
  --stalzone: #b5f23d;
  --stalzone-bg: #09090b;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgb(103 232 249 / 0.07), transparent 60%),
    radial-gradient(50rem 30rem at -10% 110%, rgb(181 242 61 / 0.05), transparent 60%),
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.05) 1px, transparent 0);
  background-size: auto, auto, 24px 24px;
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* faint CRT scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 3px);
  z-index: 10;
}

a { color: inherit; }
code, kbd { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- header ------------------------------------------------------------ */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 22px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 18px/1 var(--mono);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
}

.dim { color: var(--dim); }

.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font: 13px/1 var(--mono);
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover { color: var(--text); }

.summary {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.summary.all-ok { color: var(--ok); border-color: rgb(74 222 128 / 0.3); }
.summary.some-bad { color: var(--warn); border-color: rgb(251 191 36 / 0.3); }

/* ---- hero -------------------------------------------------------------- */
main {
  flex: 1;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

.hero { padding: 72px 0 56px; }

.prompt {
  margin: 0 0 22px;
  font: 14px/1.4 var(--mono);
  color: var(--muted);
}

.ps1 { color: var(--accent); }
.typed { color: var(--text); }

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

h1 {
  margin: 0;
  font: 800 clamp(40px, 7.4vw, 84px)/1 var(--sans);
  letter-spacing: -0.035em;
}

h1 em {
  font-style: normal;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--accent);
  text-shadow: 0 0 28px rgb(103 232 249 / 0.35);
}

h1 em.t { color: var(--tarkov); text-shadow: 0 0 28px rgb(214 180 106 / 0.35); }
h1 em.s { color: var(--stalzone); text-shadow: 0 0 28px rgb(181 242 61 / 0.3); }

.lede {
  max-width: 560px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.lede code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85em;
}

/* ---- tool cards -------------------------------------------------------- */
.tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  --c: var(--accent);
  --cbg: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 26px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 55%),
    var(--cbg);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-tarkov { --c: var(--tarkov); --cbg: var(--tarkov-bg); }
.card-stalzone { --c: var(--stalzone); --cbg: var(--stalzone-bg); }

/* hazard stripe along the top edge */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: repeating-linear-gradient(-45deg, var(--c) 0 10px, transparent 10px 20px);
  opacity: 0.55;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 20px 60px -20px color-mix(in srgb, var(--c) 35%, transparent);
}

.card-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  color: var(--c);
  opacity: 0.16;
  transition: opacity 0.3s ease;
}

.card:hover .card-art { opacity: 0.28; }

.crosshair { transform-origin: 300px 70px; transition: transform 0.6s ease; }
.card:hover .crosshair { transform: rotate(90deg) scale(1.1); }

.trefoil { animation: spin 24s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game {
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 6px;
  color: var(--c);
  font: 600 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 12px/1 var(--mono);
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.status b { font-weight: 400; }

.status[data-state="up"] { color: var(--ok); }
.status[data-state="up"] i { background: var(--ok); box-shadow: 0 0 0 0 rgb(74 222 128 / 0.6); animation: ping 2s ease-out infinite; }
.status[data-state="down"] { color: var(--bad); }
.status[data-state="down"] i { background: var(--bad); }
.status[data-state="checking"] i { animation: blink 0.8s steps(1) infinite; }

@keyframes ping { to { box-shadow: 0 0 0 8px rgb(74 222 128 / 0); } }

.card h2 {
  margin: 44px 0 4px;
  font: 800 clamp(30px, 3.6vw, 40px)/1.05 var(--sans);
  letter-spacing: -0.03em;
  color: var(--text);
}

.host {
  margin: 0;
  color: var(--c);
  font: 14px/1.4 var(--mono);
}

.desc {
  max-width: 46ch;
  margin: 18px 0 0;
  color: #b8b9b4;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.3);
  color: var(--muted);
  font: 12px/1.5 var(--mono);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 28px;
}

.cta {
  color: var(--c);
  font: 600 15px/1 var(--mono);
}

.arrow { display: inline-block; transition: transform 0.25s ease; }
.card:hover .arrow { transform: translateX(6px); }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.35);
  color: var(--muted);
  font-size: 12px;
}

/* ---- terminal ---------------------------------------------------------- */
.term-wrap { padding: 72px 0 24px; }

.section-label {
  margin: 0 0 14px;
  color: var(--dim);
  font: 13px/1 var(--mono);
}

.term {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #07080a;
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.9);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--dim);
  font: 12px/1 var(--mono);
}

.term-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a2d34;
}

.term-bar i:nth-child(1) { background: #ef4444; }
.term-bar i:nth-child(2) { background: #eab308; }
.term-bar i:nth-child(3) { background: #22c55e; }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 47px; }

.term-body {
  height: 300px;
  overflow-y: auto;
  padding: 14px 16px;
  font: 14px/1.6 var(--mono);
  cursor: text;
}

.term-log div { white-space: pre-wrap; word-break: break-word; }
.term-log .cmd::before { content: "krum3l@dev:~$ "; color: var(--accent); }
.term-log .err { color: var(--bad); }
.term-log .ok { color: var(--ok); }
.term-log .muted { color: var(--muted); }
.term-log .t { color: var(--tarkov); }
.term-log .s { color: var(--stalzone); }

.term-line {
  display: flex;
  gap: 1ch;
  align-items: baseline;
}

.term-line .ps1 { flex: none; }

.term-line input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--accent);
}

.term-line input::placeholder { color: var(--dim); }

.hint {
  margin: 14px 0 0;
  color: var(--dim);
  font: 12px/2 var(--mono);
}

/* ---- footer ------------------------------------------------------------ */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  width: min(1120px, 100% - 32px);
  margin: 48px auto 0;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font: 12px/1.5 var(--mono);
}

.build code { color: var(--muted); }

/* ---- 404 --------------------------------------------------------------- */
.lost {
  display: grid;
  place-content: center;
  min-height: 60vh;
  text-align: center;
}

.lost h1 { font-family: var(--mono); color: var(--accent); }
.lost p { color: var(--muted); }
.lost a { color: var(--accent); font-family: var(--mono); }

/* ---- small screens / motion ------------------------------------------- */
@media (max-width: 760px) {
  .tools { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 36px; }
  .card { min-height: 0; padding: 22px; }
  .card h2 { margin-top: 32px; }
  .top-nav a { display: none; }
  .term-body { height: 260px; font-size: 13px; }
  kbd { display: none; }
  .hint { display: none; }
}

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