:root {
  --bg: #07080c;
  --surface: #0f1117;
  --text: #f1f2f5;
  --muted: #9aa1ad;
  --faint: #5f6673;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #f97316;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Background: soft glows and a faint grid that fades out */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background:
    radial-gradient(600px 380px at 12% -4%, rgba(249, 115, 22, 0.22), transparent 70%),
    radial-gradient(640px 420px at 92% 6%, rgba(56, 189, 248, 0.14), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent); text-underline-offset: 3px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 26px;
  padding-bottom: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.32em;
}
.brand img, .brand svg { width: 34px; height: 34px; flex: none; }
.legal-page .site-header .wrap { justify-content: space-between; }
.nav { display: flex; gap: 26px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 56px 0 88px; text-align: center; }
.hero-mark img {
  width: clamp(96px, 14vw, 150px);
  height: auto;
  filter: drop-shadow(0 10px 40px rgba(249, 115, 22, 0.45));
}
.hero .wordmark {
  font-family: "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(44px, 12vw, 128px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  margin: 22px 0 26px;
  padding-left: 0.14em; /* balance the trailing letter-spacing */
  background: linear-gradient(180deg, #ffffff 30%, #c9ccd4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(249, 115, 22, 0.25));
}
.hero h1 {
  font-family: "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(19px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin: 0;
}
.grad {
  background: linear-gradient(90deg, #fb923c, #f97316 40%, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 21px);
}

/* Section labels */
section { padding-bottom: 72px; }
.label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--faint);
  margin: 0 0 22px;
}

/* Game cards */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}
.game {
  --c: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
a.game:hover, a.game:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 18px 50px -20px color-mix(in srgb, var(--c) 60%, transparent);
  outline: none;
}
.art {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.art img, .art svg { display: block; }
.game .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c);
}
.game h3 { margin: 0; font-size: 23px; letter-spacing: -0.01em; }
.game p { margin: 0; color: var(--muted); flex: 1; }
.cta { margin-top: 12px; font-weight: 600; color: var(--c); }
.cta.off { color: var(--faint); }

/* Per-game art */
.ploycraft { --c: #38bdf8; }
.ploycraft .art {
  background:
    radial-gradient(60% 70% at 30% 70%, rgba(236, 72, 153, 0.28), transparent 70%),
    radial-gradient(60% 70% at 72% 30%, rgba(34, 211, 238, 0.28), transparent 70%),
    #0a1022;
}
.ploycraft .art img { width: 46%; height: auto; filter: drop-shadow(0 6px 24px rgba(56, 189, 248, 0.35)); }

.microscend { --c: #22d3ee; }
.microscend .art {
  background:
    radial-gradient(55% 65% at 50% 50%, rgba(34, 211, 238, 0.22), transparent 70%),
    linear-gradient(rgba(34, 211, 238, 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(34, 211, 238, 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
    #060912;
}
.microscend .art svg { width: 30%; height: auto; filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.45)); }

.rts { --c: #f97316; }
.rts .art { background: #0b0d0c; }
.rts .art svg { width: 100%; height: 100%; }

/* Software line */
.software p { margin: 0; color: var(--muted); font-size: 19px; }

/* Contact */
.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: border-color 0.2s ease;
}
.mail:hover { border-color: var(--accent); }
.mail span { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  color: var(--faint);
  font-size: 14px;
}
.site-footer a { color: var(--muted); }

/* Legal page */
.legal { padding-top: 24px; padding-bottom: 64px; max-width: 820px; }
.legal h1 { font-size: clamp(32px, 4.6vw, 44px); margin: 0 0 8px; letter-spacing: -0.02em; }
.legal .label { margin-top: 44px; }
.legal dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.legal p { color: #d4d7de; }
.legal .updated { color: var(--faint); font-size: 14px; margin-top: 44px; }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 18px; }
  .hero { padding: 40px 0 56px; }
  section { padding-bottom: 56px; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game { transition: none; }
}
