@font-face {
  font-family: 'Space Mono';
  src: url('/assets/fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/assets/fonts/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Orbitron';
  src: url('/assets/fonts/Orbitron-Bold.ttf') format('truetype');
  font-weight: 500 900;
  font-display: swap;
}

:root {
  --bg: #05060a;
  --bg-raised: #0b0e16;
  --line: #1c2230;
  --ink: #e8ecf4;
  --ink-dim: #8b93a7;
  --rust: #ff6a34;
  --rust-deep: #c1440e;
  --amber: #ffb347;
  --hud: #4dffb0;
  --hud-dim: rgba(77, 255, 176, 0.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', ui-monospace, Menlo, monospace;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2 {
  font-family: 'Orbitron', 'Space Mono', sans-serif;
  margin: 0;
  letter-spacing: 0.01em;
}

#starfield-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#starfield { width: 100%; height: 100%; display: block; }

.hud-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.hud-left { display: flex; gap: 10px; align-items: center; }
.hud-tag {
  color: var(--bg);
  background: var(--rust);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
}
.hud-ticker { color: var(--amber); font-weight: 700; }
.hud-right { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); }
.signal-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-dim);
  display: inline-block;
}
.signal-dot.locked {
  background: var(--hud);
  box-shadow: 0 0 8px var(--hud);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pun-ticker {
  position: relative;
  z-index: 15;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 8px 0;
}
.pun-track {
  display: flex;
  width: max-content;
  animation: ticker 26s linear infinite;
}
.pun-set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 0;
}
.pun-set span:not(.pun-dot) {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  padding: 0 14px;
}
.pun-dot { color: var(--rust); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main { position: relative; z-index: 1; }

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 48px;
  text-align: center;
  overflow: hidden;
}

.orbit-ring {
  position: absolute;
  border: 1px dashed rgba(255, 106, 52, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.ring-a { width: 340px; height: 340px; top: 60px; }
.ring-b { width: 460px; height: 460px; top: 0; border-color: rgba(77, 255, 176, 0.12); }

.planet-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 24px 0 20px;
}
.planet {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 30px 80px -20px rgba(255, 106, 52, 0.35);
  animation: spin 34s linear infinite;
}
.planet-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle at 68% 28%, rgba(255,179,71,0.5), transparent 55%);
  filter: blur(6px);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.eyebrow {
  color: var(--hud);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(28px, 8vw, 48px);
  line-height: 1.08;
  color: var(--ink);
}
.hero h1 .accent { color: var(--rust); }
.hero .sub {
  max-width: 480px;
  color: var(--ink-dim);
  font-size: 14px;
  margin: 16px auto 0;
}

.contact-btn {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--rust);
  color: #1a0800;
  border: none;
  border-radius: 6px;
  padding: 14px 22px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--rust); }
.contact-btn:active { transform: translateY(0); }

.x-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: inline-block;
}
.x-bar {
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 2px;
  background: #1a0800;
  border-radius: 1px;
}
.x-bar-1 { transform: translate(-50%, -50%) rotate(45deg); }
.x-bar-2 { transform: translate(-50%, -50%) rotate(-45deg); }

.contact-panel {
  margin-top: 22px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
}
.readout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.readout-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--hud);
}
.ca-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-align: left;
  word-break: break-all;
}
.copy-hint {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 7px;
}
.comms-row {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  flex-wrap: wrap;
}
.comms-row a, .comms a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 10px;
  letter-spacing: 0.04em;
}
.comms-row a:hover, .comms a:hover { border-color: var(--rust); color: var(--amber); }

.log, .brief {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
}
.log h2, .brief h2 {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-bottom: 18px;
}

.manifest {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.manifest-row {
  display: grid;
  grid-template-columns: 84px 1fr 52px 84px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}
.manifest-row:last-child { border-bottom: none; }
.manifest-active { background: rgba(255, 106, 52, 0.06); }
.m-name { text-transform: capitalize; color: var(--ink-dim); }
.manifest-active .m-name { color: var(--ink); font-weight: 700; }
.m-bar {
  display: block;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.m-bar i { display: block; height: 100%; background: var(--rust); }
.manifest-active .m-bar i { background: var(--hud); }
.m-cap { text-align: right; color: var(--ink-dim); }
.m-status { text-align: right; letter-spacing: 0.04em; }
.status-done { color: var(--hud-dim); }
.status-pending { color: var(--amber); }
.status-hold { color: var(--ink-dim); opacity: 0.6; }

.brief-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.brief-item {
  background: var(--bg-raised);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brief-k { font-size: 10px; letter-spacing: 0.1em; color: var(--hud); }
.brief-v { font-size: 13px; color: var(--ink); }

.chrome {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 20px 40px;
  text-align: center;
}
.chrome-ticker {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  color: var(--rust);
  font-size: 15px;
  margin-bottom: 14px;
}
.comms { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chrome-fine { font-size: 10px; color: var(--ink-dim); margin: 0; }

.noscript-banner {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 20px; font-size: 14px;
}

@media (min-width: 640px) {
  .manifest-row { grid-template-columns: 120px 1fr 64px 100px; font-size: 12px; }
  .brief-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .planet, .signal-dot.locked, .pun-track, .planet-glow { animation: none; }
  * { scroll-behavior: auto !important; }
}
