/* Starkeeper's site: the game's palette (unity/Assets/Starkeeper/UI/Palette.uss) and its one typeface, Silkscreen. */
@font-face {
  font-family: "Silkscreen";
  src: url("../assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../assets/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --void: #070915;
  --deep: #0d1124;
  --line: #28305a;
  --text: #e8ecff;
  --soft: #c2c9e8;
  --muted: #8c95bd;
  --ally: #7fd8ff;
  --ally-ink: #04121c;
  --alien: #ff5470;
  --credit: #f5d76e;
  --star: #ffd27a;
  --panel: rgba(16, 21, 44, 0.9);
  --pixel: "Silkscreen", ui-monospace, monospace;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100svh;
  background: var(--void);
  color: var(--text);
  font-family: var(--pixel);
  -webkit-font-smoothing: none;
  font-smooth: never;
}

a { color: var(--ally); }

/* The CRT pass's scanlines, faint, over everything (the game's Scanlines setting). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
}

/* Home: the battle fills the screen; the logo sits over its top and the call to action under the star. */
.home {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(78vw, 460px, 44svh);
  height: auto;
  margin: max(18px, 4svh) auto 0;
  filter: drop-shadow(0 0 18px rgba(127, 216, 255, 0.35));
}

.spacer { flex: 1; }

.cta {
  position: relative;
  z-index: 1;
  padding: 0 16px 12px;
  text-align: center;
}

.tagline {
  margin: 0 0 18px;
  font-size: clamp(16px, 4.4vw, 26px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  text-shadow: 0 0 10px rgba(127, 216, 255, 0.55), 0 2px 0 var(--void);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* The game's buttons: a dark panel with a cyan pixel border and corner brackets. */
.store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 10px 16px;
  background: var(--panel);
  border: 2px solid var(--ally);
  color: var(--text);
  text-decoration: none;
  font-family: var(--pixel);
  box-shadow: 0 0 14px rgba(127, 216, 255, 0.25), inset 0 0 0 2px var(--void);
  transition: background-color 120ms steps(2), box-shadow 120ms steps(2);
}
.store:hover, .store:focus-visible {
  background: rgba(127, 216, 255, 0.14);
  box-shadow: 0 0 22px rgba(127, 216, 255, 0.5), inset 0 0 0 2px var(--void);
  outline: none;
}
.store svg { flex: none; width: 26px; height: 26px; fill: var(--text); }
.store span { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.store small { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.store strong { font-size: 17px; font-weight: 400; }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"] small { color: var(--credit); }

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom));
  font-size: 11px;
  color: var(--muted);
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover, .footer a:focus-visible { color: var(--ally); text-decoration: underline; }

/* Policy pages: Silkscreen for the headings, a plain face for the long text so it reads easily. */
.doc-page { background: var(--void) url("../assets/sprites/galaxy.png") center top / cover fixed; }
.doc-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 21, 0.86);
  pointer-events: none;
}

.doc {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 8px;
}

.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.doc-head img { width: 140px; height: auto; }
.doc-head a { font-size: 12px; color: var(--muted); text-decoration: none; }
.doc-head a:hover { color: var(--ally); }

.doc article {
  background: var(--panel);
  border: 2px solid var(--line);
  padding: clamp(18px, 4vw, 34px);
  font-family: var(--body);
  -webkit-font-smoothing: auto;
  font-smooth: auto;
  font-size: 16px;
  line-height: 1.6;
  color: var(--soft);
}
.doc h1, .doc h2 { font-family: var(--pixel); font-weight: 400; color: var(--text); line-height: 1.25; }
.doc h1 { margin: 0 0 6px; font-size: clamp(22px, 5vw, 30px); color: var(--ally); }
.doc h2 { margin: 30px 0 8px; font-size: 17px; }
.doc .updated { margin: 0 0 22px; font-family: var(--pixel); font-size: 11px; color: var(--muted); }
.doc li { margin: 4px 0; }
.doc strong { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .store { transition: none; }
}
