:root {
  color-scheme: dark;
  --bg: #07080c;
  --panel: rgba(16, 20, 28, 0.76);
  --panel-solid: #111720;
  --line: rgba(214, 199, 150, 0.18);
  --line-strong: rgba(214, 199, 150, 0.36);
  --text: #ece8dc;
  --muted: #aaa492;
  --soft: #777264;
  --gold: #d4b66f;
  --cyan: #63d6c6;
  --red: #d2635c;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(99, 214, 198, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(99, 214, 198, 0.025) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 14% 18%, rgba(212, 182, 111, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(99, 214, 198, 0.24) 0 1px, transparent 2px),
    linear-gradient(180deg, #07080c 0%, #0a0d12 48%, #06070a 100%);
  background-size: 64px 64px, 64px 64px, 360px 280px, 520px 390px, auto;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.8px),
    radial-gradient(circle at 52% 74%, rgba(212, 182, 111, 0.34) 0 1px, transparent 1.8px),
    radial-gradient(circle at 78% 34%, rgba(99, 214, 198, 0.28) 0 1px, transparent 1.8px);
  background-size: 360px 300px, 520px 390px, 430px 360px;
  opacity: 0.48;
  animation: fieldTwinkle 7s steps(2, end) infinite;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.2rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(214, 199, 150, 0.12);
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(99, 214, 198, 0.5);
}

.surface-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.surface-nav__brand {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.surface-nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.surface-nav a {
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  text-transform: uppercase;
}

.surface-nav a:hover,
.surface-nav a:focus-visible,
.surface-nav a.is-active {
  border-color: var(--line);
  background: rgba(212, 182, 111, 0.06);
  color: var(--text);
  outline: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 710px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 2.5rem;
  align-items: center;
  border: 1px solid rgba(214, 199, 150, 0.16);
  background: rgba(10, 13, 18, 0.72);
  padding: 3rem;
}

.hero__bg,
.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__bg {
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  opacity: 0.18;
  filter: saturate(0.7) contrast(1.08);
}

.hero__overlay {
  background:
    linear-gradient(rgba(212, 182, 111, 0.06) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(212, 182, 111, 0.045) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(8, 9, 13, 0.94), rgba(8, 9, 13, 0.7) 55%, rgba(8, 9, 13, 0.9));
}

.hero__content,
.architecture-visual {
  position: relative;
  z-index: 1;
}

.hero__kicker,
.section__kicker,
.stack-card__id,
.mini-card__label {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1;
}

h1 {
  margin: 0 0 1rem;
  font-size: 5rem;
}

h2 {
  margin-bottom: 0;
  font-size: 2.6rem;
}

.hero__subtitle {
  margin: 0 0 1.1rem;
  color: rgba(236, 232, 220, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
}

.hero__lede,
.lede-block,
.section__note,
.stack-card p,
.callout p,
.mini-card p,
.foot__note {
  color: var(--muted);
}

.hero__lede {
  max-width: 620px;
  font-size: 1rem;
}

.cta,
.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  border: 1px solid rgba(214, 199, 150, 0.22);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
}

.btn.primary {
  background: rgba(212, 182, 111, 0.12);
  border-color: var(--line-strong);
  color: var(--gold);
}

.btn:hover,
.btn:focus-visible,
.inline-links a:hover,
.inline-links a:focus-visible,
.foot a:hover,
.foot a:focus-visible,
.stack-card__route a:hover,
.stack-card__route a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: none;
}

.architecture-visual {
  margin: 0;
  border: 1px solid rgba(214, 199, 150, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%),
    rgba(12, 16, 23, 0.72);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.architecture-visual::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(99, 214, 198, 0.08);
  pointer-events: none;
}

