:root {
  color-scheme: dark;
  --ink: #090a0d;
  --ink-raised: #111217;
  --ink-soft: #17191f;
  --paper: #f2efe6;
  --muted: #9c9c96;
  --quiet: #686a69;
  --line: rgba(242, 239, 230, 0.13);
  --line-strong: rgba(242, 239, 230, 0.24);
  --acid: #d4ff63;
  --violet: #8c7cff;
  --coral: #ff7e67;
  --cyan: #68dce9;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "SF Pro Display", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
  --page: min(1240px, calc(100vw - 48px));
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--ink);
  background-size: 42px 42px;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 73% 10%, rgba(140, 124, 255, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(9, 10, 13, 0) 0%, var(--ink) 62%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

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

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--acid);
  color: #11140c;
  font-weight: 700;
  text-decoration: none;
}

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

.site-header,
main,
.site-footer {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.brand img,
.site-footer img {
  border-radius: 9px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.brand-suffix {
  color: var(--quiet);
  font-weight: 500;
}

.release-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 10px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.release-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(212, 255, 99, 0.08), 0 0 18px rgba(212, 255, 99, 0.44);
}

.release-separator {
  color: #3f4143;
}

.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: 64px;
  padding: 74px 0 88px;
  border-bottom: 1px solid var(--line);
}

.kicker,
.section-index {
  margin: 0;
  color: var(--quiet);
  font: 11px/1.3 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.kicker span {
  margin-right: 10px;
  color: var(--acid);
}

.hero h1 {
  max-width: 620px;
  margin: 30px 0 26px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(64px, 7.2vw, 110px);
  font-weight: 500;
  letter-spacing: -0.068em;
  line-height: 0.83;
}

.hero h1 span {
  color: var(--acid);
  font-style: italic;
}

.hero-intro {
  max-width: 570px;
  margin: 0;
  color: #adaea8;
  font-size: 16px;
  line-height: 1.86;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 38px;
}

.primary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--acid);
  border-radius: 4px;
  background: var(--acid);
  color: #10120d;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(212, 255, 99, 0.14);
  background: #ddff83;
}

.text-action {
  color: #c5c4bd;
  font-size: 12px;
  text-decoration-color: #51534f;
  text-underline-offset: 6px;
}

.text-action span {
  color: var(--acid);
}

.canvas-stage {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background:
    radial-gradient(circle, rgba(242, 239, 230, 0.13) 1px, transparent 1.5px),
    #0d0f13;
  background-size: 24px 24px;
  box-shadow: 28px 32px 0 rgba(140, 124, 255, 0.08), 0 40px 100px rgba(0, 0, 0, 0.34);
}

.canvas-stage::before {
  position: absolute;
  inset: 42px 0 0;
  background: linear-gradient(130deg, transparent 46%, rgba(212, 255, 99, 0.025));
  content: "";
  pointer-events: none;
}

.stage-meta {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.9);
  color: #707372;
  font: 9px/1 var(--mono);
  letter-spacing: 0.08em;
}

.stage-live {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94978f;
}

.stage-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
}

.stage-connections {
  position: absolute;
  z-index: 1;
  inset: 40px 0 0;
  width: 100%;
  height: calc(100% - 40px);
  fill: none;
  stroke: rgba(212, 255, 99, 0.55);
  stroke-dasharray: 5 6;
  stroke-width: 1.5;
}

.stage-connections circle {
  fill: var(--acid);
  stroke: #171b12;
  stroke-width: 5;
}

