/* NoviForged. Spine: the build log.
   Near-monochrome graphite. The brand accent is white; the only chromatic
   values on the page are functional status signals (live / in development),
   never decoration. Type: Space Grotesk + JetBrains Mono. Corners: all sharp. */

/* Self-hosted, subsetted webfonts (SIL OFL). No third-party font CDN:
   nothing outside this host is contacted to render the site. */
@font-face {
  font-family: "Space Grotesk";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-400.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-600.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-700.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-400.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-500.woff2") format("woff2");
}

:root {
  --bg: #0a0b0d;
  --surface: #101216;
  --raised: #15181c;
  --line: #23262b;
  --line-soft: #1a1d21;
  --ink: #edeff2;
  --dim: #9aa0a8;
  --faint: #878e96;
  --white: #ffffff;

  /* functional status only */
  --live: #3fb950;
  --wip: #d29922;

  --r: 2px;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gut: 24px;
  --maxw: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--line);
}

html {
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

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

main {
  flex: 1;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

@media (min-width: 768px) {
  :root {
    --gut: 40px;
  }
}

.sec {
  padding: 72px 0;
}

.sec-top {
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .sec {
    padding: 88px 0;
  }
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.h-xl {
  font-size: clamp(38px, 6.2vw, 64px);
}

.h-lg {
  font-size: clamp(28px, 3.6vw, 40px);
}

.h-md {
  font-size: clamp(21px, 2.2vw, 24px);
  line-height: 1.2;
}

.h-sm {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.lead {
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--dim);
}

.body {
  max-width: 66ch;
  color: var(--dim);
}

/* Monospace label. The site's one recurring structural device: it marks
   machine-ish metadata (keys, status, versions), never decoration. */
.key {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

/* ---------- status ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-live {
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.16);
}

.dot-wip {
  background: var(--wip);
  box-shadow: 0 0 0 3px rgba(210, 153, 34, 0.16);
}

/* status is never conveyed by colour alone: the label carries the word */
@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.16);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(63, 185, 80, 0.05);
  }
}

.dot-live.pulse {
  animation: breathe 2.6s ease-in-out infinite;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.86);
  backdrop-filter: blur(12px);
}

.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img {
  width: 26px;
  height: 26px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img {
  transform: scale(1.12);
}

/* the mark stamps in once per page load */
@keyframes stamp {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.js .nav .brand img {
  animation: stamp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.brand b {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -6px;
  padding: 0 6px;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  position: relative;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: var(--r);
  font-size: 14px;
  color: var(--dim);
  transition: color 0.18s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--faint);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

/* ---------- controls: each has its own interaction identity ---------- */

.btn-solid {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r);
  background: var(--white);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  transition:
    background 0.18s ease,
    transform 0.12s ease;
}

/* graphite sheen sweeps across the primary button on hover */
.btn-solid::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(10, 11, 13, 0.13), transparent);
  transform: skewX(-18deg) translateX(-160%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.btn-solid:hover::after {
  transform: skewX(-18deg) translateX(420%);
}

.btn-solid:hover {
  background: #d8dbe0;
}

.btn-solid:active {
  transform: scale(0.985);
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.btn-line:hover {
  border-color: var(--faint);
  background: var(--surface);
}

.btn-line:active {
  background: var(--raised);
}

/* inline text link: the underline is always present, brightening on hover */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--faint);
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}

.tlink:hover {
  border-color: var(--ink);
}

.tlink svg {
  width: 14px;
  height: 14px;
  transition: transform 0.22s ease;
}

.tlink:hover svg {
  transform: translateX(3px);
}

/* full-width record row: the whole row is the target */
.rec {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: background 0.18s ease;
}

a.rec {
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
}

a.rec:hover {
  background: var(--surface);
}

.rec svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--faint);
}

.rec .arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition:
    transform 0.22s ease,
    color 0.18s ease;
}

a.rec:hover .arrow {
  transform: translateX(3px);
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* hairline grid: the page's ground is a technical drawing surface */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 44px;
  align-items: center;
  padding: 72px 0;
}

@media (min-width: 940px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    padding: 104px 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rise {
  animation: fade-up 0.5s ease-out both;
}

/* ---------- spec panel ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-body {
  padding: 6px 18px 14px;
}

.spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.spec:last-child {
  border-bottom: 0;
}

.spec dd {
  text-align: right;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- shipping block ---------- */

.ship {
  display: grid;
  gap: 40px;
}

@media (min-width: 940px) {
  .ship {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: center;
  }
}

.shots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gut) * -1);
  padding: 0 var(--gut);
}

.shots::-webkit-scrollbar {
  display: none;
}

.shots img {
  flex: 0 0 auto;
  width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease;
}

