:root {
  color-scheme: dark;
  --bg: #070707;
  --paper: #f3efe2;
  --text: #f7f3e8;
  --muted: #a9a396;
  --dim: #68645c;
  --line: rgba(243, 239, 226, 0.18);
  --line-strong: rgba(243, 239, 226, 0.36);
  --green: #65f0a1;
  --amber: #ffcf5a;
  --red: #ff6f61;
  --blue: #92c7ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

#logic-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: #070707;
  opacity: 0.42;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.96), rgba(7, 7, 7, 0.7) 58%, rgba(7, 7, 7, 0.9)),
    linear-gradient(180deg, rgba(7, 7, 7, 0.1), rgba(7, 7, 7, 0.97) 78%),
    repeating-linear-gradient(90deg, rgba(243, 239, 226, 0.035) 0 1px, transparent 1px 96px);
}

.announcement {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  align-items: center;
  padding: 7px 18px;
  border-bottom: 1px solid rgba(101, 240, 161, 0.28);
  background: #10140f;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.announcement span {
  color: var(--paper);
}

.announcement a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(243, 239, 226, 0.08);
  background: rgba(7, 7, 7, 0.74);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #14ded2;
  font-weight: 800;
}

.brand-wordmark {
  width: 177px;
  height: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(13px, 2.3vw, 28px);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

nav a {
  transition: color 160ms ease;
}

nav a:hover {
  color: var(--paper);
}

.hero {
  min-height: 74vh;
  padding: clamp(54px, 7vw, 96px) clamp(18px, 5vw, 72px) clamp(42px, 6vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.76fr);
  gap: clamp(32px, 5vw, 78px);
  max-width: 1560px;
  margin: 0 auto;
  align-items: center;
}

.hero-copy {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  color: var(--paper);
  font-size: clamp(72px, 12vw, 176px);
  line-height: 0.84;
  letter-spacing: 0;
  text-transform: uppercase;
}

.display-line {
  max-width: 820px;
  margin-bottom: 16px;
  color: var(--paper);
  font-size: clamp(34px, 5.2vw, 78px);
  font-weight: 850;
  line-height: 0.98;
  text-transform: uppercase;
}

.slogan {
  margin-bottom: 20px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 800;
}

.lede,
.section-copy {
  max-width: 720px;
  color: #d8d1c0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.32;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.badge-row a {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
}

.badge-row img {
  display: block;
  max-width: 100%;
  height: 20px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button.secondary {
  background: rgba(243, 239, 226, 0.04);
}

.hero-visual {
  position: relative;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-visual::before {
  inset: -22px;
  border: 1px solid rgba(20, 222, 210, 0.16);
  background:
    linear-gradient(90deg, transparent, rgba(20, 222, 210, 0.08), transparent),
    repeating-linear-gradient(0deg, rgba(243, 239, 226, 0.04) 0 1px, transparent 1px 18px);
  animation: panelSweep 5.8s linear infinite;
}

.hero-visual::after {
  inset: 18px -12px -18px 12px;
  border: 1px solid rgba(101, 240, 161, 0.14);
}

.engine-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(243, 239, 226, 0.28);
  background:
    linear-gradient(180deg, rgba(20, 222, 210, 0.09), transparent 34%),
    rgba(7, 7, 7, 0.86);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.46);
}

.engine-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(101, 240, 161, 0.08), transparent);
  transform: translateY(-100%);
  animation: scan 4.5s ease-in-out infinite;
}

.engine-topline,
.task-feed,
.budget-panel,
.check-stack {
  position: relative;
  z-index: 1;
}

.engine-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.engine-topline strong {
  margin-left: auto;
  color: var(--green);
  font-size: 11px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #14ded2;
  box-shadow: 0 0 18px rgba(20, 222, 210, 0.82);
  animation: livePulse 1.8s ease-in-out infinite;
}

