/* ta-hero: three layouts (overlay, split, card). Uses only --ta-* variables. */

.ta-hero {
  --ta-hero-min: 420px;
  overflow: hidden;
}

.ta-hero--h-small { --ta-hero-min: 300px; }
.ta-hero--h-medium { --ta-hero-min: 380px; }
.ta-hero--h-large { --ta-hero-min: 480px; }
.ta-hero--h-full { --ta-hero-min: 88svh; }

@media (min-width: 750px) {
  .ta-hero--h-small { --ta-hero-min: 380px; }
  .ta-hero--h-medium { --ta-hero-min: 520px; }
  .ta-hero--h-large { --ta-hero-min: 660px; }
  .ta-hero--h-full { --ta-hero-min: 92svh; }
}

.ta-hero__frame {
  position: relative;
  display: grid;
}

.ta-hero__media {
  position: relative;
  overflow: hidden;
  background: var(--ta-tint-2);
}

.ta-hero__img,
.ta-hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

svg.ta-hero__img {
  color: var(--ta-fg);
  fill: currentColor;
  opacity: 0.5;
}

.ta-hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.ta-hero__video.is-playing {
  opacity: 1;
}

.ta-hero--has-mobile .ta-hero__img--desktop {
  display: none;
}

@media (min-width: 750px) {
  .ta-hero--has-mobile .ta-hero__img--desktop {
    display: block;
  }

  .ta-hero--has-mobile .ta-hero__img--mobile {
    display: none;
  }
}

.ta-hero__box {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  max-width: 36em;
}

.ta-hero__box .ta-eyebrow {
  margin: 0;
  color: var(--ta-fg);
}

.ta-hero__actions {
  margin-top: 0.5em;
}

/* a narrower text column needs a smaller heading */
.ta.ta-hero--split .ta-hero__heading,
.ta.ta-hero--card .ta-hero__heading {
  font-size: calc(var(--ta-h-scale, 1) * clamp(2em, 1.2em + 2.6vw, 3.3em));
}

.ta-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 0.6em;
  color: var(--ta-fg);
  font-size: 0.9em;
}

.ta-hero__points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ta-hero__points .ta-icon {
  width: 1.3em;
  height: 1.3em;
}

/* ----- overlay: text sits on the picture ----- */

.ta-hero--overlay .ta-hero__frame {
  min-height: var(--ta-hero-min);
}

.ta-hero--overlay .ta-hero__media,
.ta-hero--overlay .ta-hero__content {
  grid-area: 1 / 1;
}

.ta-hero--overlay .ta-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ta-bg) var(--ta-overlay, 40%), transparent);
}

.ta-hero--overlay .ta-hero__img,
.ta-hero--overlay .ta-hero__video {
  position: absolute;
  inset: 0;
}

.ta-hero--overlay .ta-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--ta-page, 1200px);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--ta-gutter);
}

.ta-hero--overlay.ta-hero--y-bottom .ta-hero__content {
  align-items: flex-end;
}

.ta-hero--overlay.ta-hero--x-center .ta-hero__content {
  justify-content: center;
}

.ta-hero--x-center .ta-hero__box {
  align-items: center;
  text-align: center;
}

.ta-hero--x-center .ta-hero__actions,
.ta-hero--x-center .ta-hero__points {
  justify-content: center;
}

/* ----- split: picture and text side by side ----- */

.ta-hero--split .ta-hero__media {
  aspect-ratio: 4 / 3;
}

.ta-hero--split .ta-hero__content {
  display: flex;
  align-items: center;
  padding: clamp(32px, 7vw, 88px) var(--ta-gutter);
}

@media (min-width: 750px) {
  .ta-hero--split .ta-hero__frame {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: var(--ta-hero-min);
  }

  .ta-hero--split .ta-hero__media {
    aspect-ratio: auto;
    order: 2;
  }

  .ta-hero--split .ta-hero__img,
  .ta-hero--split .ta-hero__video {
    position: absolute;
    inset: 0;
  }

  .ta-hero--split.ta-hero--media-left .ta-hero__media {
    order: 0;
  }

  .ta-hero--split .ta-hero__content {
    padding: clamp(40px, 6vw, 96px) clamp(32px, 6vw, 96px);
  }

  .ta-hero--split.ta-hero--media-right .ta-hero__content {
    justify-content: flex-end;
  }

  .ta-hero--split .ta-hero__box {
    width: 100%;
    max-width: 30em;
  }

  .ta-hero--split.ta-hero--y-bottom .ta-hero__content {
    align-items: flex-end;
  }
}

/* ----- card: a solid text card laid over the picture ----- */

.ta-hero--card .ta-hero__media {
  aspect-ratio: 4 / 3;
}

.ta-hero--card .ta-hero__content {
  padding: 0 var(--ta-gutter);
}

.ta-hero--card .ta-hero__box {
  position: relative;
  z-index: 1;
  margin-top: -48px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--ta-r-card, 0);
  background: var(--ta-bg);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--ta-fg) 55%, transparent);
}

@media (min-width: 750px) {
  .ta-hero--card .ta-hero__frame {
    min-height: var(--ta-hero-min);
  }

  .ta-hero--card .ta-hero__media,
  .ta-hero--card .ta-hero__content {
    grid-area: 1 / 1;
  }

  .ta-hero--card .ta-hero__media {
    aspect-ratio: auto;
  }

  .ta-hero--card .ta-hero__img,
  .ta-hero--card .ta-hero__video {
    position: absolute;
    inset: 0;
  }

  .ta-hero--card .ta-hero__content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--ta-page, 1200px);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) var(--ta-gutter);
  }

  .ta-hero--card.ta-hero--media-left .ta-hero__content {
    justify-content: flex-end;
  }

  .ta-hero--card.ta-hero--y-bottom .ta-hero__content {
    align-items: flex-end;
  }

  .ta-hero--card .ta-hero__box {
    max-width: 31em;
    margin-top: 0;
  }
}
