/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090B;
  --bg2: #111114;
  --surface: #18181B;
  --border: #27272A;
  --accent: #F59E0B;
  --accent-dim: #B45309;
  --text: #FAFAFA;
  --text2: #A1A1AA;
  --text3: #52525B;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.nav-status {
  font-size: 0.8rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px #22C55E;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 100px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
}
.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 28px;
}
.hero-title br { display: block; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 460px;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Hex Grid ─── */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-template-rows: repeat(3, 80px);
  gap: 12px;
  transform: rotate(-15deg);
}
.hex {
  width: 80px; height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
  transition: all 0.4s ease;
}
.hex::after {
  content: '';
  position: absolute;
  inset: 4px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: transparent;
}
.h1, .h3, .h7, .h9 {
  background: var(--accent);
  opacity: 0.15;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}
.h2, .h4, .h6, .h8 {
  background: var(--surface);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.05);
}
.h5 {
  background: var(--accent);
  opacity: 0.5;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

/* ─── Stats Row ─── */
.stats-row {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  gap: 0;
}
.stat {
  flex: 1;
  text-align: center;
  padding: 0 48px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}
.stat-div {
  width: 1px;
  height: 60px;
  background: var(--border);
}

/* ─── Categories ─── */
.categories {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  margin-bottom: 64px;
}
.section-tag {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.cat-card {
  background: var(--bg);
  padding: 48px 40px;
  position: relative;
  transition: background 0.3s ease;
}
.cat-card:hover { background: var(--surface); }
.cat-num {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}
.cat-card h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cat-card p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Manifesto ─── */
.manifesto {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 100px 40px;
}
.manifesto-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.manifesto blockquote {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  font-style: normal;
}
.manifesto-sub {
  font-size: 1rem;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Closing ─── */
.closing {
  padding: 120px 40px 100px;
  max-width: 1200px;
  margin: 0 auto;
}
.closing-inner {
  max-width: 700px;
}
.closing-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
}
.closing-sub {
  font-size: 1.1rem;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 300;
  max-width: 560px;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 4px;
}
.footer-meta {
  font-size: 0.8rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-sep { color: var(--text3); }

/* ─── Nav links ─── */
.nav-link { font-size: 0.85rem; color: var(--text2); text-decoration: none; padding: 6px 12px; border-radius: 6px; transition: color 0.15s, background 0.15s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link--active { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 16px; }

/* ─── Agent Catalog ─── */
.catalog-page { padding-top: 60px; }
.catalog-header {
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.catalog-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.catalog-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.catalog-subtitle { font-size: 1rem; color: var(--text2); font-weight: 300; }

.catalog-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  gap: 40px;
}
.catalog-sidebar { position: sticky; top: 80px; height: fit-content; }
.filter-section { margin-bottom: 32px; }
.filter-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 12px; }
.filter-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.filter-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 6px; font-size: 0.9rem; color: var(--text2); text-decoration: none; transition: background 0.12s, color 0.12s; }
.filter-item:hover { background: var(--surface); color: var(--text); }
.filter-item--active { background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 500; }
.filter-item--disabled { color: var(--text3); cursor: default; }
.filter-name { text-transform: capitalize; }
.filter-count { font-size: 0.75rem; background: var(--surface); padding: 2px 7px; border-radius: 10px; color: var(--text3); }

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.agent-card:hover { border-color: rgba(245,158,11,0.4); transform: translateY(-2px); }
.agent-card--featured { border-color: rgba(245,158,11,0.3); }
.agent-card-header { display: flex; align-items: center; justify-content: space-between; }
.agent-icon { width: 40px; height: 40px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.agent-meta { display: flex; align-items: center; gap: 8px; }
.agent-category { font-size: 0.75rem; color: var(--text3); text-transform: capitalize; }
.agent-badge { font-size: 0.7rem; background: rgba(245,158,11,0.15); color: var(--accent); padding: 3px 8px; border-radius: 4px; font-weight: 600; letter-spacing: 0.05em; }
.agent-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.agent-desc { font-size: 0.875rem; color: var(--text2); line-height: 1.6; font-weight: 300; flex-grow: 1; }
.agent-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-tag { font-size: 0.75rem; background: var(--bg2); border: 1px solid var(--border); color: var(--text3); padding: 3px 8px; border-radius: 4px; }
.agent-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.agent-pricing { display: flex; flex-direction: column; }
.pricing-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.pricing-model { font-size: 0.75rem; color: var(--text3); text-transform: capitalize; }
.agent-cta { font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; padding: 8px 14px; border: 1px solid rgba(245,158,11,0.3); border-radius: 6px; transition: background 0.15s; }
.agent-cta:hover { background: rgba(245,158,11,0.1); }

.empty-state { text-align: center; padding: 80px 40px; color: var(--text2); }
.back-link { color: var(--accent); text-decoration: none; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 80px;
    text-align: center;
  }
  .hero-sub { max-width: 100%; }
  .hero-visual { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; gap: 32px; }
  .stat-div { display: none; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .catalog-body { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
}
@media (max-width: 600px) {
  .nav { padding: 0 20px; }
  .hero { padding: 80px 20px 60px; }
  .stats-row { padding: 40px 20px; }
  .categories { padding: 80px 20px; }
  .manifesto { padding: 80px 20px; }
  .closing { padding: 80px 20px; }
  .footer { padding: 32px 20px; }
  .stat { padding: 0 16px; }
  .catalog-header { padding: 60px 20px 40px; }
  .catalog-body { padding: 20px 20px 60px; }
  .agents-grid { grid-template-columns: 1fr; }
}