/* How it works, in the reference's editorial layout with our own art: a starfield hero over a
   Higgsfield panorama of a town being built, the live company console, the thousand-agent swarm, six
   steps with moving figures, four framed vignettes on how the agents stay in step, the four roles as
   team cards, what you get, the vine-wreath call to action (cta.css) and a docs list. */

.hw {
  background: var(--page);
  color: var(--text);
}

/* Shared */
.hw-frame {
  position: relative;
  padding: 12px;
}
.hw-frame > .pframe {
  color: var(--surface-2);
}
.hw-label {
  margin: 0;
  color: var(--text-3);
  text-transform: uppercase;
}
.hw-sample {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--surface-2);
  color: var(--copper-400);
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: var(--px-notch);
}
.hw-eyebrow {
  margin: 0;
  color: var(--accent);
}
.hw-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}
@media (min-width: 1024px) {
  .hw-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 64px;
  }
}
.hw-head-main {
  display: grid;
  gap: 20px;
  max-width: 720px;
}
.hw-head h2 {
  margin: 0;
  text-wrap: balance;
}
.hw-head-text {
  max-width: 520px;
  margin: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.hw-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  background: var(--surface-2);
  clip-path: var(--px-notch);
}

/* Hero: the night sky (mirrored so the big star sits right) over the construction panorama */
.hw-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: 152px;
  padding-bottom: max(240px, 24vw);
  background: #000;
}
@media (min-width: 1024px) {
  .hw-hero {
    padding-top: 184px;
  }
}
.hw-stars {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #000 url(../assets/6154246d314fea2001bff264427e012d.png) center top / max(100%, 1100px) auto no-repeat;
  transform: scaleX(-1);
  image-rendering: pixelated;
  pointer-events: none;
}
.hw-pano {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 0;
  display: block;
  width: max(100%, 960px);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hw-hero-copy {
  display: grid;
  gap: 32px;
  max-width: 1180px;
}
.hw-title {
  display: flex;
  flex-direction: column;
  margin: 0;
  text-wrap: balance;
}
.hw-title-2 {
  color: var(--text-3);
}
.hw-lede {
  max-width: 640px;
  margin: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.hw-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* The live console */
.hw-live {
  padding-block: 72px 48px;
}
@media (min-width: 1024px) {
  .hw-live { padding-block: 96px 64px; }
}
.hw-con,
.hw-scale-fig {
  position: relative;
  z-index: 45; /* above the CRT overlay */
}

/* Scale: the thousand-agent swarm */
.hw-scale {
  padding-block: 64px;
}
@media (min-width: 1024px) {
  .hw-scale { padding-block: 96px; }
}
.hw-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.hw-chain li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
}
.hw-chain b {
  font-weight: 400;
  color: #fff;
}
.hw-chain .hw-arrow {
  color: var(--accent);
}
.sw {
  position: relative;
  height: 440px;
  background: #0b0a09;
  overflow: hidden;
}
@media (min-width: 768px) {
  .sw { height: 520px; }
}
@media (min-width: 1024px) {
  .sw { height: 600px; }
}
.sw-stage {
  position: absolute;
  inset: 0;
}
.sw-stage > * {
  position: absolute;
  inset: 0;
}
.sw-top {
  position: absolute;
  top: 16px;
  left: 16px;
}
/* the map's own tools and first-time hint (build.css) make room for the chip */
.sw .bv-tools {
  top: 16px;
  right: 16px;
}
.sw .bv-hint {
  top: 54px;
  left: 16px;
  right: auto;
}
@media (max-width: 639px) {
  .sw .bv-tools {
    top: 52px;
    left: 16px;
    right: auto;
  }
  .sw .bv-hint {
    top: 92px;
  }
}
.sw-counters {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  pointer-events: none;
}
.sw-count {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 10px 16px 12px;
  background: rgba(11, 10, 9, 0.88);
  clip-path: var(--px-notch);
}
.sw-count b {
  font-weight: 400;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.sw-count span {
  color: var(--copper-400);
  text-transform: uppercase;
}
@media (max-width: 639px) {
  .sw-counters {
    left: 8px;
    right: 8px;
    bottom: 8px;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .sw-count {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px 8px;
  }
  .sw-count b {
    font-size: 22px;
  }
  .sw-count span {
    font-size: 10px;
  }
}

/* The six steps: card + figure, the figure alternating sides from 1024 */
.hw-steps {
  padding-top: 48px;
}
.hw-intro-row {
  border-bottom: 1px solid var(--surface-2);
}
.hw-row {
  padding-block: 48px;
}
@media (min-width: 768px) {
  .hw-row { padding-block: 64px; }
}
@media (min-width: 1024px) {
  .hw-row { padding-block: 72px; }
}
.hw-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
@media (min-width: 1024px) {
  .hw-row-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 40px;
  }
  .hw-card { grid-column: span 5; }
  .hw-fig { grid-column: span 7; }
  .hw-row--flip .hw-card { order: 2; }
}
.hw-card,
.hw-fig {
  position: relative;
  z-index: 45;
  min-width: 0;
}
.hw-card-in {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 32px 28px;
  background: var(--surface);
}
.hw-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hw-num {
  margin: 0;
  color: var(--accent);
}
.hw-card-title {
  margin: 0;
  text-wrap: balance;
}
.hw-card-copy {
  margin: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.hw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hw-tags li {
  padding: 6px 10px;
  background: var(--surface-2);
  color: var(--text-2);
  text-transform: uppercase;
  clip-path: var(--px-notch);
}
.hw-fig-in {
  position: relative;
  display: grid;
  align-content: start;
  gap: 20px;
  min-height: 360px;
  padding: 24px;
  background: var(--page);
}
.hw-fig-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Figure 1: the launch form, typing itself in */
.hw-form {
  display: grid;
  gap: 14px;
}
.hw-field {
  display: grid;
  gap: 6px;
}
.hw-field-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
}
.hw-input {
  padding: 12px 14px;
  background: var(--surface-2);
  color: #fff;
  clip-path: var(--px-notch);
}
.hw-input--area {
  min-height: 72px;
}
.hw-type {
  display: inline-block;
  animation: hw-type 9s steps(18, end) infinite;
}
.hw-type.d1 { animation-delay: 0.6s; }
.hw-type.d2 { animation-delay: 1.4s; }
@keyframes hw-type {
  0% { clip-path: inset(0 100% 0 0); }
  30%, 92% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 100% 0 0); }
}
.hw-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-2);
}
.hw-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  background: var(--accent);
  clip-path: var(--px-notch);
}
.hw-switch::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #fff;
}
.hw-fake-btn {
  justify-self: start;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  clip-path: var(--px-notch);
  animation: hw-ready 9s steps(1, end) infinite;
}
@keyframes hw-ready {
  0%, 34% { background: var(--surface-2); color: var(--text-3); }
  35%, 100% { background: var(--accent); color: #fff; }
}

/* Figure 2: the fuel ledger, rows arriving one by one */
.hw-table-box {
  overflow-x: auto;
}
.hw-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}
.hw-table th,
.hw-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--surface-2);
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}
.hw-table th {
  color: var(--text-3);
}
.hw-table td {
  color: var(--text-2);
}
.hw-table td.num {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hw-table tbody tr {
  animation: hw-row 12s steps(1, end) infinite;
}
.hw-table tbody tr:nth-child(2) { animation-delay: 1.2s; }
.hw-table tbody tr:nth-child(3) { animation-delay: 2.4s; }
.hw-table tbody tr:nth-child(4) { animation-delay: 3.6s; }
.hw-table tbody tr:nth-child(5) { animation-delay: 4.8s; }
@keyframes hw-row {
  0% { opacity: 0; }
  4% { opacity: 1; background: rgba(237, 103, 15, 0.16); }
  12% { background: transparent; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}
.hw-ev {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface-2);
  color: #fff;
  clip-path: var(--px-notch);
}
.hw-ev--claim { background: var(--accent); }
.hw-proof {
  color: var(--copper-400);
}

/* Figure 3: headcount follows fuel, as squads of bots */
.hw-tiers {
  display: grid;
  gap: 16px;
}
.hw-tier {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-2);
}
.hw-tier:last-child {
  border-bottom: 0;
}
.hw-tier-name {
  display: grid;
  gap: 6px;
  color: var(--text-2);
}
.hw-track {
  height: 8px;
  background: var(--surface-2);
}
.hw-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 12px);
}
.hw-crowd {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
}

