:root {
  --paper: #f3f1eb;
  --paper-deep: #e8e5dc;
  --ink: #101419;
  --ink-soft: #3e454c;
  --muted: #747a7e;
  --line: rgba(16, 20, 25, 0.16);
  --line-strong: rgba(16, 20, 25, 0.3);
  --panel: #eae8e2;
  --dark: #0b1018;
  --dark-panel: #111923;
  --acid: #c7f36a;
  --rust: #c85b3e;
  --white: #f8f8f5;
  --max: 1400px;
  --pad: clamp(20px, 4.4vw, 72px);
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image: radial-gradient(rgba(16, 20, 25, 0.11) 0.45px, transparent 0.55px);
  background-size: 4px 4px;
}

::selection {
  color: var(--dark);
  background: var(--acid);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--dark);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: 78px;
  padding: 0 var(--pad);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: height 250ms ease, background-color 250ms ease, border-color 250ms ease;
}

.site-header.is-scrolled {
  height: 66px;
  border-color: var(--line);
  background: rgba(243, 241, 235, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.brand img {
  width: 31px;
  height: 31px;
}

.site-nav {
  display: flex;
  gap: clamp(24px, 3vw, 50px);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 540;
}

.site-nav a,
.header-link,
.footer-links a {
  transition: opacity 180ms ease;
}

.site-nav a:hover,
.header-link:hover,
.footer-links a:hover {
  opacity: 0.56;
}

.header-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
}

.header-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 580;
}

.hero {
  min-height: 100svh;
  padding: clamp(130px, 14vw, 190px) var(--pad) 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  width: min(100%, var(--max));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 6vw, 110px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 27px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 5px rgba(200, 91, 62, 0.12);
}

.hero h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(54px, 6vw, 102px);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero h1 em {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero-lede {
  max-width: 650px;
  margin: 38px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
}

.hero-actions,
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 620;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease,
    border-color 180ms ease;
}

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

.button-dark {
  color: var(--white);
  background: var(--dark);
}

.button-dark:hover {
  background: #202833;
}

.button-quiet {
  min-height: auto;
  padding: 10px 4px;
  border-bottom-color: var(--line-strong);
  border-radius: 0;
}

.button-outline {
  border-color: var(--line-strong);
}

.button-outline:hover {
  border-color: var(--ink);
}

.install-command {
  display: flex;
  width: min(100%, 414px);
  margin-top: 42px;
  padding: 6px 6px 6px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

.install-command code {
  font-family: var(--mono);
  font-size: 12px;
}

.install-command code span {
  color: var(--ink-soft);
}

.copy-button,
.code-copy {
  min-width: 62px;
  padding: 8px 10px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease;
}

.copy-button:hover,
.code-copy:hover {
  color: var(--ink);
  background: rgba(16, 20, 25, 0.05);
}

.journal-demo {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--white);
  background: var(--dark);
  box-shadow: 0 32px 80px rgba(33, 38, 42, 0.2);
}

.journal-demo::before {
  position: absolute;
  z-index: -1;
  inset: -30px;
  content: "";
  border: 1px solid var(--line);
  transform: translate(20px, 20px);
}

.demo-topbar,
.demo-footer {
  display: flex;
  align-items: center;
  border-color: rgba(255, 255, 255, 0.1);
}

.demo-topbar {
  height: 54px;
  padding: 0 18px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.demo-topbar > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(199, 243, 106, 0.1);
}

.demo-time {
  color: var(--acid);
}

.demo-canvas {
  position: relative;
  height: clamp(410px, 39vw, 550px);
  min-height: 410px;
  overflow: hidden;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
}

.demo-canvas::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 48% 42%, transparent 0, rgba(11, 16, 24, 0.08) 40%, rgba(11, 16, 24, 0.62) 100%);
}

.run-node {
  position: absolute;
  z-index: 4;
  display: grid;
  width: min(206px, 40%);
  min-height: 64px;
  padding: 10px 11px;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  background: rgba(17, 25, 35, 0.94);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition: border-color 260ms ease, opacity 260ms ease, transform 260ms ease;
}

.run-node::before {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--acid);
  transform: translate(-50%, -50%);
}

.run-node::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(199, 243, 106, 0.12), transparent);
  transform: translateX(-100%);
}

.run-node.is-pulsing::after {
  animation: nodeScan 680ms ease-out;
}

