@font-face {
  font-family: "Geist Pixel Square";
  src: url("/fonts/GeistPixel-Square.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

html:has(body.page-home) {
  scroll-behavior: auto;
}

.pixel {
  font-family: "Geist Pixel Square", "IBM Plex Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0;
}

.home-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.agent-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1c1915;
  color: #fff;
  flex: none;
}

.agent-glyph svg {
  width: 14px;
  height: 14px;
}

.agent-glyph[data-agent="chatgpt"] {
  background: #0e8f6e;
}

.agent-glyph[data-agent="claude"],
.agent-glyph[data-agent="claude-code"] {
  background: #c96442;
}

.agent-glyph.agent-glyph-mark,
.agent-glyph.agent-glyph-mark[data-agent="chatgpt"],
.agent-glyph.agent-glyph-mark[data-agent="claude"],
.agent-glyph.agent-glyph-mark[data-agent="claude-code"] {
  background: transparent;
  color: currentColor;
  border-radius: 0;
}

.agent-glyph.agent-glyph-mark svg {
  width: 22px;
  height: 22px;
}

.agent-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline: 8px;
  vertical-align: middle;
}

.home-hero {
  position: relative;
  padding: 128px 0 36px;
}

.hero-copy {
  text-align: center;
}

.stats-pill {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  font-size: 13px;
}

.stats-pill a {
  color: var(--faint);
}

.stats-pill a:hover {
  color: var(--text);
}

.home-hero h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.05;
  color: var(--text);
}

.pixel-line-role {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  column-gap: 0.28em;
  row-gap: 0.12em;
  font-size: 0.72em;
  line-height: 1;
}

.pixel-line-role .agent-cluster {
  margin-inline: 0;
}

.role-caret {
  display: inline-block;
  width: 0.42em;
  height: 0.82em;
  margin-left: 0.12em;
  background: var(--amber);
  vertical-align: -0.08em;
  animation: caret-blink 1.05s steps(1) infinite;
}

.scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(240px, 1fr) minmax(240px, 320px);
  gap: 28px;
  align-items: center;
  margin-top: 54px;
  min-height: 460px;
}

.scene-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  color: rgba(28, 25, 21, 0.62);
  pointer-events: none;
  overflow: visible;
}

html[data-theme="dark"] .scene-lines {
  color: rgba(255, 255, 255, 0.32);
}

.scene-stack,
.scene-rail {
  position: relative;
  z-index: 2;
}

.scene-center {
  position: relative;
}

.scene-stack {
  display: grid;
}

.scene-stack > * {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}

.scene-stack > .is-on {
  opacity: 1;
  visibility: visible;
}

.agent-card,
.rail-card,
.scene-chip,
.shelf-card,
.key-stage,
.faux {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(60, 40, 10, 0.06);
}

.agent-card {
  border-radius: 22px;
  padding: 18px 18px 14px;
}

.eyebrow,
.rail-kicker {
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail-kicker {
  color: #a86b08;
  text-align: right;
}

html[data-theme="dark"] .rail-kicker {
  color: var(--amber);
}

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

.agent-name {
  font-size: 18px;
  font-weight: 650;
}

.agent-role {
  color: var(--faint);
  font-size: 13px;
}

.scene-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}

.scene-steps li {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--elev);
  color: var(--muted);
  font-size: 14px;
}

.is-armed .scene-steps li {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.is-armed .scene-steps li.is-on {
  opacity: 1;
  transform: none;
}

.scene-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.gateway {
  position: relative;
  z-index: 3;
  width: min(100%, 340px);
  aspect-ratio: 1;
}

.gateway canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.gateway-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.glass-stack {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 188px;
  height: 188px;
  border: 18px solid #fffdf8;
  border-radius: 40px;
  background: transparent;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 1px rgba(28, 25, 21, 0.08),
    0 18px 34px rgba(60, 40, 10, 0.1);
}

.glass-stack::before,
.glass-stack::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 18px solid #fffdf8;
  border-radius: 44px;
  box-shadow: 0 0 0 1px rgba(28, 25, 21, 0.07);
}