.task-feed {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.task-feed span,
.engine-panel span,
.budget-panel span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-feed strong {
  display: block;
  color: var(--paper);
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.05;
}

.task-feed strong::after {
  content: "";
  display: inline-block;
  width: 0.48em;
  height: 0.08em;
  margin-left: 8px;
  background: var(--green);
  vertical-align: baseline;
  animation: cursorBlink 1.1s steps(2, end) infinite;
}

.tier-router {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 24px 18px;
  border-bottom: 1px solid var(--line);
}

.router-line {
  position: absolute;
  left: 38px;
  right: 38px;
  top: 50%;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(20, 222, 210, 0.12), rgba(101, 240, 161, 0.72), rgba(255, 207, 90, 0.3));
}

.router-line::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 68px;
  height: 5px;
  background: var(--green);
  filter: blur(3px);
  animation: routePulse 3.2s ease-in-out infinite;
}

.tier-router button {
  position: relative;
  z-index: 1;
  display: inline-grid;
  min-width: 0;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(243, 239, 226, 0.18);
  background: rgba(7, 7, 7, 0.88);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.tier-router button.active {
  border-color: rgba(20, 222, 210, 0.9);
  background: rgba(20, 222, 210, 0.13);
  color: var(--paper);
  box-shadow: 0 0 34px rgba(20, 222, 210, 0.18);
}

.engine-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.engine-panel {
  min-height: 146px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(243, 239, 226, 0.025);
}

.engine-panel:last-child {
  border-right: 0;
}

.primary-panel {
  background: rgba(20, 222, 210, 0.06);
}

.engine-panel strong,
.budget-panel strong {
  display: block;
  color: var(--paper);
  font-size: 22px;
  line-height: 1.12;
}

.engine-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.budget-panel {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.budget-panel b {
  font-weight: 850;
}

.budget-bars {
  display: grid;
  gap: 10px;
}

.bar {
  height: 12px;
  border: 1px solid rgba(243, 239, 226, 0.18);
  background: rgba(243, 239, 226, 0.035);
}

.bar i {
  display: block;
  height: 100%;
  transform-origin: left center;
}

.bar.before i {
  width: var(--before-width, 82%);
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.bar.after i {
  width: var(--after-width, 28%);
  background: linear-gradient(90deg, #14ded2, var(--green));
  animation: budgetGlow 2.6s ease-in-out infinite;
}

.check-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
}

.check-stack span {
  padding: 7px 9px;
  border: 1px solid rgba(243, 239, 226, 0.16);
  background: rgba(243, 239, 226, 0.04);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

.check-stack span.active {
  border-color: rgba(101, 240, 161, 0.55);
  color: var(--paper);
  background: rgba(101, 240, 161, 0.1);
}

.console {
  border: 1px solid var(--line-strong);
  background: rgba(7, 7, 7, 0.84);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
}

.console-title {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

.console-bar {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.console-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--dim);
}

.console-bar span:nth-child(1) {
  background: var(--red);
}

.console-bar span:nth-child(2) {
  background: var(--amber);
}

.console-bar span:nth-child(3) {
  background: var(--green);
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
}

code {
  color: #eee6d4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.quickstart {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1.05fr);
  gap: 1px;
  margin: 0;
  padding: 0 clamp(18px, 5vw, 72px) 44px;
  border-bottom: 1px solid var(--line);
}

.quickstart > .console {
  align-self: stretch;
  box-shadow: none;
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
}

.install-grid article {
  min-height: 0;
  padding: 22px;
  border: 0;
  background: rgba(7, 7, 7, 0.86);
}

.install-grid article span {
  margin-bottom: 12px;
}

.install-grid h3 {
  margin-bottom: 14px;
}

.install-grid pre {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(243, 239, 226, 0.035);
}

.runner-grid pre {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(243, 239, 226, 0.035);
}

.link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
}

.link-grid h3 a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.link-list a {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.docs-list {
  max-width: 1040px;
}

.section {
  margin: 0;
  padding: clamp(34px, 5vw, 62px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.76);
  backdrop-filter: blur(18px);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.84);
}

.proof-strip div {
  min-height: 112px;
  padding: 22px clamp(18px, 3vw, 34px);
  border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
  border-right: 0;
}

.proof-strip span,
.ladder span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.proof-strip strong {
  display: block;
  max-width: 280px;
  color: var(--paper);
  font-size: 18px;
  line-height: 1.16;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 34px;
}

h2 {
  margin-bottom: 0;
  max-width: 980px;
  color: var(--paper);
  font-size: clamp(31px, 4.6vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  color: var(--paper);
  font-size: 20px;
  letter-spacing: 0;
}

.philosophy {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.philosophy .section-copy {
  grid-column: 1 / -1;
  max-width: 980px;
  margin-bottom: 0;
}

.principles {
  border-top: 1px solid var(--line);
}

.principles p {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 760;
  line-height: 1.13;
}

.metric-grid,
.checks-grid,
.ladder {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

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

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

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

.ladder div {
  min-height: 210px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ladder div.active {
  border-color: rgba(20, 222, 210, 0.48);
  background:
    linear-gradient(180deg, rgba(20, 222, 210, 0.08), rgba(20, 222, 210, 0.018)),
    rgba(7, 7, 7, 0.84);
  box-shadow: inset 0 0 0 1px rgba(20, 222, 210, 0.16);
}

.ladder strong {
  display: block;
  margin-bottom: 18px;
  color: var(--paper);
  font-size: 22px;
  line-height: 1.05;
}

.ladder p {
  margin: 0;
  color: var(--muted);
}

article {
  min-height: 218px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

article span {
  display: block;
  margin-bottom: 42px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

article p,
.stack-list strong {
  color: var(--muted);
  font-weight: 520;
}

.metric-grid article,
.checks-grid article,
.ladder div,
.install-grid article,
.proof-strip div {
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.metric-grid article:hover,
.checks-grid article:hover,
.ladder div:hover,
.install-grid article:hover,
.proof-strip div:hover {
  border-color: rgba(20, 222, 210, 0.35);
  background: rgba(20, 222, 210, 0.045);
  transform: translateY(-2px);
}

.split,
.install {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.78fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}

.stack-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.stack-list div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.stack-list span {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.install-console {
  width: 100%;
}

.page {
  padding-top: 56px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px) 42px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

footer a {
  color: var(--paper);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

@keyframes livePulse {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.76;
  }

  50% {
    transform: scale(1.16);
    opacity: 1;
  }
}

@keyframes cursorBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

@keyframes routePulse {
  0% {
    left: 0;
    opacity: 0;
  }

  18%,
  72% {
    opacity: 0.9;
  }

  100% {
    left: calc(100% - 68px);
    opacity: 0;
  }
}

@keyframes scan {
  0%,
  42% {
    transform: translateY(-100%);
    opacity: 0;
  }

  52% {
    opacity: 0.7;
  }

  72%,
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes panelSweep {
  0% {
    background-position: -260px 0, 0 0;
  }

  100% {
    background-position: 260px 0, 0 180px;
  }
}

@keyframes budgetGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(101, 240, 161, 0);
  }

  50% {
    box-shadow: 0 0 22px rgba(101, 240, 161, 0.42);
  }
}

@media (max-width: 1060px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 980px;
  }

  .split,
  .install,
  .philosophy,
  .quickstart {
    grid-template-columns: 1fr;
  }

  .console {
    max-width: none;
  }

  .proof-strip,
  .ladder,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  h1 {
    font-size: clamp(58px, 18vw, 104px);
  }

  .metric-grid,
  .checks-grid,
  .link-grid,
  .proof-strip,
  .ladder {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 28px;
  }

  .quickstart {
    padding: 0 18px 28px;
  }

  .engine-grid,
  .budget-panel {
    grid-template-columns: 1fr;
  }

  .engine-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .engine-panel:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .announcement {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-header {
    align-items: flex-start;
  }

  .brand-wordmark {
    width: 132px;
  }

  nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
  }

  .display-line {
    font-size: clamp(30px, 11vw, 54px);
  }

  .lede,
  .section-copy {
    font-size: 18px;
  }

  .actions,
  footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .tier-router {
    gap: 7px;
    padding: 20px 14px;
  }

  .tier-router button {
    min-height: 36px;
    font-size: 11px;
  }

  .task-feed,
  .budget-panel,
  .check-stack,
  .engine-panel {
    padding: 14px;
  }

  .console {
    width: 100%;
  }

  pre {
    white-space: pre-wrap;
    word-break: break-word;
  }

  code {
    font-size: 12px;
  }

  .stack-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .link-list a {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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