/* Landing page. Colours are the HUD tokens (apps/unity-client/.../Theme/Tokens.uss),
   fonts are the HUD fonts (OFL, docs/CREDITS.md). Text tokens keep 4.5:1 on every surface. */
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-semi-condensed-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-500-latin.woff2") format("woff2");
}

:root {
  --bg-void: #05070a;
  --bg-frame: #07090b;
  --panel-top: #101820;
  --panel-bottom: #0a0f12;
  --well: #0a0f12;
  --edge-bright: #3d5560;
  --edge: #2c3a42;
  --edge-dim: #253038;
  --edge-hover: #6ea3b3;
  --text-hi: #eef6f9;
  --text: #dbe7eb;
  --text-mid: #c8d6dc;
  --text-muted: #93a5ad;
  --accent: #4fd4e6;
  --accent-bright: #8ee6f5;
  --accent-deep-a: #2b6d78;
  --accent-deep-b: #17444d;
  --warn: #e6772f;
  --warn-soft: #f0a97e;
  --good: #7ce0bd;
  --bad: #de6654;
  --cut: 14px;
  --page: min(1180px, 100% - 32px);
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow Semi Condensed", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg-frame);
  color: var(--text-mid);
  font: 400 18px / 1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--accent);
}
a:focus-visible,
.dl:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}
code {
  font: 500 0.88em var(--mono);
  color: var(--text-hi);
  background: var(--well);
  border: 1px solid var(--edge-dim);
  padding: 1px 6px;
}
strong {
  color: var(--text-hi);
  font-weight: 500;
}
[hidden] {
  display: none !important;
}

