/* ==========================================================================
   hero: full-screen video, slogan, statement, CTA
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  overflow: hidden;
  color: var(--text-on-dark);
  background-color: var(--bg-darker);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__poster,
.hero__poster-image,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video {
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.hero__video--ready {
  opacity: 1;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    /* top: dark enough for the header (it inverts the background) to stay readable over a bright video */
    linear-gradient(180deg, rgba(0, 28, 30, 0.8) 0%, rgba(0, 28, 30, 0.6) 12%, rgba(0, 28, 30, 0) 40%),
    linear-gradient(0deg, rgba(0, 28, 30, 0.85) 0%, rgba(0, 28, 30, 0.35) 45%, rgba(0, 28, 30, 0) 75%);
}

.hero__content {
  display: grid;
  gap: var(--space-md);
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
}

.hero__title {
  max-width: 11ch;
}

.hero__statement {
  max-width: 30rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Mobile: buttons full width for easy tapping */
@media (max-width: 479px) {
  .hero__actions .button {
    width: 100%;
  }

  .hero__actions .button__label {
    flex: 1;
  }
}

@media (min-width: 768px) {
  .hero__content {
    padding-bottom: 4rem;
  }
}

@media (min-width: 1000px) {
  .hero__content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    align-items: end;
    column-gap: var(--space-xl);
    padding-bottom: 5rem;
  }

  .hero__label {
    grid-column: 1 / -1;
  }

  .hero__title {
    grid-row: 2 / span 2;
  }

  .hero__statement,
  .hero__actions {
    grid-column: 2;
  }

  /* both buttons share the column, so the block ends exactly at the grid edge */
  .hero__actions {
    flex-wrap: nowrap;
  }

  .hero__actions .button {
    flex: 1;
  }

  .hero__actions .button__label {
    flex: 1;
  }
}
