:root {
  --paper: #faf9f5;
  --ink: #1c1b18;
  --muted: #8a877e;
  --hair: rgba(28, 27, 24, 0.18);
  --accent: #e8490f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

header,
footer {
  position: fixed;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  z-index: 2;
}

header {
  top: 0;
}

footer {
  bottom: 0;
  flex-wrap: wrap;
  row-gap: 6px;
}

.brand {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}

.brand::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.meta {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

main {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 88px;
  text-align: center;
}

figure {
  width: min(880px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(30px, 5vh, 54px);
}

figcaption {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
}

.stage {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 360px;
  border: 1px solid var(--hair);
  border-radius: 2px;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h1 .dim {
  color: rgba(28, 27, 24, 0.42);
}

.tagline {
  margin-top: 18px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contact {
  text-decoration: none;
  transition: color 0.15s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.contact:hover {
  color: var(--accent);
}

/* below ~880px true centering would overlap the telemetry — fall back to flex */
@media (max-width: 880px) {
  .contact {
    position: static;
    transform: none;
  }
}

@media (max-width: 560px) {
  header,
  footer {
    padding: 18px 20px;
  }

  .env {
    display: none;
  }

  .tagline {
    font-size: 0.68rem;
  }

  figcaption {
    font-size: 0.6rem;
  }
}

@media (max-width: 400px) {
  #telemetry {
    font-size: 0.58rem;
  }
}