.architecture-visual figcaption {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  color: var(--soft);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.architecture-visual svg {
  display: block;
  width: 100%;
  min-height: 520px;
}

.visual-frame {
  fill: rgba(8, 9, 13, 0.35);
  stroke: rgba(214, 199, 150, 0.22);
}

.visual-grid {
  fill: none;
  stroke: rgba(214, 199, 150, 0.075);
  stroke-width: 1;
}

.system-glow {
  fill: url(#coreGlow);
  animation: corePulse 5s ease-in-out infinite;
  transform-origin: 380px 330px;
}

.control-orbit {
  fill: none;
  stroke: url(#stackLine);
  stroke-linecap: round;
  stroke-dasharray: 12 16;
  opacity: 0.48;
  animation: orbitFlow 8s linear infinite;
}

.control-orbit--inner {
  animation-direction: reverse;
  animation-duration: 6.6s;
  opacity: 0.36;
}

.stack-node rect {
  fill: rgba(9, 13, 18, 0.86);
  stroke: rgba(214, 199, 150, 0.3);
  stroke-width: 1.4;
}

.stack-node--chimera rect {
  stroke: rgba(210, 99, 92, 0.7);
}

.stack-node--meta rect {
  stroke: rgba(99, 214, 198, 0.54);
}

.stack-node--memory rect {
  stroke: rgba(168, 177, 255, 0.58);
}

.stack-node--agent rect {
  stroke: rgba(214, 199, 150, 0.48);
}

.node-status {
  stroke: rgba(9, 13, 18, 0.92);
  stroke-width: 1.5;
}

.node-status--operational {
  fill: var(--cyan);
}

.node-status--development {
  fill: var(--gold);
}

.stack-node text,
.visual-caption {
  fill: rgba(236, 232, 220, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-anchor: middle;
}

.stack-node text + text {
  fill: rgba(170, 164, 146, 0.78);
  font-size: 11px;
}

.stack-flow,
.feedback-flow {
  fill: none;
  stroke: url(#stackLine);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  animation: orbitFlow 5s linear infinite;
}

.feedback-flow {
  opacity: 0.42;
  animation-duration: 7s;
}

.feedback-flow--right {
  animation-direction: reverse;
}

.visual-caption {
  fill: rgba(170, 164, 146, 0.74);
  text-anchor: start;
}

.section {
  padding: 5rem 0 0;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.lede-block {
  max-width: 860px;
  border-left: 3px solid var(--cyan);
  background: rgba(13, 16, 22, 0.6);
  padding: 1.15rem 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.65;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(214, 199, 150, 0.16);
  border-left: 1px solid rgba(214, 199, 150, 0.16);
}

.stack-card,
.callout,
.mini-card {
  border-right: 1px solid rgba(214, 199, 150, 0.16);
  border-bottom: 1px solid rgba(214, 199, 150, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    rgba(13, 16, 22, 0.58);
  padding: 1.25rem;
}

.stack-card {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, background 180ms ease;
}

.stack-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 2.4rem;
}

.stack-card:hover {
  background: rgba(18, 24, 33, 0.82);
  transform: translateY(-2px);
}

.stack-card h3,
.callout h2,
.mini-card h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.18;
}

.stack-card p {
  margin-bottom: 1rem;
}

.stack-card__function {
  color: rgba(236, 232, 220, 0.88);
  font-weight: 700;
}

.negative-space {
  border-top: 1px solid rgba(214, 199, 150, 0.12);
  padding-top: 0.9rem;
}

.negative-space::before {
  content: "Does not do: ";
  color: var(--gold);
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  border: 1px solid rgba(214, 199, 150, 0.18);
  border-radius: 999px;
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge--operational {
  border-color: rgba(99, 214, 198, 0.34);
  color: var(--cyan);
}

.status-badge--development {
  border-color: rgba(212, 182, 111, 0.36);
  color: var(--gold);
}

.stack-card__route {
  margin-top: auto;
  font-size: 0.86rem;
}

.stack-card__route a,
.inline-links a,
.foot a {
  color: var(--cyan);
  text-decoration: none;
}

.split,
.mini-stack,
.reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

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

.callout,
.mini-card,
.reading-card,
.lineage {
  border: 1px solid rgba(214, 199, 150, 0.16);
}

.reading-card,
.lineage {
  background:
    linear-gradient(180deg, rgba(99, 214, 198, 0.04), transparent 44%),
    rgba(13, 16, 22, 0.62);
  padding: 1.4rem;
}

.reading-card h3,
.lineage h2 {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.15;
}

.reading-card p,
.lineage p {
  color: var(--muted);
}

.lineage {
  max-width: 920px;
  border-left: 3px solid rgba(212, 182, 111, 0.66);
}

.inline-links {
  margin-top: 1rem;
}

.inline-links a {
  display: inline-flex;
  border-bottom: 1px solid rgba(99, 214, 198, 0.28);
  font-size: 0.86rem;
}

.foot {
  margin-top: 5rem;
  border-top: 1px solid rgba(214, 199, 150, 0.16);
  padding: 1.6rem 0 0;
}

.foot__links {
  color: var(--muted);
  font-size: 0.84rem;
}

.foot__links span,
.foot__note {
  color: var(--soft);
}

.foot__note {
  margin: 0.8rem 0 0;
}

@keyframes orbitFlow {
  to {
    stroke-dashoffset: -56;
  }
}

@keyframes corePulse {
  50% {
    opacity: 0.58;
    transform: scale(1.05);
  }
}

@keyframes fieldTwinkle {
  50% {
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  h1 {
    font-size: 3.8rem;
  }

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

  .stack-card {
    min-height: 360px;
  }
}

@media (max-width: 700px) {
  .surface-nav,
  .section__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .surface-nav__links {
    justify-content: flex-start;
  }

  .hero {
    padding: 1.35rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .architecture-visual svg {
    min-height: 400px;
  }

  .stack-grid,
  .mini-stack,
  .split,
  .reading-grid {
    grid-template-columns: 1fr;
  }
}
