/* ============================================================
   OBSERVER PROTOCOL — DESIGN SYSTEM v2.0
   All pages import this. Edit once, propagates everywhere.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=IBM+Plex+Sans:wght@300;400;500&display=swap');

:root {
  /* Core palette */
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #171717;
  --bg-card:      #141414;
  --border:       #2a2a2a;
  --border-bright:#3d3d3d;

  /* Orange accent spectrum */
  --orange:       #f7931a;
  --orange-dim:   #c4720e;
  --orange-glow:  rgba(247, 147, 26, 0.15);
  --orange-glow2: rgba(247, 147, 26, 0.06);

  /* Text */
  --text-primary:   #e8e8e8;
  --text-secondary: #8a8a8a;
  --text-dim:       #4a4a4a;

  /* Status */
  --verified:     #22c55e;
  --verified-bg:  rgba(34, 197, 94, 0.1);
  --pending:      #f7931a;
  --pending-bg:   rgba(247, 147, 26, 0.1);
  --registered:   #60a5fa;
  --registered-bg:rgba(96, 165, 250, 0.1);

  /* Typography */
  --font-mono:  'IBM Plex Mono', monospace;
  --font-sans:  'IBM Plex Sans', sans-serif;

  /* Spacing */
  --nav-h: 56px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
}
.nav-logo {
  color: var(--orange);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active { color: var(--orange); }

/* ── PAGE WRAPPER ────────────────────────────────────────── */
.page { padding-top: var(--nav-h); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 2rem; }

/* ── SECTION LABEL ───────────────────────────────────────── */
.section-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-bright); }

/* ── BADGE CHIPS ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.badge-verified   { background: var(--verified-bg);   color: var(--verified);   border: 1px solid rgba(34,197,94,0.3); }
.badge-pending    { background: var(--pending-bg);     color: var(--pending);    border: 1px solid rgba(247,147,26,0.3); }
.badge-registered { background: var(--registered-bg); color: var(--registered); border: 1px solid rgba(96,165,250,0.3); }

/* ── CODE BLOCKS ─────────────────────────────────────────── */
.code-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
  position: relative;
}
.code-block .comment { color: var(--text-dim); }
.code-block .key     { color: #60a5fa; }
.code-block .val     { color: var(--orange); }
.code-block .str     { color: #86efac; }
.code-block .op      { color: var(--text-secondary); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--orange);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover { background: #e8851a; }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-bright);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--text-secondary); }
.footer-links { display: flex; gap: 1.5rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.20s; }
.fade-up-4 { animation-delay: 0.28s; }
.fade-up-5 { animation-delay: 0.36s; }

/* ── LIVE DOT ────────────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--verified);
  animation: pulse-dot 2s infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* ── GRAIN OVERLAY ───────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── NAV DROPDOWN ────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  list-style: none;
  min-width: 160px;
  z-index: 200;
  padding: 0.25rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu li a:hover {
  color: var(--orange);
  background: var(--bg-3);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
