/* See ./home-hero.md for design notes and rationale. */

.home-hero {
  --home-hero-body-color-sm: var(--ll-color-bg-accent);
  --home-hero-img-pos: 50% 20%;
}

/* Behind-top-nav modifier */
.home-hero.home-hero--behind-top-nav {
  margin-block-start: calc(-1 * var(--nav-height));
}

.home-hero__text {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
}

/* Heading */
.home-hero__heading {
  margin: 0;
  color: var(--ll-color-text-inverse);
  font-family: var(--ll-text-h1-family);
  font-size: var(--ll-text-h3-size);
  line-height: var(--ll-text-h3-line-height);
  letter-spacing: var(--ll-text-h3-letter-spacing);
  font-weight: var(--ll-text-h1-weight);
}

/* Route headline override */
@media (width < 768px) {
  body.page-how-it-works .home-hero__heading {
    font-size: var(--ll-text-h4-size);
    line-height: var(--ll-text-h4-line-height);
    letter-spacing: 1px;
  }
}

/* Description */
.home-hero__description {
  margin: var(--ll-space-5) 0 0;
  color: var(--home-hero-body-color-sm);
  font-family: var(--ll-text-body-lg-family);
  font-size: var(--ll-text-body-base-size);
  line-height: var(--ll-text-body-base-line-height);
  letter-spacing: var(--ll-text-body-lg-letter-spacing);
  font-weight: var(--ll-text-body-lg-weight);
}

/* CTAs + buttons */
.home-hero__ctas {
  --ll-button-width: 100%;
  --ll-button-max-width: none;

  display: flex;
  flex-direction: column;
  gap: var(--ll-space-5);
  margin-top: var(--ll-space-8);
}

.home-hero a.button {
  --ll-button-padding: 0 var(--ll-space-6);

  block-size: 44px;
  min-inline-size: 48px;
  border-radius: 100px;
  font-size: var(--ll-text-button-base-size);
  letter-spacing: var(--ll-text-button-lg-letter-spacing);
}

/* Dark-bg context aliases: legacy linkType=primary paints as white-on-dark,
   linkType=secondary paints as transparent-with-outline. The global .primary /
   .secondary paint (brand-green-on-green / ghost-on-light) would be invisible
   over the dark hero photo. See home-hero.md > "Button variants > Legacy aliases". */
.home-hero a.button.primary,
.home-hero a.button.primary:hover,
.home-hero a.button.primary:focus-visible {
  border: none;
  background-color: var(--ll-color-bg-default);
  color: var(--ll-color-text-secondary);
}

.home-hero a.button.secondary,
.home-hero a.button.secondary:hover,
.home-hero a.button.secondary:focus-visible {
  border: 1px solid var(--ll-color-border-inverse);
  background-color: transparent;
  color: var(--ll-color-text-inverse);
}

/* Disclaimer */
.home-hero__disclaimer {
  margin: var(--ll-space-7) 0 0;
  display: flex;
  height: 26px;
  align-items: center;
  gap: var(--ll-space-3);
  color: var(--ll-color-text-inverse);
  font-family: var(--ll-text-body-sm-family);
  font-size: var(--ll-text-body-sm-size);
  line-height: var(--ll-text-body-sm-line-height);
  letter-spacing: var(--ll-text-body-sm-letter-spacing);
  font-weight: var(--ll-text-body-sm-weight);
}

.home-hero__rating-img {
  display: inline-block;
  height: 26px;
  vertical-align: middle;
}

.home-hero__check-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.home-hero .l-tmlayout__text-section {
  padding-block: calc(var(--ll-space-15) + var(--nav-height)) var(--ll-space-9);
}

/* Media */
.home-hero .l-tmlayout__media picture {
  display: block;
  width: 100%;
  height: 100%;

  /* Band floor (WEBEXP-110876) - generic, all instances */
  min-height: 714px;
}

.home-hero .l-tmlayout__media > img,
.home-hero .l-tmlayout__media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: none;
  object-fit: cover;
  object-position: var(--home-hero-img-pos);
}

.home-hero__media-img {
  pointer-events: none;
}

/* MD+ */
@media (width >= 768px) {
  .home-hero .l-tmlayout__text-section {
    padding-block: calc(var(--ll-space-15) + var(--nav-height)) var(--ll-space-15);
  }

  .home-hero__heading {
    font-size: var(--ll-text-h1-size);
    line-height: var(--ll-text-h1-line-height);
    letter-spacing: var(--ll-text-h1-letter-spacing);
  }

  .home-hero__description {
    margin-top: var(--ll-space-6);
    color: var(--ll-color-text-inverse);
    font-family: var(--ll-text-body-xl-family);
    font-size: var(--ll-text-body-xl-size);
    line-height: var(--ll-text-body-xl-line-height);
    letter-spacing: var(--ll-text-body-xl-letter-spacing);
    font-weight: var(--ll-text-body-xl-weight);
  }

  .home-hero__ctas {
    --ll-button-width: auto;
    --ll-button-max-width: 100%;

    flex-flow: row wrap;
    gap: var(--ll-space-6);
    margin-top: var(--ll-space-9);
  }

  .home-hero a.button {
    --ll-button-padding: 0 var(--ll-space-7);

    block-size: 56px;
    font-size: var(--ll-text-button-lg-size);
    line-height: var(--ll-text-button-lg-line-height);
  }

  .home-hero a.button.primary {
    min-inline-size: 153px;
  }

  body.page-how-it-works .home-hero a.button.primary {
    min-inline-size: 244px;
  }

  .home-hero__disclaimer {
    margin-top: var(--ll-space-8);
  }

  .home-hero__check-icon {
    width: 24px;
    height: 24px;
  }

  .home-hero .l-tmlayout__media picture {
    min-height: 822px;
  }
}

/* LG+ */
@media (width >= 1024px) {
  .home-hero .l-tmlayout__media picture {
    min-height: 556px;
  }
}
