/* ---- The hero's pieces (2026-10-10) ----
   The copy column's parts, the install unit, the agent marks, the rail's live
   marks and the one-shot entrance. The layout that places them lives in
   hero.css.

   Motion budget (review 2026-10-10): nothing outside the product loops; the
   entrance runs once (~1.1s) and never touches the headline, which is the LCP
   element; every loop sits behind `data-motion` and reduced motion. */

.hero {
  --hero-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --hero-std: cubic-bezier(0.2, 0, 0, 1);
  --hero-focus: 2px solid var(--a-accent);
}

/* A fresh agent session prints from the top of its pane; bottom-aligned
   transcripts left the window's upper half empty at hero scale. */
.hero .a-appwin__transcript {
  justify-content: flex-start;
}

.hero-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Copy ---- */

.hero-title {
  margin: 0;
  color: rgb(255 255 255 / 96%);
  font: 500 clamp(2.6rem, 4.6vw, 4.1rem) / 1.02 var(--a-font-display);
  letter-spacing: -0.034em;
  text-wrap: balance;
}

/* ---- The install unit ---- */

.hero-install {
  display: grid;
  width: min(100%, 31rem);
  gap: 0.65rem;
}

.hero-install__ctas {
  display: flex;
  gap: 0.6rem;
}

.hero-install__ctas .hero-cta {
  flex: 1 1 0;
  min-height: 2.95rem;
  font-size: 0.86rem;
}

.hero-install[data-os="win"] .hero-cta--win {
  order: -1;
}

.hero-install__line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.3rem 0.3rem 0.95rem;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 12px;
  background: rgb(255 255 255 / 3%);
  font: 400 0.76rem/1 var(--a-font-mono);
  transition: border-color 150ms var(--hero-std);
}

.hero-install__line:hover {
  border-color: rgb(255 255 255 / 20%);
}

.hero-install__prefix {
  color: rgb(255 255 255 / 38%);
}

.hero-install__command {
  overflow: hidden;
  color: rgb(255 255 255 / 86%);
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-install__copy {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgb(255 255 255 / 6%);
  color: var(--a-ink-soft);
  cursor: pointer;
  font: 500 0.72rem/1 var(--a-font-display);
  transition:
    background-color 150ms var(--hero-std),
    color 150ms var(--hero-std);
}

.hero-install__copy svg {
  stroke: currentColor;
  stroke-width: 1.4;
}

.hero-install__copy:hover {
  background: rgb(255 255 255 / 11%);
  color: var(--a-ink);
}

.hero-install[data-install-state="copied"] .hero-install__copy {
  color: var(--sg-green);
}

.hero-install[data-install-state="copied"] .hero-install__line {
  border-color: color-mix(in srgb, var(--sg-green) 45%, transparent);
}

.hero-install__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.hero-install__tabs {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
}

.hero-install__tab {
  padding: 0.34rem 0.72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--a-ink-faint);
  cursor: pointer;
  font: 500 0.7rem/1 var(--a-font-display);
  transition:
    background-color 150ms var(--hero-std),
    color 150ms var(--hero-std);
}

.hero-install__tab:hover {
  color: var(--a-ink);
}

.hero-install__tab[aria-selected="true"] {
  background: rgb(255 255 255 / 10%);
  color: var(--a-ink);
}

.hero-install__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin: 0;
  color: var(--a-ink-faint);
  font: 400 0.72rem/1.3 var(--a-font-display);
}

.hero-install__facts > * + *::before {
  margin-inline: 0.5rem;
  color: rgb(255 255 255 / 28%);
  content: "·";
}

.hero-install__proof strong {
  color: var(--a-ink-soft);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}

.hero-install__proof[data-download-state="unavailable"] {
  display: none;
}

/* One focus ring for every control the hero adds. */
.hero-install__tab:focus-visible,
.hero-install__copy:focus-visible,
.hero-agents__item:focus-visible {
  outline: var(--hero-focus);
  outline-offset: 3px;
}

/* ---- Agent marks ---- */

.hero-agents {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}

.hero-agents__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Monochrome at rest so twelve vendor colours do not out-shout the product;
   each takes its own colour back under the pointer. */
.hero-agents__mark {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.5);
  opacity: 0.5;
  transition:
    filter 200ms var(--hero-std),
    opacity 200ms var(--hero-std);
}

.hero-agents__item:hover .hero-agents__mark {
  filter: none;
  opacity: 1;
}

.hero-agents__mark--mono {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  color: var(--a-ink);
  font: 600 10px/1 var(--a-font-display);
}

.hero-agents__tail {
  color: var(--a-ink-faint);
  font: 400 0.72rem/1 var(--a-font-mono);
}

/* ---- The rail's live marks ----
   The braille spinner itself is appwin-tree.css's: it is the app's mark. What
   lives here is the landing's own emphasis on the beat. */

/* Asked: the row takes a warm edge, the badge ripples. The one peripheral
   motion on the page is the one that means "this needs you". */
.hero .a-tree__row {
  transition:
    background-color 240ms var(--hero-std),
    box-shadow 240ms var(--hero-std);
}

.hero .a-tree__row:has(.a-tree__dot[data-state="asked"]) {
  --tree-ground: color-mix(in srgb, var(--sg-yellow) 10%, var(--sg-rail));
  background: color-mix(in srgb, var(--sg-yellow) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sg-yellow) 46%, transparent);
}

.hero .a-tree__row.is-answered {
  animation: hero-answered 700ms var(--hero-std);
}

/* Only the focused pane's cursor blinks, as in xterm. */
.hero .a-tree__pane:not(.is-focused) .a-appwin__cursor {
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .a-tree__dot[data-state="asked"]::after {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--sg-yellow);
    content: "";
    animation: hero-ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  /* One entrance, once. Each piece rises a few pixels into place. */
  .hero-rise {
    animation: hero-rise 460ms var(--hero-enter) both;
    animation-delay: var(--hero-delay, 0ms);
  }

  .hero-install {
    --hero-delay: 120ms;
  }

  .hero-agents {
    --hero-delay: 200ms;
  }

  /* Off screen or in a hidden tab: every loop holds its frame. Each
     selector out-ranks the one that declares its `animation` shorthand, which
     would otherwise reset the play state to running. */
  .hero[data-motion="off"] .a-tree__dot[data-state="asked"]::after,
  .hero[data-motion="off"] .a-appwin__cursor,
  .hero[data-motion="off"] .a-appwin__spinner {
    animation-play-state: paused;
  }
}


@keyframes hero-ripple {
  from {
    opacity: 0.55;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(2.8);
  }
}

@keyframes hero-answered {
  from {
    background-color: color-mix(in srgb, var(--sg-fg) 24%, transparent);
  }
}

@keyframes hero-rise {
  from {
    opacity: 0.01;
    transform: translateY(10px);
  }
}

@keyframes hero-lift {
  from {
    opacity: 0.01;
    transform: translateY(22px) scale(0.985);
  }
}

@media (max-width: 30rem) {
  .hero-install__ctas .hero-cta__verb {
    display: none;
  }
}

/* A phone cannot run the install command, so the narrow hero keeps the two
   buttons, the facts and the marks. */
@media (max-width: 47.5rem) {
  .hero-install__line,
  .hero-install__tabs {
    display: none;
  }

  .hero-agents {
    gap: 0.5rem;
  }

  .hero-agents__marks {
    gap: 0.6rem;
  }

  .hero-agents__mark {
    width: 16px;
    height: 16px;
  }
}
