/* Homepage layout. Components come from the kit; this file only arranges them. */

/* ---- the scene: one extra screen of scroll, the steel section pinned in view.
        home.js sets opacity and position on the intro, story and cue from the scroll (0..1). The headline hands over to the story of the
        mark as the Z turns into the N, so the left side is never empty ---- */
.home-scene { position: relative; height: 200svh; }
.home-scene__pin { position: sticky; top: 0; height: 100svh; overflow: clip; display: grid; align-items: end; }
.home-scene__stage { position: absolute; inset: 0 0 34% 0; aspect-ratio: auto; }
.home-scene__copy { position: relative; display: grid; padding-block: 6rem clamp(2rem, 6vh, 4.5rem); }
.home-scene__intro, .home-scene__story { grid-area: 1 / 1; align-self: end; display: grid; gap: var(--kit-space-4); max-width: 44rem; }
.home-scene__intro { will-change: opacity, transform; }
.home-scene__intro h1 { font-size: var(--kit-text-3xl); line-height: 1.02; }
.home-scene__story { opacity: 0; transform: translate3d(0, 3rem, 0); will-change: opacity, transform; pointer-events: none; }
.home-scene__story h2 { font-size: var(--kit-text-2xl); max-width: 16ch; }
.home-scene__story .kit-lede { max-width: 30rem; }
.home-scene__cue { display: none; position: absolute; right: var(--kit-gutter); bottom: clamp(2rem, 6vh, 4.5rem); }
.home-scene__cue::after { content: ""; display: block; width: 1px; height: 2.5rem; margin: var(--kit-space-2) 0 0 auto; background: currentColor; transform-origin: top; animation: home-cue 2.2s var(--kit-ease-out) 6; } /* pulses a few times, then rests */
@keyframes home-cue { 0% { scale: 1 0; } 60%, 100% { scale: 1 1; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .home-scene__cue::after { animation: none; } }
@media (min-width: 60rem) {
  .home-scene__stage { inset: 0 0 0 38%; }
  .home-scene__pin { align-items: center; }
  .home-scene__copy { padding-block: 0; }
  .home-scene__intro, .home-scene__story { align-self: center; }
  .home-scene__intro h1 { max-width: 13ch; } /* wraps before it reaches the steel at every width */
}

/* ---- work: the reel bleeds to the edges; the fields index follows ---- */
.home-work { padding-block: clamp(4rem, 10vw, 8rem) clamp(2rem, 5vw, 4rem); }
.home-fields { padding-block: clamp(3rem, 8vw, 7rem); }
.home-strip { padding-block: clamp(2rem, 6vw, 5rem) clamp(4rem, 9vw, 7rem); }
.home-strip__more { display: flex; justify-content: center; margin-top: var(--kit-space-7); }

/* ---- statement: runs the full width; the words light up as it is scrolled ---- */
.home-statement { padding-block: clamp(4rem, 10vw, 9rem); }
.home-statement .kit-container { display: grid; gap: var(--kit-space-6); }
.home-statement__text { font-size: clamp(2rem, 0.9rem + 4.4vw, 5.25rem); line-height: 1.04; }
.home-pillars { display: grid; gap: var(--kit-space-6); margin-top: clamp(2rem, 6vw, 5rem); }
.home-pillars > div { display: grid; gap: var(--kit-space-3); align-content: start; padding-top: var(--kit-space-4); border-top: 1px solid var(--kit-border); }
.home-pillars p { max-width: 36ch; }
@media (min-width: 52rem) { .home-pillars { grid-template-columns: repeat(3, 1fr); } }

/* ---- approach: heading on the left, the three movements on the right ---- */
.home-approach { display: grid; gap: var(--kit-space-6); }
.home-approach__head { margin-bottom: 0; }
@media (min-width: 60rem) {
  .home-approach { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--kit-space-8); align-items: start; }
  .home-approach__head { position: sticky; top: 7rem; }
}
.home-steps > li::before { font-size: var(--kit-text-2xl); line-height: 1; }
.home-steps > li h3 { font-size: var(--kit-text-xl); }

/* Rules that draw themselves in when their block arrives. */
.kit-motion :is(.home-steps > li, .home-pillars > div) { border-top-color: transparent; position: relative; }
.kit-motion :is(.home-steps > li, .home-pillars > div)::after {
  content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: var(--kit-text);
  transform-origin: left; scale: 0 1; transition: scale 1400ms var(--kit-ease-out); transition-delay: var(--delay, 0ms);
}
.kit-motion :is(.home-steps > li, .home-pillars > div).is-in::after { scale: 1 1; }

/* ---- contact and foot ---- */
.home-contact { padding-block: clamp(5rem, 12vw, 10rem) clamp(4rem, 8vw, 7rem); }
.home-contact .kit-container { display: grid; gap: var(--kit-space-5); }
.home-contact__row { display: grid; gap: var(--kit-space-6); margin-top: var(--kit-space-6); }
.home-contact__row .kit-lede { max-width: 30rem; }
@media (min-width: 52rem) { .home-contact__row { grid-template-columns: 1fr auto; align-items: end; } }

.home-foot { overflow: clip; padding-top: var(--kit-space-7); }
.home-foot__logo { width: 100%; height: auto; }

@media (min-width: 60rem) { .home-scene__cue { display: block; } }

/* Small laptops and tablets in landscape: the headline and the steel must not meet. */
@media (min-width: 60rem) and (max-width: 87.99rem) {
  .home-scene__intro, .home-scene__story { max-width: 44vw; }
  .home-scene__stage { inset: 0 0 0 46%; }
}
