/* Noul brand system ("Obsidian Forge"): obsidian surfaces, Ignis orange accent, emerald for validated states. */
:root,
[data-theme="dark"] {
  --bg-primary: #09090b;
  --bg-secondary: #121216;
  --bg-card: #121216;
  --bg-elevated: #18181e;
  --bg-terminal: #09090b;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: #27272a;
  --grid-line: rgba(39, 39, 42, 0.3);
  --accent-cyan: #ff5500;      /* primary accent (Ignis) */
  --accent-indigo: #fafafa;    /* neutral emphasis */
  --accent-emerald: #10b981;   /* validated */
  --accent-amber: #ff6b22;     /* Ignis hover */
  --accent-fill: #ff5500;
  --accent-fill-hover: #ff6b22;
  --shadow-lg: 0 20px 45px -15px rgba(0, 0, 0, 0.8);
  --code-bg: #09090b;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f5;
  --bg-card: #f4f4f5;
  --bg-elevated: #ffffff;
  --bg-terminal: #09090b;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --border-color: #e4e4e7;
  --grid-line: rgba(228, 228, 231, 0.6);
  --accent-cyan: #c2410c;      /* Ignis darkened for text on light surfaces */
  --accent-indigo: #09090b;
  --accent-emerald: #047857;
  --accent-amber: #9a3412;
  --accent-fill: #ff5500;
  --accent-fill-hover: #ff6b22;
  --shadow-lg: 0 18px 36px -12px rgba(9, 9, 11, 0.12);
  --code-bg: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
}

code, pre, .mono {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.theme-toggle {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-color);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--accent-cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
}

.badge.emerald {
  color: var(--accent-emerald);
}

.badge.indigo {
  color: var(--accent-indigo);
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 1.75rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-fill);
  color: #ffffff;
  box-shadow: 0 10px 24px -12px rgba(255, 85, 0, 0.6);
}

.btn-primary:hover {
  background: var(--accent-fill-hover);
}

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

/* Terminal Simulator */
.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid #27272a;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: #e4e4e7;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: #121216;
  border-bottom: 1px solid #27272a;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.window-dots {
  display: flex;
  gap: 0.45rem;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.term-tab {
  background: transparent;
  color: #a1a1aa;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.term-tab.active {
  background: #18181e;
  color: #ff5500;
  border-color: #ff5500;
}

.terminal-body {
  padding: 1.25rem 1.4rem;
  min-height: 290px;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Sections */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--text-secondary);
  margin-bottom: 2.25rem;
  max-width: 780px;
}

/* 4-Persona Grid */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.35rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.card-tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 750;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.card ul {
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Quickstart & Config Tabs */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.35rem;
  margin-bottom: 2rem;
}

.code-box {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  position: relative;
}

.code-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.copy-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent-cyan);
}

.code-box pre {
  overflow-x: auto;
  font-size: 0.84rem;
}

.config-tabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.cfg-tab {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}

.cfg-tab.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.cfg-panel {
  display: none;
}

.cfg-panel.active {
  display: block;
}

/* Ecosystem Architecture */
.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem;
  overflow-x: auto;
}

/* Tools Catalog */
.catalog-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 240px;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.92rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-card h4 {
  font-size: 1rem;
  color: var(--accent-cyan);
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tool-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

/* Roadmap Table */
.roadmap-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.roadmap-table th,
.roadmap-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.roadmap-table th {
  background: var(--bg-secondary);
  font-weight: 700;
}

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding: 3rem 0 2.5rem;
  }
}

/* Install page */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.install-card h3 { margin-top: 0; }
.install-card ol { padding-left: 1.2rem; color: var(--text-secondary); }
.install-card ol li { margin: 0.35rem 0; }
.install-card .btn { margin: 0.25rem 0.5rem 0.25rem 0; }
.install-note { color: var(--text-muted); font-size: 0.9rem; }
.download-list { list-style: none; padding: 0; margin: 0.75rem 0; }
.download-list li { margin: 0.35rem 0; }
.download-list a { color: var(--accent-cyan); }
.download-list .is-recommended a::after { content: "  ← recommended for your system"; color: var(--accent-emerald); font-size: 0.85rem; }
.connector-pending { border: 1px dashed var(--border-color); border-radius: 10px; padding: 0.75rem 1rem; color: var(--text-secondary); }


/* Brand details */
::selection { background: #ff5500; color: #ffffff; }
.brand span { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.95rem; }
.card-tag, .section-title + .section-lead code { font-family: "JetBrains Mono", ui-monospace, monospace; }
.card-tag { text-transform: uppercase; }
.hero h1 { font-family: "Inter", system-ui, sans-serif; }
.hero h1::after { content: "."; color: var(--accent-fill); }
main a:not(.btn), .site-footer a { color: var(--accent-cyan); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-cyan) 45%, transparent); text-underline-offset: 3px; }
main a:not(.btn):hover, .site-footer a:hover { text-decoration-color: currentColor; }
.theme-toggle { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.78rem; white-space: nowrap; }
.brand span { white-space: nowrap; }
@media (max-width: 480px) { .brand span { font-size: 0.78rem; letter-spacing: 0.1em; } }