.run-node.is-live {
  border-color: rgba(200, 91, 62, 0.8);
}

.run-node.is-live::before {
  background: var(--rust);
  animation: livePulse 1.1s ease-in-out infinite;
}

.node-root {
  top: 13%;
  left: 50%;
  transform: translateX(-50%);
}

.node-a {
  top: 42%;
  left: 6%;
}

.node-b {
  top: 42%;
  right: 6%;
}

.node-c {
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
}

.run-node .node-index {
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--mono);
  font-size: 9px;
}

.run-node div {
  min-width: 0;
}

.run-node strong,
.run-node small {
  display: block;
}

.run-node strong {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}

.run-node small {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-state {
  padding: 4px 5px;
  color: var(--acid);
  background: rgba(199, 243, 106, 0.08);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.is-live .node-state {
  color: #f09b85;
  background: rgba(200, 91, 62, 0.1);
}

.scope-line {
  position: absolute;
  z-index: 2;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  transform-origin: left center;
}

.scope-line::after {
  position: absolute;
  top: -2px;
  left: 0;
  width: 35%;
  height: 5px;
  content: "";
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
}

.journal-demo.is-running .scope-line::after {
  animation: lineFlow 820ms ease-in-out forwards;
}

.scope-line-a {
  top: 34%;
  left: 50%;
  width: 35%;
  transform: rotate(150deg);
}

.scope-line-b {
  top: 34%;
  left: 50%;
  width: 35%;
  transform: rotate(30deg);
}

.scope-line-c {
  top: 57%;
  left: 25%;
  width: 50%;
  transform: rotate(30deg);
}

.scope-line-main {
  top: 57%;
  left: 75%;
  width: 50%;
  transform: rotate(150deg);
}

.journal-key {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 12px;
  display: flex;
  max-width: 54%;
  flex-direction: column;
  gap: 2px;
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--mono);
  font-size: 7px;
  text-align: right;
}

.journal-key code {
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

.demo-footer {
  display: grid;
  min-height: 74px;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-metric {
  display: flex;
  min-width: 0;
  min-height: 74px;
  padding: 12px 14px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-metric span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-metric strong {
  margin-top: 4px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
}

.demo-metric-cost strong {
  color: var(--acid);
}

.replay-button {
  display: flex;
  height: 100%;
  padding: 0 18px;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  transition: background 180ms ease;
}

.replay-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.journal-demo.is-running .replay-icon {
  animation: rotateIcon 800ms ease;
}

.hero-statement {
  display: grid;
  width: min(100%, var(--max));
  margin: clamp(90px, 11vw, 150px) auto 0;
  padding: 25px 0;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-statement p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 23px);
  text-align: center;
}

.hero-statement p + p {
  border-left: 1px solid var(--line);
}

.section {
  width: min(100%, calc(var(--max) + (var(--pad) * 2)));
  margin: 0 auto;
  padding: clamp(110px, 13vw, 190px) var(--pad);
}

.section-heading {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
  column-gap: 100px;
}

.section-heading .section-kicker {
  grid-column: 1 / -1;
}

.section-heading h2,
.substrate-heading h2,
.embed-heading h2,
.resume-heading h2,
.closing h2 {
  margin: 0;
  font-size: clamp(47px, 6vw, 88px);
  font-weight: 510;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-heading > p:last-child,
.substrate-heading > p:last-child,
.embed-heading > p,
.resume-caption {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
}

.invariant-grid {
  display: grid;
  margin-top: clamp(70px, 9vw, 130px);
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.feature {
  position: relative;
  min-width: 0;
  min-height: 600px;
  padding: clamp(28px, 3vw, 48px);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  transition: background 250ms ease;
}

.feature:hover {
  background: rgba(255, 255, 255, 0.28);
}

.feature-number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.feature-copy {
  position: absolute;
  right: clamp(28px, 3vw, 48px);
  bottom: clamp(28px, 3vw, 48px);
  left: clamp(28px, 3vw, 48px);
}

.feature-label {
  margin: 0 0 14px;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feature h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 3vw, 46px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.feature-copy > p:not(.feature-label) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.feature-copy a {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 600;
}

.journal-visual,
.budget-gauge,
.routing-visual,
.test-visual {
  position: absolute;
  top: 78px;
  right: clamp(28px, 3vw, 48px);
  left: clamp(28px, 3vw, 48px);
}

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

.journal-row {
  display: grid;
  height: 41px;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.journal-row i {
  height: 4px;
  background: rgba(16, 20, 25, 0.12);
}

.journal-row b {
  font-weight: 500;
}

.journal-row-active {
  color: var(--ink);
}

.journal-row-active i {
  position: relative;
  overflow: hidden;
  background: var(--rust);
}

.journal-row-active i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: sheen 2.7s ease-in-out infinite;
  transform: translateX(-100%);
}

.gauge-head,
.gauge-scale,
.gauge-status {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8px;
}

.gauge-head {
  align-items: baseline;
  color: var(--muted);
}

.gauge-head strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 450;
  letter-spacing: -0.06em;
}

.gauge-track {
  display: block;
  height: 12px;
  margin-top: 21px;
  overflow: hidden;
  background: rgba(16, 20, 25, 0.1);
}

.gauge-track span {
  display: block;
  width: 68.4%;
  height: 100%;
  background: var(--rust);
  transform-origin: left;
  animation: gaugeIn 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.gauge-scale {
  margin-top: 9px;
  color: var(--muted);
}

.gauge-status {
  width: max-content;
  margin-top: 25px;
  padding: 7px 10px;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.gauge-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5d8753;
}

.routing-visual {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  align-items: center;
  gap: 0;
}

.route-source {
  padding: 16px 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.route-line {
  position: relative;
  height: 1px;
  background: var(--line-strong);
}

.route-line::after {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  content: "";
  transform: rotate(45deg);
}

.route-targets {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.route-targets span {
  display: flex;
  height: 31px;
  padding: 0 9px;
  align-items: center;
  gap: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
}

.route-targets i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust);
}

.test-visual {
  border: 1px solid var(--line);
  background: rgba(16, 20, 25, 0.025);
}

.test-line,
.test-summary {
  display: grid;
  min-height: 36px;
  padding: 0 12px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
}

.test-line span {
  color: #51754c;
}

.test-line b {
  color: var(--muted);
  font-weight: 400;
}

.test-summary {
  display: flex;
  border: 0;
  color: var(--muted);
  background: rgba(16, 20, 25, 0.04);
  justify-content: space-between;
}

.substrate {
  position: relative;
  color: var(--white);
  background: var(--dark);
  overflow: hidden;
}

.substrate::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 80%, transparent);
}

.substrate-inner {
  position: relative;
  width: min(100%, calc(var(--max) + (var(--pad) * 2)));
  margin: 0 auto;
  padding: clamp(110px, 13vw, 180px) var(--pad);
}

.section-kicker-dark {
  color: rgba(255, 255, 255, 0.48);
}

.substrate-heading {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
  column-gap: 100px;
}

.substrate-heading .section-kicker {
  grid-column: 1 / -1;
}

.substrate-heading > p:last-child {
  color: rgba(255, 255, 255, 0.55);
}

.mode-composer {
  margin-top: clamp(70px, 8vw, 120px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 18, 26, 0.8);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mode-tabs button {
  min-height: 66px;
  padding: 0 24px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.47);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: color 200ms ease, background 200ms ease;
}

.mode-tabs button:last-child {
  border-right: 0;
}

.mode-tabs button:hover {
  color: var(--white);
}

.mode-tabs button[aria-selected="true"] {
  color: var(--dark);
  background: var(--acid);
}

.mode-tabs button span {
  margin-right: 16px;
  font-family: var(--mono);
  font-size: 9px;
}

.mode-panel {
  display: grid;
  min-height: 430px;
  grid-template-columns: 0.84fr 1.16fr;
}

.mode-description {
  padding: clamp(34px, 4vw, 64px);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.mode-overline {
  margin: 0 0 24px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.mode-description h3 {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.mode-description > p:not(.mode-overline) {
  max-width: 470px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 14px;
  line-height: 1.7;
}

.mode-description > p code {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--mono);
  font-size: 0.92em;
}

.mode-code {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--mono);
  font-size: 10px;
}

.substrate-diagram {
  display: grid;
  padding: clamp(34px, 5vw, 74px);
  grid-template-columns: 0.75fr 0.4fr 1.1fr;
  align-items: center;
}

.mode-source {
  display: flex;
  min-height: 120px;
  padding: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.flow-arrow {
  position: relative;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
}

.flow-arrow span {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--acid);
  border-right: 1px solid var(--acid);
  transform: rotate(45deg);
}

.shared-stack {
  display: grid;
  gap: 8px;
}

.shared-stack div {
  display: grid;
  min-height: 70px;
  padding: 12px 15px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.shared-stack div:first-child {
  border-color: rgba(199, 243, 106, 0.45);
}

.shared-stack span {
  grid-row: 1 / 3;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--mono);
  font-size: 8px;
}

.shared-stack strong,
.shared-stack small {
  display: block;
}

.shared-stack strong {
  font-size: 11px;
  font-weight: 550;
}

.shared-stack small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--mono);
  font-size: 8px;
}

.mode-panel.is-switching .mode-description,
.mode-panel.is-switching .mode-source {
  animation: modeSwitch 330ms ease both;
}

.substrate-foot {
  display: flex;
  padding-top: 22px;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.substrate-foot p {
  margin: 0;
}

.substrate-foot a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.embed {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: clamp(60px, 9vw, 140px);
}

.embed-heading > p {
  margin-top: 31px;
}

.embed-heading ul {
  display: grid;
  margin: 37px 0 0;
  padding: 0;
  gap: 9px;
  list-style: none;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.embed-heading li span {
  margin-right: 8px;
  color: var(--rust);
}

.code-window {
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: #eae8e1;
  box-shadow: 18px 18px 0 rgba(16, 20, 25, 0.07);
}

.code-toolbar {
  display: grid;
  min-height: 48px;
  padding: 0 10px 0 15px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.code-toolbar > div {
  display: flex;
  gap: 6px;
}

.code-toolbar > div span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.code-toolbar p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.code-copy {
  justify-self: end;
  border-left: 0;
}

.code-window pre {
  margin: 0;
  padding: clamp(24px, 3vw, 44px);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: clamp(10px, 1vw, 13px);
  line-height: 1.8;
  tab-size: 2;
}

.tok-keyword {
  color: #9b3f29;
}

.tok-string {
  color: #486d41;
}

.tok-number {
  color: #6b4ea0;
}

.code-status {
  display: flex;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.code-status span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.code-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5d8753;
}

.resume-proof {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-deep);
}

.resume-inner {
  display: grid;
  width: min(100%, calc(var(--max) + (var(--pad) * 2)));
  margin: 0 auto;
  padding: clamp(110px, 12vw, 170px) var(--pad);
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(60px, 8vw, 130px);
}

.terminal {
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  background: var(--dark);
  box-shadow: 18px 18px 0 rgba(16, 20, 25, 0.09);
  font-family: var(--mono);
  font-size: clamp(9px, 0.95vw, 12px);
}

.terminal-topbar {
  display: flex;
  height: 44px;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
  text-transform: uppercase;
}

.terminal-topbar span:last-child {
  color: var(--acid);
}

.terminal-body {
  min-height: 370px;
  padding: clamp(23px, 3vw, 38px);
}

.terminal-body p {
  margin: 0 0 10px;
  white-space: nowrap;
}

.term-prompt {
  color: var(--acid);
}

.term-dim {
  display: inline-block;
  width: 85px;
  color: rgba(255, 255, 255, 0.35);
}

.term-ok,
.term-replay {
  color: var(--acid);
}

.term-money {
  float: right;
  color: rgba(255, 255, 255, 0.42);
}

.terminal-replay-lines p {
  opacity: 0;
  transform: translateY(5px);
}

.terminal.is-visible .terminal-replay-lines p {
  animation: terminalLine 350ms ease forwards;
}

.terminal.is-visible .terminal-replay-lines p:nth-child(1) { animation-delay: 350ms; }
.terminal.is-visible .terminal-replay-lines p:nth-child(2) { animation-delay: 650ms; }
.terminal.is-visible .terminal-replay-lines p:nth-child(3) { animation-delay: 950ms; }
.terminal.is-visible .terminal-replay-lines p:nth-child(4) { animation-delay: 1250ms; }

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--acid);
  animation: cursorBlink 1s steps(2, jump-none) infinite;
}

.resume-caption {
  max-width: 500px;
  margin-top: -70px;
  align-self: end;
  font-size: 14px;
}

.closing {
  display: flex;
  min-height: min(860px, 90svh);
  padding: clamp(100px, 12vw, 180px) var(--pad);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.closing img {
  width: clamp(65px, 6vw, 88px);
  height: clamp(65px, 6vw, 88px);
  margin-bottom: 40px;
}

.closing .section-kicker {
  margin-bottom: 26px;
}

.closing h2 {
  font-size: clamp(51px, 7.5vw, 112px);
}

.closing-actions {
  margin-top: 48px;
}

.site-footer {
  display: grid;
  padding: clamp(50px, 6vw, 90px) var(--pad) 28px;
  grid-template-columns: 0.85fr 1.15fr;
  row-gap: 100px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--dark);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 19px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
}

.footer-brand p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links p {
  margin: 0 0 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links a {
  width: max-content;
  font-size: 12px;
}

.footer-bottom {
  display: flex;
  padding-top: 23px;
  grid-column: 1 / -1;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes nodeScan {
  0% { opacity: 0; transform: translateX(-100%); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes lineFlow {
  0% { left: 0; opacity: 0; }
  25% { opacity: 1; }
  100% { left: 65%; opacity: 0; }
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 91, 62, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(200, 91, 62, 0); }
}

@keyframes rotateIcon {
  to { transform: rotate(360deg); }
}

@keyframes sheen {
  45%, 100% { transform: translateX(120%); }
}

@keyframes gaugeIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes modeSwitch {
  from { opacity: 0.35; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes terminalLine {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

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

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

  .journal-demo {
    width: min(100%, 720px);
    margin-left: auto;
  }

  .section-heading,
  .substrate-heading {
    grid-template-columns: 1fr;
  }

  .section-heading > p:last-child,
  .substrate-heading > p:last-child {
    margin-top: 31px;
  }

  .feature {
    min-height: 570px;
  }

  .mode-panel {
    grid-template-columns: 1fr;
  }

  .mode-description {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .embed {
    grid-template-columns: 1fr;
  }

  .embed-heading {
    max-width: 740px;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 66px;
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding-top: 115px;
  }

  .hero-grid {
    gap: 72px;
  }

  .hero h1 {
    font-size: clamp(50px, 14vw, 74px);
  }

  .hero-lede {
    margin-top: 28px;
  }

  .journal-demo::before {
    display: none;
  }

  .demo-canvas {
    height: 430px;
  }

  .run-node {
    width: 43%;
    grid-template-columns: 23px 1fr;
  }

  .run-node .node-state {
    position: absolute;
    right: 6px;
    bottom: 5px;
  }

  .demo-footer {
    grid-template-columns: repeat(3, 1fr);
  }

  .replay-button {
    height: 48px;
    grid-column: 1 / -1;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-statement {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .hero-statement p {
    padding: 18px 0;
  }

  .hero-statement p + p {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section-heading h2,
  .substrate-heading h2,
  .embed-heading h2,
  .resume-heading h2 {
    font-size: clamp(43px, 13vw, 65px);
  }

  .invariant-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    min-height: 580px;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }

  .mode-tabs button {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .mode-tabs button:last-child {
    border-bottom: 0;
  }

  .substrate-diagram {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .flow-arrow {
    width: 1px;
    height: 35px;
    margin: 0 auto;
  }

  .flow-arrow span {
    top: auto;
    right: -3px;
    bottom: -1px;
    transform: rotate(135deg);
  }

  .substrate-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .resume-inner {
    grid-template-columns: 1fr;
  }

  .resume-caption {
    margin-top: 0;
  }

  .terminal-body {
    min-height: 350px;
    overflow-x: auto;
  }

  .closing {
    min-height: 720px;
  }

  .closing h2 {
    font-size: clamp(48px, 14vw, 72px);
  }

  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 70px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    row-gap: 42px;
  }

  .footer-links > div:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    gap: 18px;
    grid-column: auto;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .brand span {
    display: none;
  }

  .hero-actions .button-dark,
  .closing-actions .button {
    width: 100%;
  }

  .install-command code {
    font-size: 10px;
  }

  .run-node {
    width: 46%;
    min-height: 60px;
  }

  .node-a {
    left: 3%;
  }

  .node-b {
    right: 3%;
  }

  .routing-visual {
    grid-template-columns: 86px 1fr 103px;
  }

  .route-source,
  .route-targets span {
    font-size: 7px;
  }

  .code-window pre {
    font-size: 9px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-links > div:last-child {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal],
  .terminal-replay-lines p {
    opacity: 1;
    transform: none;
  }
}
