/* ---------------------------------------------
   Homepage
--------------------------------------------- */

.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.home-hero {
  text-align: center;
}

/* Matches video/editor.json's comp size (1440x319, name baked in)
   so it scales down cleanly at any width without distortion.
   lottie-web renders an inline <svg> into this container at "svg"
   renderer settings. Sized to 70% of its natural max width. */
.home-hero__lottie {
  width: min(42vw, 490px);
  aspect-ratio: 1440 / 319;
  margin: 0 auto;
}

.home-hero__lottie svg {
  display: block;
}

/* 50% larger than the desktop sizing above (42vw * 1.5 = 63vw) — the
   px cap is irrelevant at mobile widths so it's dropped here. */
@media (max-width: 700px) {
  .home-hero__lottie {
    width: 63vw;
  }
}

/* Typography matches .site-header__role ("editor" under the name
   in the site header) — same look, just cream instead of the header's
   dark-on-cream color since this sits on the green background.

   Deliberately never sets `opacity` or the `transition` shorthand
   unconditionally here — this element also carries .reveal, and an
   equal-specificity `opacity`/`transition` declared after .reveal in
   the cascade (index.css loads after style.css) would silently win
   and override .reveal's own opacity:0 hidden state, so it'd never
   actually be hidden pre-reveal. Only ever touch transition-delay/
   -duration as longhands, and scope opacity to .reveal.is-visible. */
.home-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  color: var(--color-cream);
  text-decoration: none;
  font-style: italic;
  letter-spacing: 0.18em;
  font-size: 1.2em;
}

/* Fades up once the animation has finished forming "editor" for the
   first time (the opening phrase's extra letters finish fading out
   ~frame 45 of the ~24fps comp, so ~1.9s in), rather than arriving
   before there's anything worth following it in. */
.home-hero__cta.reveal {
  transition-delay: 2.5s;
}

.home-hero__cta.reveal.is-visible {
  opacity: 0.8;
}

.home-hero__cta.reveal.is-visible:hover {
  opacity: 1;
  transition-duration: 0.2s;
  transition-delay: 0s;
}

.home-hero__cta-arrow {
  width: 0.9em;
  height: 0.9em;
  transition: transform 0.25s ease;
}

.home-hero__cta.reveal.is-visible:hover .home-hero__cta-arrow {
  transform: translateY(3px);
}
