:root {
  --bg: #f7f8fb;
  --bg-alt: #eef6f3;
  --surface: #ffffff;
  --surface-strong: #f2f5f7;
  --text: #15181d;
  --muted: #5a6472;
  --border: #d9e0e6;
  --primary: #147b70;
  --primary-strong: #0e5f57;
  --accent: #f9735b;
  --accent-soft: #fff0eb;
  --violet: #6c5ce7;
  --code-bg: #11151b;
  --code-text: #e8f2ee;
  --shadow: 0 24px 70px rgba(21, 24, 29, 0.11);
}

:root[data-theme='dark'] {
  --bg: #101115;
  --bg-alt: #161b1d;
  --surface: #181b20;
  --surface-strong: #20252b;
  --text: #f4f6f8;
  --muted: #a9b3bd;
  --border: #333a43;
  --primary: #62e0bf;
  --primary-strong: #2fb8a0;
  --accent: #ff8a70;
  --accent-soft: #301e1b;
  --violet: #9c8cff;
  --code-bg: #0b0d10;
  --code-text: #eaf8f2;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.status-band,
.terminal header {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-nav {
  justify-content: center;
  gap: clamp(0.7rem, 2vw, 1.4rem);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: none;
}

.theme-glyph {
  position: relative;
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  margin: auto;
  border-radius: 999px;
  background: var(--accent);
}

:root[data-theme='dark'] .theme-glyph {
  background: transparent;
  box-shadow: inset -0.32rem -0.18rem 0 0 var(--primary);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 4.4rem));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(4rem, 11vw, 8rem) clamp(1rem, 5vw, 4rem);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.hero-canvas,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg-alt) 96%, transparent) 0%, color-mix(in srgb, var(--bg-alt) 76%, transparent) 46%, color-mix(in srgb, var(--bg-alt) 20%, transparent) 100%),
    linear-gradient(180deg, transparent 74%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 8vw, 6.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.18;
}

.hero-text,
.section-copy p,
.card p,
.roadmap-item p,
.status-band span {
  color: var(--muted);
}

.hero-text {
  max-width: 46rem;
  margin-bottom: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--bg);
}

.button:hover,
.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.status-band {
  width: min(1180px, calc(100% - 2rem));
  margin: -2.5rem auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-band article {
  padding: 1.2rem;
  border-right: 1px solid var(--border);
}

.status-band article:last-child {
  border-right: 0;
}

.status-band strong,
.status-band span {
  display: block;
}

.status-band strong {
  margin-bottom: 0.15rem;
  font-size: 1.3rem;
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
}

.section-copy {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.feature-grid,
.command-grid,
.roadmap-grid,
.docs-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.roadmap-item,
.terminal,
.architecture-flow {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.25rem;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-index,
.doc-card span,
.roadmap-item span {
  display: inline-flex;
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: center;
}

.architecture-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  overflow: hidden;
}

.flow-column {
  display: grid;
  gap: 0.75rem;
}

.flow-column span {
  display: grid;
  min-height: 3rem;
  place-items: center;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-strong);
  font-weight: 800;
  text-align: center;
}

.flow-column.highlighted span {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.flow-arrow {
  align-self: center;
  width: 2.25rem;
  height: 0.12rem;
  background: var(--accent);
}

.command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal {
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
}

.terminal header {
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: color-mix(in srgb, var(--code-text) 78%, transparent);
  font-size: 0.83rem;
  font-weight: 850;
}

pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.roadmap-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-item {
  padding: 1.25rem;
}

.roadmap-item.done {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

.docs-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contribute-section {
  padding-bottom: 5rem;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .site-nav {
    display: none;
  }

  .status-band,
  .feature-grid,
  .split-section,
  .command-grid,
  .roadmap-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .status-band article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .status-band article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 680px;
    padding: 4.5rem 1rem 5.5rem;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 94%, transparent) 0%, color-mix(in srgb, var(--bg-alt) 78%, transparent) 58%, var(--bg) 100%);
  }

  h1 {
    max-width: 10ch;
  }

  .button {
    width: 100%;
  }

  .architecture-flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    width: 0.12rem;
    height: 1.6rem;
    justify-self: center;
  }
}


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

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}

.capability-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.capability-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) 1fr;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.capability-row:last-child {
  border-bottom: 0;
}

.capability-row strong {
  color: var(--primary);
}

.capability-row span {
  color: var(--muted);
}

.architecture-v2 {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.arch-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.arch-line.secondary {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.arch-node {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-strong);
  font-weight: 800;
}

.accent-node {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.arch-arrow {
  color: var(--accent);
  font-weight: 900;
}

.code-example {
  max-width: 860px;
}

.roadmap-item a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.roadmap-item a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 1rem;
    display: none;
    min-width: 220px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: grid;
    gap: 0.4rem;
  }

  .site-nav a {
    padding: 0.65rem 0.75rem;
    border-radius: 0.55rem;
  }

  .site-nav a:hover {
    background: var(--surface-strong);
  }
}

@media (max-width: 720px) {
  .capability-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .arch-line {
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