/* Figure 4: one agent, opened */
.hw-agent {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 640px) {
  .hw-agent {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
}
.hw-agent-stage {
  display: grid;
  place-items: end center;
  width: 140px;
  height: 120px;
  background:
    linear-gradient(var(--surface-2) 0 0) left 0 bottom 16px / 100% 2px no-repeat,
    var(--surface);
  clip-path: var(--px-notch);
}
.hw-agent-stage .bot {
  margin-bottom: 14px;
}
.hw-agent-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
}
.hw-agent-card dl {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}
.hw-agent-card dt {
  color: var(--text-3);
}
.hw-agent-card dd {
  margin: 0;
  color: #fff;
}
.hw-meter {
  display: flex;
  gap: 3px;
}
.hw-meter i {
  width: 10px;
  height: 10px;
  background: var(--surface-2);
}
.hw-meter i.on {
  background: var(--accent);
}
.hw-meter i.go {
  animation: hw-go 2.4s steps(1, end) infinite;
}
@keyframes hw-go {
  0%, 49% { background: var(--surface-2); }
  50%, 100% { background: var(--accent); }
}

/* Figure 5: a wave report */
.hw-report {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  background: #fff;
  color: var(--stone-800);
  --heading-color: var(--stone-900);
}
.hw-report h4 {
  margin: 0;
}
.hw-report-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 640px) {
  .hw-report-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hw-report-cols .hw-label {
  color: var(--stone-500);
}
.hw-report ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.hw-report li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--accent);
}
.hw-stamp {
  justify-self: end;
  margin-bottom: -8px;
  padding: 4px 10px;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  transform: rotate(-6deg);
  animation: hw-stamp 7s steps(1, end) infinite;
}
@keyframes hw-stamp {
  0%, 40% { opacity: 0; }
  41%, 100% { opacity: 1; }
}

