/* The hero builds itself from its own code (build.js). Only clip-path and opacity animate.
   Code uses the system monospace font: no extra download, and it reads as code. */

.hero { position: relative; }

/* Before first paint, while building: the real parts wait behind a closed clip. */
.hero.building h1,
.hero.building .sketch,
.hero.building .lead,
.hero.building .price-line,
.hero.building .actions { clip-path: inset(0 100% 0 0); }

.build-code {
  position: absolute;
  margin: 0;
  overflow: hidden;
  font: var(--t-0) / 1.6 ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  pointer-events: none;
}
.build-code-lg { font-size: var(--t-2); line-height: 1.45; }
.tk-tag { color: var(--accent); }
.tk-attr { color: var(--muted); }
.tk-str { color: var(--muted); }

/* A blinking caret on the headline's code while the page holds. */
.build-code-lg::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 0.1em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: caret 900ms steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Status line and Skip sit in the hero's top padding, so they never move the layout. */
.build-note {
  position: absolute;
  top: var(--s-3);
  left: 0;
  right: 0;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  font: var(--t-0) / 1.4 ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  color: var(--muted);
}
.building .build-note { padding-right: var(--s-10); }
.building .build-note::after { content: "…"; animation: caret 900ms steps(1) infinite; }
.build-skip {
  position: absolute;
  top: var(--s-2);
  right: var(--gutter);
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--t-0) / 1.4 var(--font-body);
  cursor: pointer;
}
.build-skip:hover { background: var(--ink); color: var(--surface); }
@media (min-width: 48rem) {
  .build-note { top: var(--s-7); padding-inline: var(--gutter-wide); }
  .build-skip { top: var(--s-7); right: max(var(--gutter-wide), calc((100% - var(--page-max)) / 2 + var(--gutter-wide))); }
}

/* Sketch controls only make sense with JavaScript. */
html:not(.js) .sketch-controls,
html:not(.js) .sketch-title { display: none; }
