/* xbgst hub — polished static surface */
:root {
  --bg: #09090b;
  --bg-elevated: #111114;
  --bg-subtle: #18181c;
  --fg: #f4f4f5;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --accent: #93c5fd;
  --accent-dim: #3b82f6;
  --success: #4ade80;
  --link: #93c5fd;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-xl: 24px;
  --font: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 0 0 color-mix(in oklab, #fff 6%, transparent),
    0 12px 40px -16px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; color: var(--fg); }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
code.ok { color: var(--success); }
.mono { font-family: var(--mono); }
.muted { color: var(--fg-muted); font-weight: 500; }
.dim { color: var(--fg-subtle); }
.muted-sm { color: var(--fg-muted); font-size: 0.875rem; margin: 0.25rem 0 0; }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .wrap { padding: 0 1.5rem; }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, backdrop-filter 0.2s;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom-color: color-mix(in oklab, var(--border) 80%, transparent);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  height: 3.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) {
  .nav-inner { padding: 0 1.5rem; }
}
.brand {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand span {
  display: none;
  margin-left: 0.35rem;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--fg-subtle);
}
@media (min-width: 640px) {
  .brand span { display: inline; }
}
.brand:hover { color: var(--accent); text-decoration: none; }
.nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}
.nav-links a {
  color: var(--fg-muted);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--fg);
  background: var(--bg-subtle);
  text-decoration: none;
}
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  padding: 0.55rem;
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  border-radius: 1px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
}
.mobile-nav a {
  color: var(--fg);
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.mobile-nav a:hover { background: var(--bg-subtle); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-weight: 500;
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.btn-ghost {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-weight: 500;
  min-height: 2.25rem;
  margin-left: 0.5rem;
}
.btn-text {
  background: transparent;
  color: var(--fg-muted);
  font-weight: 500;
  padding: 0 1rem;
}
.btn-text:hover { color: var(--fg); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 4rem;
}
@media (min-width: 640px) {
  .hero { padding: 4rem 0 6rem; }
}
.hero-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--fg) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--fg) 4%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 20%, transparent 75%);
}
.hero .wrap { position: relative; }
.hero::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: 18rem;
  background: radial-gradient(
    ellipse 80% 60% at 50% -10%,
    color-mix(in oklab, var(--accent-dim) 22%, transparent),
    transparent
  );
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-elevated) 80%, transparent);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
}
.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  position: relative;
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dot::after { animation: none; }
}
.hero h1 {
  margin: 1.5rem 0 0;
  max-width: 48rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--fg-muted);
  text-wrap: pretty;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Sections */
.section {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  scroll-margin-top: 5rem;
}
@media (min-width: 640px) {
  .section { padding: 5rem 0; }
}
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.section h2 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-lede {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  color: var(--fg-muted);
  text-wrap: pretty;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .section-head .btn { flex-shrink: 0; align-self: flex-end; }
}

.split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .split {
    grid-template-columns: 1fr 0.9fr;
    gap: 4rem;
  }
}
.prose { margin-top: 1.25rem; color: var(--fg-muted); }
.prose p { margin: 0 0 1rem; text-wrap: pretty; }
.bullets {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.75rem;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
}
.bullets li:nth-child(2)::before { background: var(--success); }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}
.axis-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.axis-grid li {
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  background: color-mix(in oklab, var(--bg-subtle) 60%, transparent);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
blockquote {
  margin: 0;
  border-left: 2px solid color-mix(in oklab, var(--accent) 50%, transparent);
  padding-left: 1rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Pipeline */
.pipeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .pipeline { grid-template-columns: repeat(4, 1fr); }
}
.pipeline li {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.pipeline li:hover { border-color: var(--border-strong); }
.pipeline .step {
  font-size: 0.75rem;
  color: var(--fg-subtle);
}
.pipeline h3 {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.pipeline .role {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.pipeline p:last-child {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* Compare */
.compare {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) {
  .compare { grid-template-columns: 1fr 1fr; }
}
.metric {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
}
.metric::after {
  content: "";
  pointer-events: none;
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
}
.metric.host::after {
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-dim) 28%, transparent), transparent 70%);
}
.metric.l3::after {
  background: radial-gradient(circle, color-mix(in oklab, var(--success) 22%, transparent), transparent 70%);
}
.metric .num {
  margin: 1rem 0 0;
  font-size: clamp(3.5rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.metric .num.ok { color: var(--success); }
.metric-title {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
}
.metric p:last-child {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.55;
  position: relative;
}

/* Repos */
.repo-grid {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .repo-grid { grid-template-columns: 1fr 1fr; }
}
.repo-grid li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  padding: 1.25rem;
  transition: border-color 0.2s, background 0.2s;
}
.repo-grid li:hover {
  border-color: var(--border-strong);
  background: color-mix(in oklab, var(--bg-subtle) 40%, var(--bg-elevated));
}
.repo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.tag {
  display: inline-block;
  align-self: flex-start;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.ext {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
}
.ext:hover { color: var(--link); }
.repo {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link);
}
.repo-grid li p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.55;
  flex: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.brand-plain {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in oklab, var(--accent) 35%, transparent);
  color: var(--fg);
}
