
/* FORCE_DARK — Tier 5 developer aesthetic */
:root, html, html.dark {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --brand-500: #38bdf8;
  --brand-600: #0ea5e9;
  --brand-700: #0284c7;
  --border: #334155;
  --emerald: #34d399;
}
html { background: var(--bg); color: var(--text); }
body { background: var(--bg) !important; color: var(--text) !important; }
.theme-toggle { display: none !important; } /* strict dark-mode-only */
.code-block {
  background: #020617; border: 1px solid #1e293b; border-radius: 0.75rem;
  padding: 1rem 1.1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem; color: #e2e8f0; position: relative; overflow-x: auto;
}
.code-block .copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem; font-size: 0.75rem;
  padding: 0.25rem 0.5rem; border-radius: 0.4rem; border: 1px solid #334155;
  background: #1e293b; color: #94a3b8; cursor: pointer;
}
.terminal-hero {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #020617; border: 1px solid #1e293b; border-radius: 1rem;
  padding: 1.25rem 1.5rem; max-width: 640px; margin: 1.5rem auto 0;
  text-align: left; min-height: 120px; color: #34d399; font-size: 0.9rem;
  box-shadow: 0 0 40px rgba(56,189,248,0.08);
}
.terminal-hero .cmd { color: #38bdf8; }
.activity-ticker {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.25rem; font-size: 0.9rem; color: var(--text-muted);
}
.activity-ticker strong { color: #38bdf8; font-variant-numeric: tabular-nums; }
.heatmap {
  display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; max-width: 480px;
}
.heatmap span {
  width: 100%; aspect-ratio: 1; border-radius: 2px; background: #1e293b;
}
.heatmap span.l1 { background: #164e63; }
.heatmap span.l2 { background: #0e7490; }
.heatmap span.l3 { background: #06b6d4; }
.heatmap span.l4 { background: #67e8f9; }
.json-preview {
  background: #020617; border-radius: 0.75rem; padding: 1rem; font-size: 0.8rem;
  font-family: ui-monospace, monospace; overflow: auto; max-height: 280px;
}
.json-key { color: #38bdf8; }
.json-str { color: #34d399; }
.json-num { color: #fbbf24; }

/* SchemaForge — Modern Design System 2026 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --forge-400: #fbbf24;
  --forge-500: #f59e0b;
  --forge-600: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 1rem;
  --radius-sm: 0.75rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.1);
}

.dark {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* View Transitions */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
  animation-name: fade-out, slide-out;
}

::view-transition-new(root) {
  animation-name: fade-in, slide-in;
}

@keyframes fade-out {
  to { opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
}
@keyframes slide-out {
  to { transform: translateY(-12px); }
}
@keyframes slide-in {
  from { transform: translateY(16px); }
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--forge-500), var(--forge-600));
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

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

.nav a {
  padding: 0.45rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a.active {
  color: var(--brand-600);
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
}

.dark .nav a.active {
  color: #38bdf8;
  background: color-mix(in srgb, var(--brand-500) 18%, transparent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: white;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

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

.btn-secondary:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-hover {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand-500) 30%, var(--border));
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--text) 30%, var(--brand-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .hero h1 {
  background: linear-gradient(135deg, #f1f5f9 20%, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Page header (for inner pages) */
.page-header {
  padding: 3.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.step {
  text-align: center;
  padding: 1.75rem 1.25rem;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}

.step-1 { background: color-mix(in srgb, #0ea5e9 15%, transparent); color: #0284c7; }
.step-2 { background: color-mix(in srgb, #a855f7 15%, transparent); color: #9333ea; }
.step-3 { background: color-mix(in srgb, #22c55e 15%, transparent); color: #16a34a; }
.step-4 { background: color-mix(in srgb, #f59e0b 15%, transparent); color: #d97706; }

/* How it works detailed */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-500), var(--forge-500));
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  padding-left: 70px;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand-500);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-600);
  z-index: 1;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--surface);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.15rem 1.35rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question:hover {
  background: var(--surface-2);
}

.faq-answer {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-muted);
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-icon {
  transition: transform 0.25s;
  font-size: 1.2rem;
  color: var(--brand-500);
}

/* Contact form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.footer-col a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Utility */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
  color: var(--brand-700);
}

.dark .badge {
  color: #7dd3fc;
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .timeline::before {
    left: 14px;
  }
  
  .timeline-item {
    padding-left: 50px;
  }
  
  .timeline-dot {
    left: 2px;
  }
}

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

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 0.7rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: grid;
    place-items: center;
  }
  
  .nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav.mobile-open a {
    padding: 0.75rem 1rem;
  }
}

/* Subtle background pattern */
.bg-pattern {
  background-image: 
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--brand-500) 8%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, color-mix(in srgb, var(--forge-500) 6%, transparent) 0%, transparent 40%);
}


/* ── Smart nav + command palette ── */
.nav-smart {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-smart a, .nav-drop-btn {
  padding: 0.4rem 0.65rem;
  border-radius: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.nav-smart a:hover, .nav-drop-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav-smart a.active {
  color: var(--brand-500, #38bdf8);
  background: color-mix(in srgb, #38bdf8 12%, transparent);
}
.nav-dropdown { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-drop-btn i { font-size: 0.65rem; opacity: 0.7; }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 200px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 0.4rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 50;
}
.nav-dropdown.open .nav-drop-panel { display: flex; flex-direction: column; gap: 0.15rem; }
.nav-drop-panel a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.7rem; border-radius: 0.5rem; color: #cbd5e1;
}
.nav-drop-panel a i { width: 1rem; color: #38bdf8; opacity: 0.9; }
.nav-cmd {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-left: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid #334155;
  background: #020617;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
}
.nav-cmd kbd {
  font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 0.3rem;
  background: #1e293b; border: 1px solid #334155; color: #64748b;
}
.nav-ops { color: #fbbf24 !important; }

/* Command palette overlay */
#cmd-palette {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(2,6,23,0.72); backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center; padding-top: 12vh;
}
#cmd-palette.open { display: flex; }
#cmd-palette .panel {
  width: min(520px, 92vw); background: #0f172a; border: 1px solid #334155;
  border-radius: 1rem; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
#cmd-palette input {
  width: 100%; border: 0; background: transparent; color: #e2e8f0;
  padding: 1rem 1.1rem; font-size: 1rem; outline: none;
  border-bottom: 1px solid #1e293b;
}
#cmd-palette .cmd-list { max-height: 320px; overflow: auto; padding: 0.4rem; }
#cmd-palette .cmd-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 0.85rem; border-radius: 0.5rem; cursor: pointer; color: #cbd5e1;
}
#cmd-palette .cmd-item:hover, #cmd-palette .cmd-item.active {
  background: color-mix(in srgb, #38bdf8 15%, transparent); color: #fff;
}
#cmd-palette .cmd-item span { font-size: 0.75rem; color: #64748b; }

@media (max-width: 900px) {
  .nav-smart { display: none; }
  .nav.mobile-open, .nav-smart.mobile-open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #0f172a; padding: 1rem; border-bottom: 1px solid #334155; z-index: 40;
  }
}
