/* The scroll build: the hero stays one screen, held by a sticky inside a taller track. */
main > section.build-track { position: relative; display: block; height: auto; min-height: 0; padding: 0; }
/* the kit sizes main > .hero; the track sits between them, so the same box is restated here */
main > .build-track > .hero {
  position: relative; box-sizing: border-box; height: 100vh; height: 100svh; min-height: 0;
  padding: calc(var(--nav) + var(--photo, 0px) + var(--hgap)) 0 calc(var(--hpadb) + var(--bar));
}
main > .build-track > .hero > .wrap { position: relative; z-index: 1; }
html.js-build main > section.build-track { height: 800svh; }
html.js-build main > .build-track > .hero { position: sticky; top: 0; }
@media (min-width: 1024px) and (max-height: 820px) { .hero--build h1 { font-size: 60px; } }
@media (max-width: 639px) {
  main > .build-track > .hero { padding-bottom: var(--s-5); }
}

.build__scene { position: absolute; inset: 0; z-index: 0; overflow: clip; container-type: size; background: #1b1b1b; }
.build__inner {
  --w: max(100cqw, 177.78cqh);
  --hh: max(100cqh, 56.25cqw);
  position: absolute; width: var(--w); height: var(--hh);
  left: calc((100cqw - var(--w)) / 2); top: calc((100cqh - var(--hh)) / 2);
}
.build__layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }

html.js-build .build__layer[data-layer] { visibility: hidden; }

/* Each feature has its own way of arriving; --p runs 0 to 1 with the scroll. */
html.js-build .build__layer--up {
  -webkit-mask-image: linear-gradient(to top, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
  mask-image: linear-gradient(to top, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
}
html.js-build .build__layer--right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
  mask-image: linear-gradient(to right, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
}
html.js-build .build__layer--left {
  -webkit-mask-image: linear-gradient(to left, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
  mask-image: linear-gradient(to left, #000 calc(var(--p, 0) * 125% - 25%), transparent calc(var(--p, 0) * 125%));
}
html.js-build .build__layer--sides {
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--p, 0) * 80% - 20%), transparent calc(var(--p, 0) * 80%)), linear-gradient(to left, #000 calc(var(--p, 0) * 80% - 20%), transparent calc(var(--p, 0) * 80%));
  mask-image: linear-gradient(to right, #000 calc(var(--p, 0) * 80% - 20%), transparent calc(var(--p, 0) * 80%)), linear-gradient(to left, #000 calc(var(--p, 0) * 80% - 20%), transparent calc(var(--p, 0) * 80%));
}
html.js-build .build__layer--bloom {
  -webkit-mask-image: radial-gradient(circle at 50% 55%, #000 calc(var(--p, 0) * 125% - 20%), transparent calc(var(--p, 0) * 125%));
  mask-image: radial-gradient(circle at 50% 55%, #000 calc(var(--p, 0) * 125% - 20%), transparent calc(var(--p, 0) * 125%));
}

/* The step strip, a solid box at the foot of the picture. */
.build__bar { display: none; }
html.js-build .build__bar { display: block; position: absolute; left: 0; right: 0; bottom: var(--s-5); z-index: 2; visibility: hidden; }
.build__panel { background: var(--p-bg); color: var(--p-ink); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s-5); align-items: center; }
.build__steps { position: relative; list-style: none; margin: 0; padding: 0; min-height: 44px; }
.build__steps > li { position: absolute; inset: 0; display: flex; align-items: baseline; gap: var(--s-4); opacity: 0; transition: opacity 200ms var(--ease); }
.build__steps > li.is-on { opacity: 1; }
.build__name { font: var(--display-weight) 32px/44px var(--font-display); letter-spacing: var(--display-tracking); white-space: nowrap; }
.build__detail { font-size: 16px; line-height: 24px; color: var(--p-muted); }
.build__ticks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.build__ticks > i { display: block; height: 4px; background: color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 2px; transition: background-color 200ms var(--ease); }
.build__ticks > i.is-on { background: var(--p-accent); }

@media (max-width: 1023px) {
  .hero--build .build__scene { inset: var(--nav) 0 auto 0; height: var(--photo); }
  html.js-build .build__bar { bottom: auto; top: calc(var(--nav) + var(--photo) + var(--s-5)); }
  .build__panel { background: none; padding: 0; grid-template-columns: 1fr; gap: var(--s-4); }
  .build__steps { min-height: 92px; }
  .build__steps > li { display: block; }
  .build__name, .build__detail { display: block; }
  .build__name { font-size: 30px; line-height: 38px; white-space: normal; }
}

/* Section pictures */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(560px, var(--ly-fit, 560px)); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile--work { --tile-ratio: 4 / 4.2; }
.tile--work .tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#prices .faq { margin-top: var(--s-6); }
#prices .faq__item h3 { font: var(--display-weight) 22px/1.25 var(--font-display); }
.book-photo { margin: 0; border-radius: var(--r-lg); overflow: clip; height: 100%; }
.book-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .develop { height: calc(100svh - var(--padt) - var(--padb)); } }
#prices .faq > .faq__item { padding-block: var(--s-3); }
@media (max-width: 1023px) {
  .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); }
  #services, #prices, #book { --h: 2; --hm: 2; }
  :is(#services, #prices, #book) .frame--fill { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-6); }
  :is(#services, #prices, #book) .fill { flex: 0 0 auto; }
  .book-photo { height: auto; aspect-ratio: 4 / 5; margin-top: var(--s-6); }
}
