/* Ringshadow website: the shared look. The palette is the game's HUD
   (unreal/Source/Autocraft/AcHudStyle.h), the type its HUD font (Barlow
   Condensed) and the wordmark's (Exo 2). Everything is self-hosted. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Exo 2";
  src: url("../fonts/Exo2-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* AcHudStyle: Glass, Cyan, Ice, Text, Soft, Amber, LevelGold, Energy */
  --glass: #030912;
  --glass-rgb: 3, 9, 18;
  --panel: rgba(3, 9, 18, 0.72);
  --panel-edge: rgba(89, 217, 255, 0.22);
  --cyan: #59d9ff;
  --cyan-rgb: 89, 217, 255;
  --ice: #ccf2ff;
  --text: #ebf7ff;
  --soft: #8cd9f2;
  --muted: #7d9bb0;
  --amber: #ffb333;
  --gold: #ffcc52;
  --violet: #bf73ff;

  --hud: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --mark: "Exo 2", "Barlow Condensed", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 60px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--glass);
  color: var(--text);
  font-family: var(--hud);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ice); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--cyan); color: var(--glass); padding: 8px 14px;
}
.skip:focus { left: 8px; }

/* The starfield sits behind everything. */
.stars {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter);
  background: linear-gradient(rgba(var(--glass-rgb), 0.92), rgba(var(--glass-rgb), 0.72));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-edge);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ice); text-decoration: none;
  font-family: var(--mark); font-weight: 700; letter-spacing: 0.16em;
  font-size: 1.05rem;
  margin-right: auto;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px;
  color: var(--soft); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; border-radius: 3px;
}
.nav-links a:hover { color: var(--ice); border-color: var(--panel-edge); }
.nav-links a[aria-current="page"] {
  color: var(--glass); background: var(--cyan);
}
.nav-links .gh { display: flex; align-items: center; gap: 6px; }
.nav-links .gh svg { width: 16px; height: 16px; }

@media (max-width: 520px) {
  .brand span { display: none; }
  .nav-links a { padding: 8px 9px; letter-spacing: 0.1em; }
}

/* ---------- Shared pieces ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.kicker {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.9rem; color: var(--cyan);
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 10px;
}
.kicker::before {
  content: ""; width: 28px; height: 1px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

h1, h2, h3 { font-weight: 700; line-height: 1.05; margin: 0 0 0.4em; color: var(--ice); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); text-transform: uppercase; letter-spacing: 0.04em; }
h3 { font-size: 1.5rem; letter-spacing: 0.03em; }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: clamp(1.25rem, 2vw, 1.5rem); color: var(--text); }
.muted { color: var(--muted); }

/* A HUD glass panel with corner brackets, like the game's plates. */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--cyan); border-style: solid;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-family: var(--hud); font-weight: 700; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.18em; text-decoration: none;
  color: var(--glass); background: var(--cyan);
  border: 1px solid var(--cyan); border-radius: 3px;
  box-shadow: 0 0 24px rgba(var(--cyan-rgb), 0.35);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--ice); color: var(--glass); box-shadow: 0 0 32px rgba(var(--cyan-rgb), 0.55); }
.btn.ghost { background: rgba(var(--glass-rgb), 0.5); color: var(--ice); box-shadow: none; }
.btn.ghost:hover { border-color: var(--ice); color: var(--text); }

.media {
  border: 1px solid var(--panel-edge); border-radius: 4px; overflow: hidden;
  background: #000;
}
.media video, .media img { width: 100%; }
figcaption { font-size: 1rem; color: var(--muted); margin-top: 8px; letter-spacing: 0.02em; }

kbd {
  font-family: var(--hud); font-weight: 700; font-size: 0.85em;
  padding: 1px 7px; border-radius: 3px;
  border: 1px solid rgba(var(--cyan-rgb), 0.5); color: var(--ice);
  background: rgba(var(--cyan-rgb), 0.08);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 96px;
  border-top: 1px solid var(--panel-edge);
  background: rgba(var(--glass-rgb), 0.85);
  padding: 36px 0 48px;
  font-size: 1rem; color: var(--muted);
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.footer p { margin: 0 0 6px; }
.footer a { color: var(--soft); }
.footer .mark { font-family: var(--mark); font-weight: 700; letter-spacing: 0.2em; color: var(--ice); }