.glass-stack::before {
  transform: translate(-18px, 10px) rotate(-8deg);
}

.glass-stack::after {
  transform: translate(16px, -8px) rotate(7deg);
}

.mark-hero {
  position: relative;
  z-index: 1;
}

.gateway.is-live {
  cursor: grab;
}

.gateway.is-live:active {
  cursor: grabbing;
}

.gateway.is-live .gateway-fallback {
  opacity: 0;
  pointer-events: none;
}

.mark-hero {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(60, 40, 10, 0.14);
}

.mark-hero svg {
  width: 48px;
  height: 48px;
}

.gateway::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 6%;
  height: 28px;
  background: radial-gradient(ellipse, rgba(60, 40, 10, 0.18), transparent 70%);
  pointer-events: none;
}

.chip-stack {
  position: relative;
  z-index: 3;
  display: grid;
  margin-top: 8px;
}

.chip-stack > * {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}

.chip-stack > .is-on {
  opacity: 1;
  visibility: visible;
}

.scene-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  font-size: 12.5px;
}

.chip-dollar {
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 600;
}

.chip-state {
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 28%, transparent);
  color: #6a4304;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

html[data-theme="dark"] .chip-state {
  color: #ffd78a;
}

.scene-rail {
  min-width: 0;
}

.rail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  line-height: 1.25;
}

.rail-card span {
  min-width: 0;
}

.rail-card:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.rail-more {
  margin-top: 8px;
  text-align: right;
  font-size: 13px;
}

.rail-note {
  margin-top: 12px;
  color: #157a45;
  font-size: 13px;
  text-align: right;
}

.give {
  padding: 18px 0 10px;
}

.give-card {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
  padding: 22px 22px 18px;
  border-radius: 28px;
  background: #0b0f16;
  color: #f4f0e6;
  text-align: center;
}

.give-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.give-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  background: #171c26;
  text-align: left;
}

.give-row code {
  flex: 1;
  min-width: 0;
  color: #f4f0e6;
  font-size: 13.5px;
}

.catalog-block {
  padding: 72px 0 24px;
}

.catalog-kicker {
  margin-bottom: 18px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.cat-tabs a {
  flex: none;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--faint);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

.cat-tabs a.is-on,
.cat-tabs a:hover {
  background: var(--card);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.shelf {
  scroll-margin-top: 110px;
  padding-top: 28px;
}

.shelf h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.shelf h3 a {
  color: var(--text);
}

.shelf h3 a:hover {
  color: var(--text);
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.shelf-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text);
}

.shelf-card:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.shelf-card img,
.rail-card img,
.supplier-chip img,
.compare-panel img,
.ledger img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.shelf-card span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shelf-job {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
}

.shelf-meta {
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.35;
}

.catalog-more {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 28px;
  font-weight: 600;
}

.benefit {
  padding: 28px 0;
}

.benefit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding-block: 48px;
}

.benefit-flip {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.benefit-copy h2 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.02;
  margin-bottom: 16px;
}

.benefit-copy p {
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  list-style: none;
  color: var(--faint);
  font-size: 14px;
}

.ticks li::before {
  content: "› ";
  color: var(--text);
}

.benefit-link {
  margin-top: 16px;
  font-weight: 650;
}

.key-stage {
  overflow: hidden;
  padding: 36px 8px 22px;
  border-radius: 28px;
}

.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 22px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--elev);
  border: 1px solid var(--line);
  font-size: 14px;
}

.key-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chip-marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.chip-track {
  display: flex;
  width: max-content;
  animation: chip-marquee 48s linear infinite;
}

.chip-set {
  display: flex;
  gap: 8px;
  padding-right: 8px;
}

.supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--elev);
  font-size: 13px;
  white-space: nowrap;
}

.supplier-chip img {
  width: 22px;
  height: 22px;
}

.key-note,
.compare-foot,
.zero-note {
  color: #157a45;
  font-size: 13.5px;
}

