:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #52637a;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --paper: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.12);
  --deep: #0c1926;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.18);
  --warn: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand img {
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 550;
  color: var(--muted);
}

nav a:hover {
  color: var(--primary);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.15s ease;
}

.button-sm:hover {
  border-color: var(--muted-light);
  background: var(--paper);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 48px;
  align-items: center;
  width: min(1160px, calc(100% - 40px));
  margin: 24px auto 0;
  padding: 56px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: var(--deep);
  color: #fff;
  font-size: 14.5px;
  font-weight: 650;
  transition: all 0.15s ease;
}

.button:hover {
  background: #1a2f42;
  transform: translateY(-1px);
}

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.button-outline:hover {
  background: var(--surface-alt);
  border-color: var(--muted-light);
}

/* Hero Status Dashboard */
.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background:
    radial-gradient(ellipse at top right, rgba(2, 132, 199, 0.08), transparent 60%),
    var(--surface);
  box-shadow: 0 20px 50px -12px rgba(12, 25, 38, 0.09);
}

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

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.panel-badge span.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-glow);
}

.panel-time {
  font-size: 12px;
  color: var(--muted-light);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.metric-card {
  padding: 12px 14px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
}

.metric-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.metric-card strong {
  display: block;
  font-size: 22px;
  font-weight: 750;
  color: var(--ink);
}

.metric-card small {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

.telemetry-preview {
  margin-top: 18px;
}

.telemetry-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.signal-bars {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  align-items: end;
  height: 72px;
}

.signal-bars i {
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.85;
}

.signal-bars i:nth-child(1) { height: 42%; background: #38bdf8; }
.signal-bars i:nth-child(2) { height: 68%; background: #0284c7; }
.signal-bars i:nth-child(3) { height: 52%; background: #0369a1; }
.signal-bars i:nth-child(4) { height: 86%; background: #10b981; }
.signal-bars i:nth-child(5) { height: 92%; background: #059669; }
.signal-bars i:nth-child(6) { height: 60%; background: #0284c7; }
.signal-bars i:nth-child(7) { height: 75%; background: #38bdf8; }
.signal-bars i:nth-child(8) { height: 82%; background: #0284c7; }
.signal-bars i:nth-child(9) { height: 95%; background: #10b981; }

/* Sections */
.section {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.section-header {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-tag {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 16.5px;
  margin: 0;
}

/* Feature Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--primary);
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* PoP Network Table */
.pop-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.pop-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.pop-table th {
  padding: 14px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pop-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.pop-table tr:last-child td {
  border-bottom: none;
}

.pop-table tr:hover td {
  background: #f8fafc;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12.5px;
}

.status-badge.operational {
  color: #059669;
}

.status-badge.operational::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* Code Snippet Area */
.code-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.code-box {
  background: var(--deep);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(12, 25, 38, 0.15);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e293b;
}

.code-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.code-header span:nth-child(1) { background: #ef4444; }
.code-header span:nth-child(2) { background: #f59e0b; }
.code-header span:nth-child(3) { background: #10b981; }

.code-box pre {
  margin: 0;
  line-height: 1.65;
}

.code-comment { color: #64748b; }
.code-cmd { color: #38bdf8; }
.code-arg { color: #f1f5f9; }
.code-opt { color: #a5b4fc; }

/* Status callout banner */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  margin-top: 32px;
}

.status-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #166534;
  font-weight: 600;
  font-size: 14px;
}

.status-banner a {
  font-size: 13.5px;
  color: #15803d;
  font-weight: 600;
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 48px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
}

.footer-container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
  margin: 14px 0 0;
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 13px;
}

/* 404 Specific */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  padding: 40px 20px;
}

.error-code {
  font-size: clamp(72px, 12vw, 120px);
  font-weight: 850;
  color: var(--deep);
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -0.04em;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
}

.error-desc {
  max-width: 480px;
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 28px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px 0 48px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .code-section {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  nav {
    display: none;
  }

  .header-cta .button-sm:first-child {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
