/* Homepage hero: one visual field, one reading path, one completed run. */
.home-hero {
  position: relative;
  display: grid;
  width: min(1120px, calc(100% - 96px));
  height: 680px;
  min-height: 680px;
  grid-template-columns: 600px 450px;
  column-gap: 70px;
  padding: 64px 0 0;
}

.home-hero::after {
  position: absolute;
  top: 116px;
  left: 635px;
  width: 1px;
  height: 280px;
  background: var(--rule);
  content: "";
  opacity: .68;
  pointer-events: none;
}

.home-hero .hero-copy {
  position: relative;
  top: auto;
  left: auto;
  width: 600px;
  max-width: none;
  height: auto;
}

.home-hero .yc-badge {
  position: static;
  margin: 0 0 16px;
}

.home-hero .hero-copy h1 {
  position: static;
  width: 600px;
  font-size: 48px;
  line-height: 52px;
}

.home-hero .hero-copy > p {
  position: static;
  width: 560px;
  max-width: none;
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 29px;
}

.home-hero .hero-copy .button-row {
  position: static;
  margin: 44px 0 0;
}

.home-hero .compile-stage {
  position: relative;
  top: auto;
  left: auto;
  width: 450px;
  height: 540px;
  margin: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.home-hero .prompt-sheet,
.home-hero .prompt-expanded,
.home-hero .prompt-patches p,
.home-hero .compiled-steps,
.home-hero .compiled-steps > li,
.home-hero .error-panel,
.home-hero .repair-line,
.home-hero .repair-applied,
.home-hero .result-before,
.home-hero .result-after {
  animation: none;
}

.home-hero .prompt-sheet {
  position: absolute;
  top: 52px;
  left: 0;
  width: 450px;
  height: 430px;
  min-height: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  padding: 0;
  opacity: 1;
}

.home-hero .prompt-expanded { position: absolute; inset: 0; }

.home-hero .prompt-copy {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 450px;
  color: var(--ink);
  font: 400 13px/22px "IBM Plex Mono", monospace;
}

.home-hero .prompt-copy p { margin: 0; }
.home-hero .prompt-copy-mobile { display: none; }

.home-hero .prompt-patches {
  position: absolute;
  top: 216px;
  left: 0;
  display: block;
  width: 450px;
  height: 190px;
  margin: 0;
  overflow: visible;
  color: var(--failure);
  font: 400 12px/19px "IBM Plex Mono", monospace;
}

.home-hero .prompt-patches p {
  position: absolute;
  left: 0;
  width: 450px;
  margin: 0;
  opacity: 0;
  transform: translateY(4px);
}

.home-hero .prompt-patches p:nth-child(1) { top: 0; }
.home-hero .prompt-patches p:nth-child(2) { top: 52px; }
.home-hero .prompt-patches p:nth-child(3) { top: 104px; }

.home-hero .compiled-steps {
  position: absolute;
  top: 36px;
  left: 0;
  width: 450px;
  height: 440px;
  opacity: 0;
}

.home-hero .compiled-steps > li {
  position: absolute;
  left: 0;
  display: flex;
  width: 450px;
  height: 52px;
  min-height: 0;
  align-items: center;
  gap: 24px;
  border: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(5px);
}

.home-hero .compiled-steps > li:nth-child(1) { top: 0; }
.home-hero .compiled-steps > li:nth-child(2) { top: 64px; }
.home-hero .compiled-steps > li:nth-child(3) { top: 128px; display: block; }
.home-hero .compiled-steps > li:nth-child(4) { top: 284px; }

.home-hero .compiled-steps li > span,
.home-hero .step-title > span {
  display: block;
  width: 32px;
  flex: 0 0 32px;
  color: var(--secondary);
  font: 400 12px/18px "IBM Plex Mono", monospace;
}

.home-hero .compiled-steps strong { font: 500 18px/22px "Instrument Sans", sans-serif; }
.home-hero .step-title { display: flex; width: 450px; height: 52px; align-items: center; gap: 24px; }
.home-hero .step-title strong { flex: 1; }

.home-hero .error-panel,
.home-hero .repair-line,
.home-hero .repair-applied {
  position: absolute;
  top: 60px;
  left: 0;
  width: 450px;
  height: 72px;
  margin: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  transform: none;
}

.home-hero .error-panel > p {
  display: flex;
  width: 450px;
  height: 72px;
  align-items: flex-start;
  border: 0;
  background: var(--failure-soft);
  padding: 16px;
  color: var(--failure);
  font: 400 15px/20px "Instrument Sans", sans-serif;
}

.home-hero .repair-line,
.home-hero .repair-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--selection-soft);
  padding: 0 16px;
  color: var(--selection);
  font: 500 15px/20px "Instrument Sans", sans-serif;
}