.stage-node {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(242, 239, 230, 0.18);
  border-radius: 3px;
  background: rgba(20, 22, 27, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.stage-node-prompt {
  top: 112px;
  left: 42px;
  width: 218px;
  padding: 14px;
}

.stage-node-render {
  top: 235px;
  left: 47%;
  width: 234px;
  padding: 12px;
  transform: translateX(-30%);
  border-color: rgba(212, 255, 99, 0.4);
}

.stage-node-library {
  right: 30px;
  bottom: 44px;
  width: 188px;
  padding: 13px;
}

.node-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e7e6df;
  font-size: 11px;
  font-weight: 700;
}

.node-type {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.type-prompt { background: var(--violet); }
.type-render { background: var(--acid); }
.type-library { background: var(--coral); }

.stage-node-prompt p {
  margin: 22px 0 26px;
  color: #a7a9a5;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.62;
}

.node-tag {
  color: #626563;
  font: 8px/1 var(--mono);
  letter-spacing: 0.07em;
}

.render-frame {
  position: relative;
  height: 137px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #171922;
}

.render-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(104, 220, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 220, 233, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  transform: perspective(220px) rotateX(58deg) scale(1.6) translateY(23px);
  transform-origin: bottom;
}

.render-orb {
  position: absolute;
  z-index: 1;
  top: 23px;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 20px 40px rgba(140, 124, 255, 0.38), inset -16px -13px 28px rgba(14, 16, 25, 0.65);
}

.node-progress {
  height: 2px;
  margin: 13px 0 9px;
  background: #292b30;
}

.node-progress span {
  display: block;
  width: 76%;
  height: 100%;
  background: var(--acid);
}

.asset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 18px 0 22px;
}

.asset-row span {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #252630;
}

.asset-row span:nth-child(1) { background: var(--coral); }
.asset-row span:nth-child(2) { background: #282c37; }
.asset-row span:nth-child(3) { background: var(--cyan); }

.stage-cursor {
  position: absolute;
  z-index: 5;
  top: 204px;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 10px solid var(--acid);
  border-right: 7px solid transparent;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
  transform: rotate(-18deg);
  animation: cursor-drift 4s ease-in-out infinite;
}

.stage-cursor span {
  position: absolute;
  top: 7px;
  left: 4px;
  padding: 4px 6px;
  border-radius: 2px;
  background: var(--acid);
  color: #11140c;
  font: 8px/1 var(--mono);
}

.stage-zoom {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5e615f;
  font: 8px/1 var(--mono);
}

.stage-zoom span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid var(--line);
  color: #898b86;
}

@keyframes cursor-drift {
  0%, 100% { transform: translate(0, 0) rotate(-18deg); }
  50% { transform: translate(18px, 10px) rotate(-12deg); }
}

.install-section,
.principles,
.inside,
.faq {
  padding: 112px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 48px;
}

.section-heading.compact {
  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 20px 0 14px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: -0.048em;
  line-height: 1;
}

.section-heading > p:last-child {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.terminal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #0d0f12;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.28);
}

.terminal-header {
  height: 45px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: #6f7270;
  font: 9px/1 var(--mono);
  letter-spacing: 0.05em;
}

.traffic-lights {
  display: flex;
  gap: 6px;
}

.traffic-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #36383a;
}

.verified-label {
  justify-self: end;
  color: #879b59;
}

.command-line {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
}

.command-line code {
  flex: 1;
  overflow-x: auto;
  color: #e6e6df;
  font: 14px/1.8 var(--mono);
  white-space: nowrap;
}

.command-line code span {
  margin-right: 12px;
  color: var(--acid);
}

