/* Hero: graded video, headline anchored bottom-left, lede and actions bottom-right */

.hero {
  position: relative;
  min-height: max(100svh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--surface) url("../assets/site/hero-poster.webp") center / cover no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.14) brightness(0.66);
  transform: scale(1);
  transition: transform 3.2s var(--ease-out);
}

.js:not(.is-ready) .hero__video {
  transform: scale(1.12);
}

/* Grade the bright office footage with dark charcoal: solid at the base so it flows into the next section, lighter through the middle, a veil at the top for the nav */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(36, 37, 40, 1) 0%,
      rgba(36, 37, 40, 0.88) 9%,
      rgba(36, 37, 40, 0.66) 30%,
      rgba(36, 37, 40, 0.24) 60%,
      rgba(36, 37, 40, 0.6) 100%
    ),
    linear-gradient(to right, rgba(36, 37, 40, 0.5), rgba(36, 37, 40, 0) 60%);
}

.hero__inner {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  padding: 0 var(--edge) clamp(32px, 4.5vw, 64px);
}

.hero__main {
  grid-column: 1 / span 8;
}

.hero__eyebrow {
  margin-bottom: clamp(18px, 2vw, 28px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--on-dark-muted);
}

.hero__title {
  font-size: clamp(3.4rem, 1rem + 8.2vw, 9rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

/* Each line is a mask; the word rises into it */
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.hero__title .line > span {
  display: inline-block;
}

/* The rotating last word stacks its options in one grid cell */
.hero__title .line > .rotator {
  display: inline-grid;
}

.hero__aside {
  grid-column: 9 / span 4;
  display: grid;
  gap: 28px;
  padding-bottom: 0.6em;
}

.hero__lede {
  max-width: 34ch;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

/* Entrance choreography, driven by .is-ready on <html> */
.js .hero__title .line > span,
.js .hero .reveal {
  transition:
    transform 1.4s var(--ease-out),
    opacity 1.4s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 120ms + 150ms);
}

.js:not(.is-ready) .hero__title .line > span {
  transform: translateY(110%);
}

.js:not(.is-ready) .hero .reveal {
  opacity: 0;
  transform: translateY(16px);
}

@media (max-width: 960px) {
  .hero__title {
    font-size: clamp(3.4rem, 13vw, 8rem);
  }

  .hero__main,
  .hero__aside {
    grid-column: 1 / -1;
  }

  .hero__aside {
    margin-top: 32px;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 17vw;
  }

  .hero__eyebrow {
    font-size: 13px;
  }

  .hero__actions .btn {
    --btn-h: 48px;
  }
}