.home-hero .repair-line span { max-width: 310px; }

.home-hero .repair-line button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--selection);
  font: 500 13px/18px "Instrument Sans", sans-serif;
  text-transform: none;
}

.home-hero .repair-applied { background: transparent; }

.home-hero .compile-result {
  position: absolute;
  top: 408px;
  right: 0;
  left: auto;
  display: block;
  width: 196px;
  height: 48px;
  text-align: right;
  opacity: 1;
  transform: none;
  animation: none;
}

.home-hero .compile-result strong { position: static; min-height: 48px; font: 500 42px/48px "Instrument Sans", sans-serif; letter-spacing: -.04em; }
.home-hero .compile-result strong span { position: absolute; top: 0; right: 0; left: auto; width: 196px; white-space: nowrap; }
.home-hero .result-before { color: var(--failure); opacity: 0; }
.home-hero .result-after { color: var(--selection); opacity: 0; }

.hero-replay {
  position: absolute;
  right: 0;
  bottom: 12px;
  border: 0;
  background: transparent;
  color: var(--selection);
  padding: 4px 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
}

.hero-progress {
  position: absolute;
  top: 22px;
  right: 0;
  display: flex;
  gap: 9px;
}

.hero-progress i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule);
}

.hero-progress i:first-child { background: var(--selection); }
.home-hero .compile-stage.is-playing .hero-progress i:nth-child(2) { animation: wc-progress .3s ease-out 11.3s 1 both; }
.home-hero .compile-stage.is-playing .hero-progress i:nth-child(3) { animation: wc-progress .3s ease-out 17.7s 1 both; }
.home-hero .compile-stage.is-playing .hero-progress i:nth-child(4) { animation: wc-progress .3s ease-out 21.9s 1 both; }

.home-hero .compile-stage.is-playing .prompt-sheet { animation: wc-prompt-out .8s ease-out 10.5s 1 both; }
.home-hero .compile-stage.is-playing .prompt-patches p:nth-child(1) { animation: wc-reveal .5s ease-out 3s 1 both; }
.home-hero .compile-stage.is-playing .prompt-patches p:nth-child(2) { animation: wc-reveal .5s ease-out 3.8s 1 both; }
.home-hero .compile-stage.is-playing .prompt-patches p:nth-child(3) { animation: wc-reveal .5s ease-out 4.6s 1 both; }
.home-hero .compile-stage.is-playing .compiled-steps { animation: wc-reveal .6s ease-out 11s 1 both; }
.home-hero .compile-stage.is-playing .compiled-steps > li:nth-child(1) { animation: wc-step-in .4s ease-out 11.4s 1 both; }
.home-hero .compile-stage.is-playing .compiled-steps > li:nth-child(2) { animation: wc-step-in .4s ease-out 11.85s 1 both; }
.home-hero .compile-stage.is-playing .compiled-steps > li:nth-child(3) { animation: wc-step-in .4s ease-out 12.3s 1 both !important; }
.home-hero .compile-stage.is-playing .compiled-steps > li:nth-child(4) { animation: wc-step-in .5s ease-out 21.2s 1 both; }
.home-hero .compile-stage.is-playing .error-panel { animation: wc-error 4s ease-out 14s 1 both; }
.home-hero .compile-stage.is-playing .repair-line { animation: wc-repair 3.5s ease-out 17.5s 1 both; }
.home-hero .compile-stage.is-playing .repair-applied { animation: wc-reveal .5s ease-out 20.5s 1 both; }
.home-hero .compile-stage.is-playing .result-before { animation: wc-count-before 8s ease-out 14s 1 both; }
.home-hero .compile-stage.is-playing .result-after { animation: wc-reveal .6s ease-out 21.6s 1 both; }