.shots img:hover {
  transform: translateY(-5px);
  border-color: var(--faint);
}

@media (min-width: 940px) {
  .shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .shots img {
    width: 100%;
  }

  .shots.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.game-head img {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* ---------- statement rows (no numbering: not a sequence) ---------- */

.stmts > div {
  display: grid;
  gap: 10px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .stmts > div {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: start;
  }
}

/* ---------- definition grid ---------- */

.defs {
  display: grid;
  gap: 0 56px;
}

@media (min-width: 768px) {
  .defs {
    grid-template-columns: 1fr 1fr;
  }
}

.defs > div {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.defs dt {
  width: 120px;
  flex-shrink: 0;
}

.defs dd {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  word-break: break-word;
}

/* ---------- cards / docs ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  background: var(--surface);
}

.duo {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .duo {
    grid-template-columns: 1fr 1fr;
  }
}

.doc section {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.doc section:first-child {
  border-top: 0;
}

.doc h2 {
  font-size: clamp(20px, 2.4vw, 25px);
}

.doc .txt {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 70ch;
  margin-top: 14px;
  color: var(--dim);
  line-height: 1.75;
}

.doc a {
  color: var(--ink);
  border-bottom: 1px solid var(--faint);
}

.doc a:hover {
  border-color: var(--ink);
}

.doc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc li {
  display: flex;
  gap: 12px;
}

.doc li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 1px;
  margin-top: 15px;
  background: var(--faint);
}

.pagehead {
  border-bottom: 1px solid var(--line);
  padding: 64px 0;
}

.pagehead h1 {
  margin-top: 14px;
  max-width: 18ch;
}

.pagehead .lead {
  margin-top: 20px;
}

.dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 12px;
  margin: 0 -12px;
  border-top: 1px solid var(--line);
  transition: background 0.18s ease;
}

.dl-row:hover {
  background: var(--surface);
}

.dl-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--faint);
  transition: color 0.18s ease;
}

.dl-row:hover svg {
  color: var(--ink);
}

.dl-row b {
  font-weight: 400;
  font-size: 15px;
}

.mailbig {
  display: block;
  margin-top: 12px;
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.025em;
  word-break: break-word;
}

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

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
}

.foot-in {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px 0;
}

@media (min-width: 768px) {
  .foot-in {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.foot-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 48px;
}

@media (min-width: 768px) {
  .foot-links {
    grid-template-columns: repeat(3, auto);
  }
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0;
  font-size: 14px;
  color: var(--dim);
  transition: color 0.18s ease;
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-base {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .foot-base {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.foot-base a:hover {
  color: var(--ink);
}

/* ---------- 404 ---------- */

.mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px var(--gut);
  text-align: center;
}

.mid img {
  width: 44px;
  height: 44px;
}

.mini {
  width: 100%;
  max-width: 720px;
  margin-top: 12px;
}

.mini canvas {
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  touch-action: none;
  cursor: pointer;
}

/* ---------- motion layer ---------- */

/* page settles in */
@keyframes pageIn {
  from {
    opacity: 0;
  }
}

body {
  animation: pageIn 0.35s ease-out;
}

/* scroll reveals: JS tags candidates with data-io, adds .in when visible.
   Gated on .js so a no-script visit sees everything immediately. */
.js [data-io] {
  opacity: 0;
  transform: translateY(16px);
}

.js [data-io].in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s ease-out var(--d, 0s),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
    background 0.18s ease,
    border-color 0.25s ease,
    color 0.18s ease;
}

/* the hero drawing-grid drifts, one cell every 18 seconds */
@keyframes gridDrift {
  to {
    background-position:
      64px 64px,
      64px 64px;
  }
}

.hero::before {
  animation: gridDrift 18s linear infinite;
}

/* spark canvas sits between the grid and the content */
.hero .sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}


/* terminal cursor for the typed hero label */
@keyframes curBlink {
  50% {
    opacity: 0;
  }
}

.key .cur {
  display: inline-block;
  width: 7px;
  height: 12px;
  margin-left: 4px;
  vertical-align: -1px;
  background: var(--faint);
  animation: curBlink 1s steps(1) infinite;
}

.key .cur.off {
  display: none;
}

/* working-status dot glows softly; live keeps its breathe */
@keyframes wipGlow {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(210, 153, 34, 0.16);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(210, 153, 34, 0.05);
  }
}

.dot-wip {
  animation: wipGlow 3s ease-in-out infinite;
}

/* cards acknowledge the pointer */
.card {
  transition: border-color 0.25s ease;
}

.card:hover {
  border-color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-io] {
    opacity: 1;
    transform: none;
  }

  .hero .sparks,
  .key .cur {
    display: none;
  }
}
