@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #050508;
  --bg-raised: #0a0a12;
  --bg-hover: #0e0e18;
  --text: #e8e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --border: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.25);
  --pink: #ec4899;
  --pink-light: #f472b6;
  --pink-glow: rgba(236, 72, 153, 0.4);
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --orange: #fb923c;
  --orange-light: #fdba74;
  --orange-glow: rgba(251, 146, 60, 0.3);
  --green: #34d399;
  --green-light: #4ade80;
  --purple: #a78bfa;
  --purple-light: #c4b5fd;
  --purple-glow: rgba(167, 139, 250, 0.3);
  --rose: #fb7185;
  --rose-light: #fda4af;
  --rose-glow: rgba(251, 113, 133, 0.3);

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Navigation ── */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px var(--pink-glow);
  white-space: nowrap;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  filter: drop-shadow(0 0 8px var(--pink-glow));
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.nav-spacer { flex: 1; }

.nav-services { display: flex; gap: 6px; }

.nav-service {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.nav-service:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); }
.nav-service.coming-soon { opacity: 0.4; pointer-events: none; }

/* ── Layout ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 28px;
}

/* ── Hero ── */
.hero { margin-bottom: 48px; }

.hero-logo {
  width: 180px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 30px var(--pink-glow));
}

.hero-logo-sm {
  width: 100px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px var(--pink-glow));
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 0 60px var(--pink-glow);
  line-height: 1.1;
}

.hero .tagline {
  font-size: 17px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 640px;
  line-height: 1.7;
}

.hero .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ── Sections ── */
.section { margin-bottom: 48px; }

.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ── Grids ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ── Cards ── */
.card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-raised) 100%);
  padding: 24px;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.card:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, #121220 0%, var(--bg-hover) 100%);
}

.card-link { display: block; }
.card-link .card { height: 100%; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-stat {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin: 8px 0;
}

.card-footer {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Accent colors */
.accent-pink  { border-color: rgba(236, 72, 153, 0.3); }
.accent-pink:hover  { border-color: rgba(236, 72, 153, 0.5); box-shadow: 0 0 40px rgba(236, 72, 153, 0.08); }
.accent-cyan  { border-color: rgba(6, 182, 212, 0.3); }
.accent-cyan:hover  { border-color: rgba(6, 182, 212, 0.5); box-shadow: 0 0 40px rgba(6, 182, 212, 0.08); }
.accent-orange { border-color: rgba(251, 146, 60, 0.3); }
.accent-orange:hover { border-color: rgba(251, 146, 60, 0.5); box-shadow: 0 0 40px rgba(251, 146, 60, 0.08); }
.accent-purple { border-color: rgba(167, 139, 250, 0.3); }
.accent-purple:hover { border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 0 40px rgba(167, 139, 250, 0.08); }
.accent-green { border-color: rgba(52, 211, 153, 0.3); }
.accent-green:hover { border-color: rgba(52, 211, 153, 0.5); box-shadow: 0 0 40px rgba(52, 211, 153, 0.08); }
.accent-rose  { border-color: rgba(251, 113, 133, 0.3); }
.accent-rose:hover  { border-color: rgba(251, 113, 133, 0.5); box-shadow: 0 0 40px rgba(251, 113, 133, 0.08); }

/* ── No-emblem alignment ── */
.card.card-no-emblem {
  padding-top: 112px; /* 24px padding + 72px emblem + 16px gap */
}

/* ── Card buttons ── */
.card-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.card-button {
  flex: 1;
  text-align: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan-light);
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.06);
  transition: all 0.15s;
}
.card-button:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.6);
  background: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-pink   { color: var(--pink-light);   background: rgba(236, 72, 153, 0.15); border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-cyan   { color: var(--cyan-light);   background: rgba(6, 182, 212, 0.15);  border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-orange { color: var(--orange-light); background: rgba(251, 146, 60, 0.15); border: 1px solid rgba(251, 146, 60, 0.3); }
.badge-purple { color: var(--purple-light); background: rgba(167, 139, 250, 0.15); border: 1px solid rgba(167, 139, 250, 0.3); }
.badge-green  { color: var(--green-light);  background: rgba(52, 211, 153, 0.15);  border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-rose   { color: var(--rose-light);   background: rgba(251, 113, 133, 0.15); border: 1px solid rgba(251, 113, 133, 0.3); }
.badge-muted  { color: var(--text-muted);   background: rgba(148, 163, 184, 0.1);  border: 1px solid var(--border); }

/* ── Feature list ── */
.features {
  list-style: none;
  margin-top: 12px;
}
.features li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
}
.features li::before {
  content: '\25B8\00a0';
  color: var(--text-dim);
}

/* ── Version tag ── */
.version {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ── Emblems ── */
.card-emblem {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
}

/* Admin section: center the emblem and the title/subtitle under it */
.section-admin .card { text-align: center; }
.section-admin .card-emblem { display: block; margin-left: auto; margin-right: auto; }
.section-admin .card-buttons { justify-content: center; }

/* ── Slim card (inline banner row) ── */
.card-slim {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
}
.card-slim .card-stat {
  font-size: 26px;
  margin: 0;
  min-width: 52px;
  text-align: center;
}
.card-slim .card-slim-body { flex: 1; min-width: 0; }
.card-slim .card-title { font-size: 16px; margin-bottom: 2px; }
.card-slim .card-description { font-size: 13px; line-height: 1.6; }
.card-slim .card-footer { margin-top: 0; white-space: nowrap; }

@media (max-width: 640px) {
  .card-slim { flex-wrap: wrap; gap: 12px; }
  .card-slim .card-footer { width: 100%; }
}

/* ── Featured card ── */
.card-featured {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
}
.card-featured .card-emblem {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  margin-bottom: 0;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 32px rgba(236, 72, 153, 0.3);
}
/* Featured emblem glow follows the card's accent */
.card-featured.accent-orange .card-emblem { box-shadow: 0 0 32px var(--orange-glow); }
.card-featured.accent-cyan .card-emblem  { box-shadow: 0 0 32px var(--cyan-glow); }
.card-featured.accent-rose .card-emblem  { box-shadow: 0 0 32px var(--rose-glow); }
.card-featured.accent-rose {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.1) 0%, var(--bg-raised) 50%);
  border-color: rgba(251, 113, 133, 0.45);
  box-shadow: 0 0 60px rgba(251, 113, 133, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card-featured.accent-rose:hover {
  border-color: rgba(251, 113, 133, 0.6);
  box-shadow: 0 0 80px rgba(251, 113, 133, 0.18);
}
.card-featured .card-label { font-size: 18px; }
.card-featured .card-description { font-size: 15px; }
.card-featured.accent-pink {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, var(--bg-raised) 50%);
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 60px rgba(236, 72, 153, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card-featured.accent-pink:hover {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 0 80px rgba(236, 72, 153, 0.18);
}

@media (max-width: 640px) {
  .card-featured { flex-direction: column; text-align: center; }
  .card-featured .card-emblem { margin-bottom: 12px; }
}

/* ── Footer ── */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* ── Architecture page ── */
/* ═══════════════════════════════════════════════════════════════════ */

.arch-panel {
  margin-bottom: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.arch-panel:first-of-type { border-top: none; padding-top: 8px; }

.arch-panel-header { margin-bottom: 28px; max-width: 820px; }

.arch-panel-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.arch-panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.arch-panel-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.arch-panel-sub strong { color: var(--text); }

/* ── Funnel + fan-out SVG wrappers ── */
.arch-funnel,
.arch-fanout {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-raised) 100%);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow-x: auto;
}
.arch-funnel svg,
.arch-fanout svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 720px;
}

/* ── Gate detail cards ── */
.arch-gate-grid .card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-footnote {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.arch-footnote-label {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-light);
  margin-right: 6px;
  font-size: 10px;
}

/* ── Per-lane credential rows inside gate cards ── */
.gate-lanes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.gate-lane {
  display: grid;
  grid-template-columns: 10px 92px 1fr;
  gap: 12px;
  align-items: start;
  line-height: 1.55;
}

.gate-lane-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px; /* align dot optical-center with first line of credential text */
}

.gate-lane-human .gate-lane-dot {
  background: var(--pink-light);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.55);
}
.gate-lane-agent .gate-lane-dot {
  background: var(--orange-light);
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.5);
}