@keyframes wc-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes wc-step-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@keyframes wc-prompt-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes wc-error {
  0% { opacity: 0; }
  12.5%, 87.5% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wc-repair {
  0% { opacity: 0; }
  16%, 83% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wc-count-before {
  0% { opacity: 0; }
  6%, 93% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wc-progress {
  from { background: var(--rule); }
  to { background: var(--selection); }
}

@media (max-width: 900px) {
  .home-hero {
    display: block;
    width: min(620px, calc(100% - 40px));
    height: auto;
    min-height: 1000px;
    padding-top: 40px;
  }

  .home-hero::after { display: none; }

  .home-hero .hero-copy,
  .home-hero .hero-copy h1,
  .home-hero .hero-copy > p { width: 100%; }

  .home-hero .compile-stage { width: 100%; margin-top: 48px; }
}

@media (max-width: 620px) {
  .home-hero { width: calc(100% - 40px); min-height: 880px; padding-top: 8px; }
  .home-hero .yc-badge { margin-bottom: 8px; }
  .home-hero .hero-copy h1 { font-size: 40px; line-height: 44px; }
  .home-hero .hero-copy > p { margin-top: 32px; font-size: 18px; line-height: 29px; }
  .home-hero .hero-copy .button-row { margin-top: 8px; }
  .home-hero .compile-stage { height: 420px; margin-top: 48px; }
  .hero-progress { top: 2px; }
  .home-hero .prompt-sheet { top: 20px; width: 100%; height: 352px; }
  .home-hero .prompt-copy-desktop { display: none; }
  .home-hero .prompt-copy-mobile { top: 0; display: block; width: 100%; font-size: 10px; line-height: 17px; }
  .home-hero .prompt-patches { top: 158px; width: 100%; font-size: 10px; line-height: 16px; }
  .home-hero .prompt-patches p { width: 100%; }
  .home-hero .prompt-patches p:nth-child(1) { top: 0; }
  .home-hero .prompt-patches p:nth-child(2) { top: 54px; }
  .home-hero .prompt-patches p:nth-child(3) { top: 108px; }
  .home-hero .compiled-steps { top: 12px; width: 100%; height: 388px; }
  .home-hero .compiled-steps > li { width: 100%; height: 52px; gap: 20px; }
  .home-hero .compiled-steps > li:nth-child(1) { top: 0; }
  .home-hero .compiled-steps > li:nth-child(2) { top: 58px; }
  .home-hero .compiled-steps > li:nth-child(3) { top: 116px; }
  .home-hero .compiled-steps > li:nth-child(4) { top: 276px; }
  .home-hero .compiled-steps li > span,
  .home-hero .step-title > span { width: 32px; flex-basis: 32px; font-size: 10px; line-height: 14px; }
  .home-hero .compiled-steps strong { font-size: 16px; line-height: 20px; }
  .home-hero .step-title { width: 100%; height: 52px; gap: 20px; }
  .home-hero .error-panel,
  .home-hero .repair-line,
  .home-hero .repair-applied { top: 58px; width: 100%; height: 72px; }
  .home-hero .error-panel > p { width: 100%; height: 72px; padding: 13px 12px; font-size: 11px; line-height: 15px; }
  .home-hero .repair-line,
  .home-hero .repair-applied { padding: 0 12px; font-size: 11px; line-height: 15px; }
  .home-hero .repair-line span { max-width: 230px; }
  .home-hero .repair-line button { font-size: 11px; line-height: 15px; }
  .home-hero .compile-result { top: 350px; right: 0; width: 160px; height: 36px; }
  .home-hero .compile-result strong { min-height: 36px; font-size: 30px; line-height: 36px; }
  .home-hero .compile-result strong span { width: 160px; }
  .hero-replay { bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .prompt-sheet { display: none; }
  .home-hero .compiled-steps,
  .home-hero .compiled-steps > li { opacity: 1; transform: none; }
  .home-hero .compiled-steps > li:nth-child(4) { transform: none; }
  .home-hero .error-panel,
  .home-hero .repair-line,
  .home-hero .result-before { display: none; }
  .home-hero .repair-applied { display: flex; opacity: 1; }
  .home-hero .result-after { opacity: 1; transform: none; }
  .hero-replay { display: none; }
  .hero-progress i { background: var(--selection); }
}