/* Figure 6: a coin's page */
.hw-site {
  display: grid;
  background: var(--surface);
}
.hw-site-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--surface-2);
  color: var(--text-3);
}
.hw-site-url i {
  width: 8px;
  height: 8px;
  background: var(--surface-2);
}
.hw-site-hero {
  display: grid;
  gap: 8px;
  padding: 28px 20px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px), var(--accent);
}
.hw-site-hero p {
  margin: 0;
}
.hw-site-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--surface-2);
}
.hw-site-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
}
.hw-site-stats b {
  font-weight: 400;
  color: #fff;
}
.hw-site-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
}
.hw-site-btns span {
  padding: 10px 14px;
  background: var(--surface-2);
  color: #fff;
  clip-path: var(--px-notch);
}

/* How a thousand agents work as one: four framed vignettes */
.hw-together {
  padding-block: 64px;
}
@media (min-width: 1024px) {
  .hw-together { padding-block: 112px 96px; }
}
.hw-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px 40px;
}
@media (min-width: 900px) {
  .hw-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hw-rule {
  display: grid;
  align-content: start;
  gap: 24px;
}
.hw-vig {
  position: relative;
  z-index: 45;
  margin: 0;
  max-width: 584px;
}
.hw-vig img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.hw-rule-copy {
  display: grid;
  gap: 12px;
  max-width: 560px;
}
.hw-rule-copy h3 {
  margin: 0;
  text-wrap: balance;
}
.hw-rule-copy p {
  margin: 0;
  color: var(--text-2);
  text-wrap: pretty;
}
.hw-rule-copy .hw-stops {
  color: var(--text-3);
}
.hw-stops b {
  font-weight: 400;
  color: var(--copper-400);
}

/* Meet the company: the four roles as team cards with stat bars */
.hw-team {
  padding-block: 64px;
}
@media (min-width: 1024px) {
  .hw-team { padding-block: 96px; }
}
.hw-team-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.hw-team-head h2,
.hw-team-head p {
  margin: 0;
}
.hw-team-head p {
  color: var(--text-2);
}
.hw-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 640px) {
  .hw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .hw-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hw-role {
  position: relative;
  z-index: 45;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
}
.hw-role-art {
  display: grid;
  place-items: end center;
  height: 320px;
  padding-top: 16px;
  background:
    radial-gradient(circle at 50% 70%, rgba(237, 103, 15, 0.12), transparent 60%),
    linear-gradient(var(--surface-2) 0 0) left 0 bottom 22px / 100% 2px no-repeat,
    var(--stone-900);
}
.hw-role-art img {
  display: block;
  margin-bottom: 22px;
  image-rendering: pixelated;
}
.hw-role-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px 22px 26px;
}
.hw-role-body h3 {
  margin: 0;
}
.hw-role-count {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
}
.hw-role-body > p:not(.hw-role-count) {
  margin: 0;
  color: var(--text-2);
}
.hw-stats {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
}
.hw-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hw-stats dt {
  color: var(--text-3);
}
.hw-stats dd {
  display: flex;
  gap: 3px;
  margin: 0;
}
.hw-stats i {
  width: 8px;
  height: 12px;
  background: var(--surface-2);
}
.hw-stats i.on {
  background: var(--accent);
}

/* What you get */
.hw-get {
  padding-block: 64px 32px;
}
@media (min-width: 1024px) {
  .hw-get { padding-block: 96px 48px; }
}
.hw-get-title {
  margin: 0 0 40px;
}
.hw-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 1024px) {
  .hw-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}
.hw-group {
  display: grid;
  align-content: start;
  gap: 16px;
}
.hw-group-label {
  margin: 0;
  color: var(--accent);
}
.hw-get-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hw-get-item {
  position: relative;
  padding: 12px;
}
.hw-get-item > .pframe {
  color: var(--surface-2);
}
.hw-get-in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
}
.hw-get-in h4 {
  margin: 0 0 6px;
  color: #fff;
  font-weight: 400;
}
.hw-get-in p {
  margin: 0;
  color: var(--text-2);
}

/* Docs list */
.hw-docs {
  padding-block: 24px 96px;
}
.hw-docs-title {
  margin: 0 0 20px;
}
.hw-docs-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hw-docs-list a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hw-docs-list a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .hw-type,
  .hw-fake-btn,
  .hw-table tbody tr,
  .hw-meter i.go,
  .hw-stamp {
    animation: none;
  }
}
