/* StableL1 design system
   Accent: warm slate — architectural infrastructure neutral.
   Same dark substrate as all atlas properties.
   White .diagram-panel containers for Stack Diagrams on dark page. */

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

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

  --bg:         #0a0e17;
  --bg-raised:  #0d1120;
  --bg-card:    #0f1528;
  --border:     rgba(148, 163, 184, 0.1);
  --border-mid: rgba(148, 163, 184, 0.18);

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* L1 warm slate accent — architectural neutral */
  --accent:         #94a3b8;
  --accent-dim:     rgba(148, 163, 184, 0.12);
  --accent-border:  rgba(148, 163, 184, 0.3);
  --accent-glow:    rgba(148, 163, 184, 0.06);

  /* Domain colors — labels and highlights */
  --identity:   #60a5fa;
  --discovery:  #a78bfa;
  --reserves:   #fbbf24;
  --transfer:   #2dd4bf;
  --execution:  #fb923c;
  --token:      #34d399;
  --reporting:  #fb7185;

  /* Status colors */
  --safe:       #34d399;
  --warning:    #fbbf24;
  --info:       #60a5fa;
  --danger:     #f43f5e;

  /* Protocol colors */
  --amber:  #fbbf24;
  --blue:   #60a5fa;
  --green:  #34d399;
  --purple: #a78bfa;
  --teal:   #2dd4bf;
}

html {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Network bar ── */
.network-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

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

.network-sep {
  color: #1e293b;
  user-select: none;
}

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

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

.network-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.network-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.5s infinite;
}

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

/* ── Layout ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

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

/* ── Hero ── */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

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

.hero-rule {
  width: 40px;
  height: 2px;
  background: var(--accent);
  border: none;
  margin: 0 auto;
  opacity: 0.5;
}

/* ── Diagram panels — white containers on dark substrate ── */
.diagram-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 920px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}

.diagram-panel-compact {
  background: #ffffff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}

/* ── Bands ── */
.band {
  border-top: 1px solid var(--border);
  padding: 4rem 1.5rem;
}

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

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

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

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

/* ── Light band ── */
.band.light {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
}

.band.light .band-label { color: #475569; }
.band.light .band-title { color: #0f172a; }
.band.light .band-body  { color: #64748b; }

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

.band.light .card-title  { color: #0f172a; }
.band.light .card-desc   { color: #475569; }
.band.light .card-number { color: var(--accent); }

.band.light .platform-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.band.light .platform-desc { color: #475569; }

/* ── Shaded band ── */
.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; }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

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

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--border-mid);
}

.card-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--bg-card);
  transition: border-color 0.15s;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  border-color: var(--border-mid);
  text-decoration: none;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ── Chain status badges ── */
.chain-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.chain-badge.mainnet {
  color: var(--safe);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.chain-badge.testnet {
  color: var(--warning);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.chain-badge.coming-soon {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
}

/* ── Data table ── */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.data-table thead {
  position: sticky;
  top: 0;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-mid);
  white-space: nowrap;
}

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

.data-table tbody tr:hover {
  background: var(--accent-glow);
}

/* ── POC page layout ── */
.poc-page {
  padding: 3rem 0;
}

.poc-header {
  text-align: center;
  margin-bottom: 3rem;
}

.poc-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.poc-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

.illustration-wrapper {
  margin: 3rem auto;
}

.demo-wrapper {
  margin: 3rem auto;
  max-width: 900px;
}

/* ── Comparator layout ── */
.comparator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.comparator-grid-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

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

@media (max-width: 600px) {
  .comparator-grid-full {
    grid-template-columns: 1fr;
  }
}

/* ── Selector controls ── */
.selector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.selector-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.selector-select {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  min-width: 160px;
}

.selector-select:focus {
  border-color: var(--accent-border);
}

.preset-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 0.4rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.preset-btn:hover {
  border-color: var(--border-mid);
  color: var(--text-primary);
}

.preset-btn.active {
  border-color: var(--accent-border);
  color: var(--text-primary);
  background: var(--accent-dim);
}

/* ── Demo panels ── */
.demo-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--bg-card);
}

.demo-panel-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.demo-btn {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.demo-btn:hover {
  opacity: 0.85;
}

.demo-btn.identity { background: var(--identity); }
.demo-btn.execution { background: var(--execution); }
.demo-btn.transfer { background: var(--transfer); }
.demo-btn.token { background: var(--token); }
.demo-btn.discovery { background: var(--discovery); }

/* ── Platform links ── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.platform-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 0.15s;
  display: block;
}

.platform-card:hover {
  border-color: var(--border-mid);
  text-decoration: none;
}

.platform-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.platform-name.slate   { color: #94a3b8; }
.platform-name.amber   { color: var(--amber); }
.platform-name.teal    { color: var(--teal); }
.platform-name.crimson { color: var(--danger); }
.platform-name.blue    { color: var(--blue); }

.platform-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-3px);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.site-footer a:hover {
  color: var(--text-secondary);
  text-decoration: none;
}