.command-line button {
  min-width: 66px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #191b1f;
  color: #c4c4be;
  cursor: pointer;
  font: 10px/1 var(--mono);
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.command-line button:hover {
  transform: translateY(-1px);
  border-color: var(--acid);
  color: var(--acid);
}

.terminal-footer {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  border-top: 1px solid var(--line);
  color: #606361;
  font: 8px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terminal-footer a {
  margin-left: auto;
  color: #a5a69f;
  text-underline-offset: 4px;
}

.copy-status {
  position: absolute;
  bottom: 5px;
  left: 28px;
  margin: 0;
  color: var(--acid);
  font: 8px/1 var(--mono);
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.install-steps li {
  min-height: 172px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 18px;
  padding: 28px 26px;
}

.install-steps li + li {
  border-left: 1px solid var(--line);
}

.install-steps > li > span {
  color: var(--acid);
  font: 10px/1 var(--mono);
}

.install-steps strong {
  display: block;
  margin-bottom: 11px;
  color: #deded7;
  font-size: 13px;
}

.install-steps p {
  margin: 0;
  color: #777a78;
  font-size: 12px;
  line-height: 1.7;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-grid article {
  min-height: 280px;
  padding: 28px 26px 34px;
}

.principle-grid article + article {
  border-left: 1px solid var(--line);
}

.principle-mark {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #303238;
  color: var(--acid);
  font: 8px/1 var(--mono);
  letter-spacing: 0.08em;
}

.principle-grid h3 {
  margin: 76px 0 12px;
  color: #deddd7;
  font-size: 16px;
  font-weight: 650;
}

.principle-grid p {
  margin: 0;
  color: #7d807e;
  font-size: 12px;
  line-height: 1.78;
}

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

.package-ledger > div {
  min-height: 92px;
  display: grid;
  grid-template-columns: 0.55fr 1.35fr 1fr;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease;
}

.package-ledger > div:hover {
  background: rgba(255, 255, 255, 0.018);
}

.package-ledger span {
  color: var(--acid);
  font: 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.package-ledger strong {
  color: #d6d5cf;
  font-size: 14px;
  font-weight: 600;
}

.package-ledger small {
  color: #737674;
  font-size: 11px;
}

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

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d7d6d0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 20px;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span {
  color: var(--acid);
  font: 18px/1 var(--mono);
}

.faq-list details p {
  max-width: 760px;
  margin: -8px 0 28px;
  color: #8c8f8c;
  font-size: 13px;
  line-height: 1.78;
}

.site-footer {
  min-height: 132px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 32px;
  color: #686b69;
  font-size: 10px;
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #babbb5;
  font-size: 12px;
  font-weight: 650;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: #888b88;
  text-underline-offset: 4px;
}

.not-found-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.not-found {
  width: min(720px, calc(100% - 40px));
  text-align: center;
}

.not-found h1 {
  margin: 24px 0 16px;
  font: 500 clamp(48px, 9vw, 86px)/0.94 var(--serif);
  letter-spacing: -0.06em;
}

.not-found > p:not(.section-index) {
  margin: 0 0 34px;
  color: var(--muted);
}

@media (max-width: 1020px) {
  :root { --page: min(100% - 36px, 920px); }

  .hero {
    grid-template-columns: 1fr;
    gap: 70px;
    padding-top: 86px;
  }

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

  .canvas-stage {
    min-height: 590px;
  }

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

  .principle-grid article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .principle-grid article:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  :root { --page: min(100% - 26px, 640px); }

  .site-header {
    min-height: 72px;
  }

  .brand-suffix,
  .release-separator,
  .release-chip span:last-child {
    display: none;
  }

  .hero {
    min-height: auto;
    gap: 54px;
    padding: 70px 0 72px;
  }

  .hero h1 {
    font-size: clamp(58px, 20vw, 88px);
  }

  .hero-intro {
    font-size: 14px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .canvas-stage {
    min-height: 460px;
    box-shadow: 10px 14px 0 rgba(140, 124, 255, 0.08);
  }

  .stage-node-prompt {
    top: 82px;
    left: 18px;
    width: 190px;
  }

  .stage-node-render {
    top: 207px;
    left: 48%;
    width: 210px;
  }

  .stage-node-library {
    right: 16px;
    bottom: 30px;
    width: 158px;
  }

  .render-frame {
    height: 104px;
  }

  .stage-connections {
    transform: scale(0.82);
    transform-origin: center;
  }

  .install-section,
  .principles,
  .inside,
  .faq {
    padding: 78px 0;
  }

  .command-line {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
  }

  .command-line button {
    align-self: flex-start;
  }

  .terminal-footer {
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 22px;
  }

  .terminal-footer a {
    margin-left: 0;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }

  .install-steps li {
    min-height: auto;
  }

  .install-steps li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .principle-grid article {
    min-height: 230px;
  }

  .principle-grid article + article,
  .principle-grid article:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .principle-grid h3 {
    margin-top: 52px;
  }

  .package-ledger > div {
    grid-template-columns: 0.45fr 1.55fr;
    gap: 18px;
    padding: 22px 0;
  }

  .package-ledger small {
    grid-column: 2;
  }

  .faq-list summary {
    gap: 18px;
    font-size: 17px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 36px 0;
  }
}

@media (max-width: 440px) {
  .canvas-stage {
    min-height: 420px;
  }

  .stage-node-prompt {
    width: 172px;
  }

  .stage-node-render {
    top: 198px;
    width: 184px;
  }

  .stage-node-library {
    display: none;
  }

  .stage-cursor {
    left: 61%;
  }
}

@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;
  }
}