.key-note {
  margin-top: 8px;
}

.faux {
  border-radius: 24px;
  padding: 16px 16px 14px;
}

.faux-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 12.5px;
}

.faux-dots {
  display: inline-flex;
  gap: 5px;
}

.faux-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-3);
}

.compare-stack {
  display: grid;
  position: relative;
}

.compare-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}

.compare-panel:not(.is-on) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.compare-panel.is-on {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.compare-ask {
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 12.5px;
}

.compare-title {
  margin-bottom: 10px;
  font-weight: 700;
}

.compare-panel ul,
.ledger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.compare-panel li,
.ledger li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 12px;
}

.compare-panel li.is-reading {
  background: color-mix(in srgb, var(--amber) 18%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 70%, transparent);
}

.compare-panel img,
.ledger img {
  width: 22px;
  height: 22px;
}

.quoted,
.ledger-rule {
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
}

.is-reading .quoted,
.ledger-rule {
  color: #8a5604;
  font-weight: 650;
}

html[data-theme="dark"] .is-reading .quoted,
html[data-theme="dark"] .ledger-rule {
  color: #ffd78a;
}

.compare-foot {
  margin-top: 10px;
}

.ledger-key {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--amber);
  color: #0b0f16;
  font-size: 9px;
  font-weight: 700;
}

.zero {
  padding: 72px 20px 88px;
  text-align: center;
}

.zero h2 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
}

.zero-term {
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  padding: 16px 22px;
  border-radius: 16px;
  background: #0b0f16;
  color: #f4f0e6;
  font-size: clamp(14px, 1.6vw, 18px);
}

.zero-term em {
  color: var(--amber);
  font-style: normal;
}

.zero-note {
  margin-top: 14px;
}

.home-close {
  position: relative;
  padding: 108px 0 88px;
  background: #0b0f16;
  color: #f4f0e6;
  text-align: center;
  overflow: hidden;
}

.home-close::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 72%);
  pointer-events: none;
}

.home-close .home-wrap {
  position: relative;
}

.home-close h2 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  color: #f6f1e6;
}

.home-close p {
  max-width: 46ch;
  margin: 18px auto 0;
  color: #c9c3b6;
  font-size: 17px;
  line-height: 1.5;
}

.close-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.copy-btn-light {
  background: #fff;
  color: #0b0f16;
}

.copy-btn-line {
  background: transparent;
  color: #f4f0e6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.copy-btn-line:hover {
  color: #fff;
}

.close-note {
  font-size: 14px !important;
}

.close-note a {
  color: #f4f0e6;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 8px;
}

.close-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  color: #9c968a;
  font-family: var(--mono);
  font-size: 12.5px;
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes chip-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reveal].is-in {
  animation: home-rise 0.7s ease both;
}

@media (max-width: 980px) {
  .scene {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 28px;
  }

  .scene-center {
    min-height: 0;
  }

  .rail-kicker,
  .rail-note,
  .rail-more {
    text-align: left;
  }

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

  .benefit-grid,
  .benefit-flip {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .home-wrap,
  .give-card {
    width: min(1180px, calc(100% - 32px));
  }

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

  .give-row {
    flex-wrap: wrap;
  }

  .give-row code {
    flex-basis: 100%;
    white-space: normal;
  }

  .home-hero h1 {
    font-size: 32px;
  }

  .close-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Tablet only. The 1180px column is already full above this, and phones
   keep the centered catalog chips and the tighter header. */
@media (min-width: 721px) and (max-width: 1227px) {
  .give-card {
    width: min(1180px, calc(100% - 48px));
  }

  .cat-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: 12px;
  }

  .cat-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .cat-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .role-caret,
  .chip-track,
  [data-reveal].is-in {
    animation: none;
  }

  .is-armed .scene-steps li {
    opacity: 1;
    transform: none;
  }

  .chip-marquee {
    overflow: visible;
    mask-image: none;
  }

  .chip-track {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

  .chip-set {
    flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
  }

  .chip-track [data-marquee-clone] {
    display: none;
  }
}
