/* Void Relay — shared stylesheet
   Self-contained, no remote resources */

:root {
  --bg: #0a0c12;
  --bg-elevated: #12151f;
  --surface: #1a1f2e;
  --border: #2a3148;
  --text: #c8d0e0;
  --text-dim: #7a849c;
  --accent: #4de8c2;
  --accent-dim: #2a9d8f;
  --glow: rgba(77, 232, 194, 0.35);
  --warn: #e87a4d;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "Courier New", monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;
  --max-width: 720px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(77, 232, 194, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(77, 120, 232, 0.05) 0%, transparent 45%);
}

/* Subtle scanline overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover,
a:focus-visible {
  color: #7ff5d8;
  text-shadow: 0 0 8px var(--glow);
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px var(--glow);
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--accent-dim);
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  color: var(--text-dim);
  border-radius: var(--radius);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(77, 232, 194, 0.08);
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -1px 0 var(--accent);
}

main {
  flex: 1;
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--accent);
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--accent);
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.lead {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* Status bar */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}

.status-dot.warn {
  background: var(--warn);
  box-shadow: 0 0 6px rgba(232, 122, 77, 0.4);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Cards / panels */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

.panel-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel p:last-child {
  margin-bottom: 0;
}

/* Transmission list */
.tx-list {
  list-style: none;
}

.tx-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.tx-list li:last-child {
  border-bottom: none;
}

.tx-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tx-title {
  font-weight: 500;
  color: var(--text);
}

/* Artifact grid */
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.artifact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.artifact:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px rgba(77, 232, 194, 0.12);
}

.artifact-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.artifact h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.artifact p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

/* Protocol steps */
.protocol {
  counter-reset: step;
}

.protocol-step {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
}

.protocol-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* 404 special */
.error-page {
  text-align: center;
  padding-top: 3rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 30px var(--glow);
  margin-bottom: 0.5rem;
}

.error-message {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* Utility */
.mono {
  font-family: var(--font-mono);
}

.dim {
  color: var(--text-dim);
}

.mt-2 {
  margin-top: 2rem;
}

.hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Responsive */
@media (max-width: 540px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .status-bar {
    flex-direction: column;
    gap: 0.6rem;
  }
}
