/* ────────────────────────────────────────────────────────────────── */
/* Reset & Variables                                                   */
/* ────────────────────────────────────────────────────────────────── */

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

:root {
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Light mode (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-mid: #cbd5e1;
  --accent: #0D9488;
  --accent-dim: rgba(13, 148, 136, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1a1f2e;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.1);
    --border-mid: rgba(148, 163, 184, 0.2);
    --accent: #0D9488;
    --accent-dim: rgba(13, 148, 136, 0.15);
  }
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* ────────────────────────────────────────────────────────────────── */
/* Typography & Links                                                 */
/* ────────────────────────────────────────────────────────────────── */

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

a:hover {
  color: #0F766E;
}

/* ────────────────────────────────────────────────────────────────── */
/* Primary Navigation                                                 */
/* ────────────────────────────────────────────────────────────────── */

.primary-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.primary-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-logo-mark {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.nav-logo-text {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link--active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-github {
  color: var(--text-secondary);
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ────────────────────────────────────────────────────────────────── */
/* Container & Sections                                               */
/* ────────────────────────────────────────────────────────────────── */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ────────────────────────────────────────────────────────────────── */
/* Buttons                                                             */
/* ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: #0F766E;
  text-decoration: none;
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-mid);
  text-decoration: none;
}

/* ────────────────────────────────────────────────────────────────── */
/* Network Bar (top bar)                                              */
/* ────────────────────────────────────────────────────────────────── */

.network-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-tertiary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border);
}

.network-current {
  color: var(--text-primary);
  font-weight: 600;
}

.network-link {
  color: var(--text-muted);
  text-decoration: none;
}

.network-link:hover {
  color: var(--text-secondary);
  text-decoration: none;
}

.network-sep {
  color: var(--border-mid);
  font-size: 0.7rem;
  user-select: none;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.75rem;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 600;
}

.network-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

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

/* ────────────────────────────────────────────────────────────────── */
/* Band System (light/dark alternation)                               */
/* ────────────────────────────────────────────────────────────────── */

.band {
  padding: 4.5rem 1.5rem;
}

.band-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.band-header {
  margin-bottom: 2.5rem;
}

.band-header--center {
  text-align: center;
}

.band-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.band-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.band-body {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}

.band.dark {
  background: #0a0e17;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.band.dark .band-label {
  color: #0D9488;
}

.band.dark .band-title {
  color: #f1f5f9;
}

.band.dark .band-body {
  color: #94a3b8;
}

.band.dark .card {
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.band.dark .card-title {
  color: #f1f5f9;
}

.band.dark .card-desc {
  color: #94a3b8;
}

.band.dark .stat-value {
  color: #f1f5f9;
}

.band.dark .stat-label {
  color: #94a3b8;
}

.band.dark a {
  color: #2DD4BF;
}

.band.dark a:hover {
  color: #5EEAD4;
}

.band.light {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.band.light .band-label {
  color: #475569;
}

.band.light .band-title {
  color: #0f172a;
}

.band.light .band-body {
  color: #64748b;
}

.band.light .card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.band.shaded {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

.band.shaded .band-label {
  color: #475569;
}

.band.shaded .band-title {
  color: #0f172a;
}

.band.shaded .band-body {
  color: #64748b;
}

/* ────────────────────────────────────────────────────────────────── */
/* Smart Brevity                                                      */
/* ────────────────────────────────────────────────────────────────── */

.smart-brevity ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.smart-brevity li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

.smart-brevity li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.band.light .smart-brevity li::before,
.band.shaded .smart-brevity li::before {
  color: var(--text-secondary);
}

/* ────────────────────────────────────────────────────────────────── */
/* Split Layout                                                       */
/* ────────────────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.split-text pre {
  margin-top: 0;
}

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

/* ────────────────────────────────────────────────────────────────── */
/* Card Grid                                                          */
/* ────────────────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  text-decoration: none;
  display: block;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  background: rgba(13, 148, 136, 0.1);
  color: #0D9488;
  margin-bottom: 0.75rem;
}

/* ────────────────────────────────────────────────────────────────── */
/* Stat Strip                                                         */
/* ────────────────────────────────────────────────────────────────── */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
  padding: 2rem 0;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* ────────────────────────────────────────────────────────────────── */
/* Hero Wrap (dark)                                                   */
/* ────────────────────────────────────────────────────────────────── */

.hero-wrap {
  background: #0a0e17;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-wrap .hero-eyebrow {
  color: #0D9488;
}

.hero-wrap .hero-title {
  color: #f1f5f9;
}

.hero-wrap .hero-tagline {
  color: #94a3b8;
}

.hero-wrap .btn--primary {
  background: #0D9488;
  color: white;
}

.hero-wrap .btn--primary:hover {
  background: #0F766E;
}

.hero-wrap .btn--secondary {
  background: transparent;
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.hero-wrap .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
}

/* ────────────────────────────────────────────────────────────────── */
/* Illustration Wrapper (light)                                       */
/* ────────────────────────────────────────────────────────────────── */

.illustration-wrapper--light {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

/* ────────────────────────────────────────────────────────────────── */
/* POC Dual Panel                                                     */
/* ────────────────────────────────────────────────────────────────── */

.poc-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .poc-dual {
    grid-template-columns: 1fr;
  }
}

.poc-input,
.poc-output {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.poc-input label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.poc-input select,
.poc-input input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  margin-bottom: 1rem;
}

.poc-input select:focus,
.poc-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ────────────────────────────────────────────────────────────────── */
/* POC Section Styles                                                 */
/* ────────────────────────────────────────────────────────────────── */

.poc-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.poc-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.poc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.poc-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.poc-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
}

.poc-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.75em;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.poc-platform-badge--cloudflare {
  background: rgba(249, 115, 22, 0.12);
  color: #F97316;
}

.poc-platform-badge--circle {
  background: rgba(59, 130, 246, 0.12);
  color: #3B82F6;
}

.poc-platform-badge--coinbase {
  background: rgba(56, 97, 251, 0.12);
  color: #3861FB;
}

/* ────────────────────────────────────────────────────────────────── */
/* Target Table                                                       */
/* ────────────────────────────────────────────────────────────────── */

.target-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
}

.target-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.target-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  white-space: nowrap;
}

.target-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.target-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* dark band table overrides */
.band.dark .target-table-wrapper {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.1);
}

.band.dark .target-table th {
  background: #0d1120;
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.1);
}

.band.dark .target-table td {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.08);
}

.band.dark .target-table td:first-child {
  color: #f1f5f9;
}

/* ────────────────────────────────────────────────────────────────── */
/* Code Blocks                                                        */
/* ────────────────────────────────────────────────────────────────── */

.code-block {
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.code-block-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ────────────────────────────────────────────────────────────────── */
/* Network Footer                                                     */
/* ────────────────────────────────────────────────────────────────── */

.network-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  text-align: center;
  font-size: 0.8rem;
}

.network-footer-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.network-footer-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.network-footer-link:hover {
  color: var(--accent);
}

.network-footer-sep {
  color: var(--border-mid);
}

.network-footer-note {
  color: var(--text-muted);
}

.network-footer-note a {
  color: var(--accent);
}

/* ────────────────────────────────────────────────────────────────── */
/* Accessibility                                                      */
/* ────────────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ────────────────────────────────────────────────────────────────── */
/* Mobile Responsive                                                  */
/* ────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .band {
    padding: 3rem 1.5rem;
  }

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

  .stat-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }
}
