/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 48px;
}

@media (min-width: 768px) {
  .hero {
    padding-block: 64px 0;
  }
}

@media (min-width: 1024px) {
  .hero {
    /* Allow photo to bleed to the viewport edge */
    overflow: visible;
    padding-top: 72px;
    padding-bottom: 0;
  }
}

.hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--surface-container-low);
  border-radius: 9999px 0 0 9999px;
  opacity: 0.5;
  z-index: -1;
  transform: translateX(25%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 40px;
    align-items: stretch;
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 36rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 1024px) {
  .hero__content {
    align-self: center;
    padding-bottom: 48px;
  }
}

.hero__title {
  color: var(--charcoal);
}

.hero__accent {
  color: var(--mint);
  position: relative;
  white-space: nowrap;
}

.hero__underline {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 12px;
  color: color-mix(in srgb, var(--coral) 30%, transparent);
}

.hero__text {
  color: var(--charcoal);
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

@media (min-width: 640px) {
  .hero__ctas {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 320px;
  width: 100%;
}

@media (min-width: 768px) {
  .hero__visual {
    min-height: 420px;
  }
}

@media (min-width: 1024px) {
  .hero__visual {
    --hero-edge-gap: 16px;
    /* Distance from content edge to near the viewport right edge */
    --hero-bleed: max(
      0px,
      calc(
        max(
          var(--margin-desktop),
          (100vw - var(--container-max)) / 2 + var(--margin-desktop)
        ) - var(--hero-edge-gap)
      )
    );
    min-height: 0;
    justify-content: flex-end;
    align-items: flex-end;
    align-self: stretch;
    width: calc(100% + var(--hero-bleed));
    margin-inline-end: calc(-1 * var(--hero-bleed));
  }
}

.organic-shape {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.hero__blob {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--primary-container) 20%, transparent);
  transform: scale(0.92);
  z-index: 0;
}

.hero__blob--alt {
  inset: 20px;
  background: color-mix(in srgb, var(--secondary-container) 12%, transparent);
  transform: scale(0.96) rotate(45deg);
}

.hero__photo {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero__photo {
    min-height: 400px;
  }
}

@media (min-width: 1024px) {
  .hero__photo {
    min-height: 0;
    justify-content: flex-end;
  }

  .hero__photo picture {
    display: block;
    width: 100%;
    line-height: 0;
  }
}

.hero__img {
  display: block;
  object-fit: contain;
  object-position: center bottom;
  width: auto;
  max-width: min(100%, 560px);
  height: auto;
  max-height: clamp(280px, 52vw, 520px);
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.12));
}

@media (min-width: 1024px) {
  .hero__img {
    object-position: right bottom;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
  }
}