/* ---- Top bar ---------------------------------------------------------- */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: var(--page);
  margin: 0 auto;
  padding: 22px 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-hi);
  text-decoration: none;
  font: 700 26px / 1 var(--head);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  color: var(--text-mid);
  text-decoration: none;
  font: 600 16px / 1 var(--head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav a:hover {
  color: var(--text-hi);
}
.nav .nav-cta {
  color: var(--accent-bright);
  border: 1px solid var(--accent-deep-a);
  padding: 10px 16px;
  background: rgba(23, 68, 77, 0.55);
}
.nav .nav-cta:hover {
  border-color: var(--accent);
  color: var(--text-hi);
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: flex-end;
  padding: 120px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--edge);
}
.hero-shot {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(5, 7, 10, 0.96) 0%,
      rgba(5, 7, 10, 0.88) 34%,
      rgba(5, 7, 10, 0.25) 70%,
      rgba(5, 7, 10, 0.1) 100%
    ),
    linear-gradient(0deg, rgba(7, 9, 11, 1) 0%, rgba(7, 9, 11, 0) 38%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.8) 0%, rgba(5, 7, 10, 0) 22%);
}
.hero-body {
  width: var(--page);
  margin: 0 auto;
}
.hero-body > * {
  max-width: 620px;
}
.hero-body > h1 {
  max-width: 960px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font: 600 15px / 1 var(--head);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
h1,
h2,
h3 {
  color: var(--text-hi);
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}
h1 {
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: 0.02em;
}
.lede {
  margin: 22px 0 32px;
  font-size: 20px;
  color: var(--text);
}
.hero-note {
  margin: 18px 0 0;
  font-size: 16px;
  color: var(--text-muted);
}

/* Download buttons: cut corners like the HUD panels. */
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: none;
}
.dl {
  --edge-col: var(--edge-bright);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  padding: 16px 22px 16px 18px;
  color: var(--text-hi);
  text-decoration: none;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
  box-shadow: inset 0 0 0 1px var(--edge-col);
  transition:
    box-shadow 120ms,
    background 120ms;
}
.dl:hover {
  --edge-col: var(--edge-hover);
}
.dl.is-primary {
  --edge-col: var(--accent);
  background: linear-gradient(180deg, var(--accent-deep-a), var(--accent-deep-b));
}
.dl.is-primary:hover {
  --edge-col: var(--accent-bright);
}
.dl.is-missing {
  --edge-col: var(--edge-dim);
  cursor: default;
  color: var(--text-mid);
}
.dl.is-missing .dl-icon {
  color: var(--text-muted);
}
.dl-icon {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--accent-bright);
}
.dl-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dl-label {
  font: 700 20px / 1.1 var(--head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dl-meta {
  font: 500 13px / 1.2 var(--mono);
  color: var(--text-mid);
}
.dl.is-primary .dl-meta {
  color: var(--text);
}
.dl.is-missing .dl-meta {
  color: var(--text-muted);
}

/* ---- Status strip ----------------------------------------------------- */
.status {
  width: var(--page);
  margin: -1px auto 0;
  display: flex;
  flex-wrap: wrap;
  background: var(--well);
  border: 1px solid var(--edge);
  border-top: 0;
}
.status-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 22px;
  border-right: 1px solid var(--edge-dim);
}
.status-message {
  flex: 1 1 260px;
  border-right: 0;
}
.status-label {
  font: 600 13px / 1 var(--head);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.status-value {
  color: var(--text-hi);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-value.mono {
  font: 500 16px / 1.3 var(--mono);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
}
.is-online .dot {
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.is-offline .dot {
  background: var(--bad);
}
.status-message.is-warn .status-value {
  color: var(--warn-soft);
}

/* ---- Sections --------------------------------------------------------- */
.section {
  width: var(--page);
  margin: 0 auto;
  padding: 96px 0 0;
}
.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}
h2 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 0.98;
  letter-spacing: 0.02em;
}
.section-lede {
  margin: 16px 0 0;
  font-size: 19px;
  color: var(--text);
}

.roles,
.install {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  padding: 26px 26px 24px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  border: 1px solid var(--edge);
  border-top: 2px solid var(--accent-deep-a);
}
.card-warn {
  border-top-color: var(--warn);
}
.card-tag {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font: 600 13px / 1 var(--head);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card-warn .card-tag {
  color: var(--warn-soft);
}
h3 {
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.card p {
  margin: 0;
}
.card ol {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}
.card li::marker {
  color: var(--accent);
  font-family: var(--mono);
}
.card .req {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--edge-dim);
  color: var(--text-muted);
  font-size: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.gallery figure {
  position: relative;
  margin: 0;
  border: 1px solid var(--edge);
  overflow: hidden;
  background: var(--well);
}
.gallery figure:first-child {
  grid-row: span 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 14px;
  background: rgba(5, 7, 10, 0.92);
  color: var(--text-hi);
  font: 600 15px / 1 var(--head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--edge);
  background: var(--well);
}
.log li {
  display: grid;
  grid-template-columns: 100px 96px 1fr;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--edge-dim);
}
.log li:first-child {
  border-top: 0;
}
.log .log-date,
.log .log-tag {
  font: 500 14px / 1.6 var(--mono);
  color: var(--text-muted);
}
.log .log-text {
  color: var(--text);
}

/* ---- Footer ----------------------------------------------------------- */
.foot {
  width: var(--page);
  margin: 96px auto 0;
  padding: 28px 0 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--edge);
  color: var(--text-muted);
  font-size: 16px;
}
.foot a {
  color: var(--text-mid);
}
.foot a:hover {
  color: var(--text-hi);
}

/* ---- Narrow screens --------------------------------------------------- */
@media (max-width: 900px) {
  .roles,
  .install {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .gallery figure:first-child {
    grid-row: auto;
  }
  .nav a:not(.nav-cta) {
    display: none;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
  .top {
    padding: 16px 0;
  }
  .wordmark {
    font-size: 21px;
  }
  .hero {
    min-height: 0;
    padding-top: 96px;
  }
  .hero::before {
    background: linear-gradient(
      0deg,
      rgba(7, 9, 11, 1) 0%,
      rgba(5, 7, 10, 0.88) 55%,
      rgba(5, 7, 10, 0.55) 100%
    );
  }
  .dl {
    min-width: 0;
    width: 100%;
  }
  .status-cell {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--edge-dim);
  }
  .log li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .section {
    padding-top: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .dl {
    transition: none;
  }
}