.gate-lane-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  padding-top: 4px; /* align label baseline with credential first line */
}
.gate-lane-human .gate-lane-label { color: var(--pink-light); }
.gate-lane-agent .gate-lane-label { color: var(--orange-light); }

.gate-lane-cred {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Footnote after gate-lanes: don't double up on dashed borders */
.gate-lanes + .arch-footnote {
  border-top: none;
  padding-top: 10px;
  margin-top: 4px;
}

/* ── Panel 2: Data residency ── */
.arch-core-card {
  border-radius: 16px;
  border: 1px solid rgba(236, 72, 153, 0.35);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, var(--bg-raised) 60%);
  box-shadow: 0 0 60px rgba(236, 72, 153, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 28px;
}

.arch-core-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.arch-core-emblem {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.25);
  flex-shrink: 0;
}

.arch-core-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.arch-core-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.arch-core-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.arch-residency-grid { margin-bottom: 24px; }

.arch-residency-item {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 5, 8, 0.4);
  transition: all 0.15s;
}
.arch-residency-item:hover {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.04);
}

.arch-residency-icon {
  font-size: 24px;
  margin-bottom: 10px;
  line-height: 1;
}

.arch-residency-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.arch-residency-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.arch-core-footer {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.2);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.arch-core-footer-label {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--pink-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 10px;
}

/* ── Panel 3: Provider grid ── */
.arch-provider-grid { margin-bottom: 28px; }
.arch-provider-grid .card { display: flex; flex-direction: column; }

/* ── Banned callout ── */
.arch-banned {
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, var(--bg-raised) 70%);
  padding: 22px 24px;
}

.arch-banned-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.arch-banned-body { display: flex; flex-direction: column; gap: 14px; }

.arch-banned-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: start;
}

.arch-banned-tag {
  justify-self: start;
  padding: 5px 11px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  line-height: 1.3;
  margin-top: 1px; /* nudge pill down to align with note's first line */
}

.arch-banned-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 2px;
}

@media (max-width: 800px) {
  .arch-banned-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ── Sources footer ── */
.arch-sources {
  margin-top: 64px;
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.arch-sources-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.arch-sources ul { list-style: none; }
.arch-sources li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  line-height: 1.7;
}
.arch-sources li::before {
  content: '\25B8\00a0';
  color: var(--text-dim);
}
.arch-sources code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--cyan-light);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.08);
}

/* Inline code in architecture descriptions */
.arch-panel code,
.arch-core-card code,
.card-description code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 36px; }
  .arch-residency-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-panel-title { font-size: 26px; }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .arch-residency-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .container { padding: 24px 16px; }
  .nav-inner { padding: 0 16px; gap: 16px; }
  .nav-services { display: none; }
  .arch-core-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .arch-provider-grid .card[style*="grid-column"] { grid-column: auto !important; }
  .arch-panel-title { font-size: 22px; }
}
