/* Ebenezer general hero, selectively ported into the ACU theme.
   Every selector is namespaced so legacy Bootstrap and ACU component styles
   cannot change the new hero, and the new hero cannot change legacy pages. */

.acu-ebenezer-hero {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  margin: 0;
  background-color: var(--acu-hero-purple);
  color: var(--acu-white);
}

.acu-ebenezer-hero--clip-overflow {
  overflow: hidden;
}

.acu-ebenezer-hero__clip-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.acu-ebenezer-hero__container {
  --acu-ebenezer-hero-gutter: var(--space-xl);
  --acu-ebenezer-hero-breakout: 0px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5.75fr) minmax(0, 5.25fr);
  gap: var(--space-3xl);
  align-items: center;
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding: var(--space-3xl) var(--acu-ebenezer-hero-gutter);
}

@supports (width: 100cqw) {
  .acu-ebenezer-hero__container {
    --acu-ebenezer-hero-breakout: max(
      0px,
      calc((100cqw - var(--container-xl)) / 2)
    );
  }
}

.acu-ebenezer-hero__content {
  position: relative;
  z-index: 1;
}

.acu-ebenezer-hero__content h1 {
  margin: 0;
  color: inherit;
  font-family: var(--font-serif);
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-transform: none;
}

.acu-ebenezer-hero__subheading {
  display: block;
  margin: var(--space-sm) 0 0;
  color: inherit;
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

.acu-ebenezer-hero__description {
  max-width: 46ch;
  margin-top: var(--space-lg);
  color: var(--acu-white);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: var(--leading-relaxed);
}

.acu-ebenezer-hero__description p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.acu-ebenezer-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.acu-ebenezer-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 2.625rem;
  margin: 0;
  padding: 0.8125rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out);
}

.acu-ebenezer-hero__button:hover,
.acu-ebenezer-hero__button:focus-visible {
  text-decoration: none;
}

.acu-ebenezer-hero__button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.acu-ebenezer-hero__button--primary,
.acu-ebenezer-hero__button--primary:hover,
.acu-ebenezer-hero__button--primary:focus-visible {
  border-color: var(--acu-citrus-orange);
  background-color: var(--acu-citrus-orange);
  color: var(--acu-midnight-purple);
}

.acu-ebenezer-hero__button--primary:hover {
  border-color: var(--acu-sunset-orange);
  background-color: var(--acu-sunset-orange);
}

.acu-ebenezer-hero__button--secondary {
  border-color: color-mix(in srgb, currentColor 35%, transparent);
  background-color: transparent;
  color: inherit;
}

.acu-ebenezer-hero__button--secondary:hover,
.acu-ebenezer-hero__button--secondary:focus-visible {
  border-color: currentColor;
  background-color: transparent;
  color: inherit;
}

.acu-ebenezer-hero__media {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(
    calc(
      100% +
      var(--acu-ebenezer-hero-gutter) +
      var(--acu-ebenezer-hero-breakout)
    ),
    calc(
      38.6667rem +
      var(--acu-ebenezer-hero-gutter) +
      var(--acu-ebenezer-hero-breakout)
    )
  );
  min-width: 0;
  margin-right: calc(
    -1 * var(--acu-ebenezer-hero-gutter) -
    var(--acu-ebenezer-hero-breakout)
  );
  aspect-ratio: 7 / 5;
}

.acu-ebenezer-hero__media--has-video {
  cursor: pointer;
}

.acu-ebenezer-hero__media-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #0d0925;
  -webkit-clip-path: url("#acu-ebenezer-hero-left-arc-frame");
  clip-path: url("#acu-ebenezer-hero-left-arc-frame");
}

.acu-ebenezer-hero__media--frame-rounded-arch .acu-ebenezer-hero__media-frame {
  -webkit-clip-path: url("#acu-ebenezer-hero-left-rounded-arch-frame");
  clip-path: url("#acu-ebenezer-hero-left-rounded-arch-frame");
}

.acu-ebenezer-hero__media--alignment-container {
  width: min(100%, 38.6667rem);
  margin-right: 0;
}

.acu-ebenezer-hero__media--alignment-container .acu-ebenezer-hero__media-frame {
  -webkit-clip-path: url("#acu-ebenezer-hero-arc-frame");
  clip-path: url("#acu-ebenezer-hero-arc-frame");
}

.acu-ebenezer-hero__media--alignment-container.acu-ebenezer-hero__media--frame-rounded-arch .acu-ebenezer-hero__media-frame {
  -webkit-clip-path: url("#acu-ebenezer-hero-rounded-arch-frame");
  clip-path: url("#acu-ebenezer-hero-rounded-arch-frame");
}

.acu-ebenezer-hero__media-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.acu-ebenezer-hero__ambient,
.acu-ebenezer-hero__poster,
.acu-ebenezer-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
}

.acu-ebenezer-hero__media-image--focused {
  transform: scale(1.2);
  transform-origin: var(--acu-ebenezer-hero-focus, 50% 50%);
}

.acu-ebenezer-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0;
  padding: 0;
  translate: -50% -50%;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--acu-white);
  color: var(--acu-midnight-purple);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: scale var(--motion-fast) var(--ease-out);
}

.acu-ebenezer-hero__play:hover {
  scale: 1.08;
}

.acu-ebenezer-hero__play:focus-visible,
.acu-ebenezer-hero__ambient-toggle:focus-visible {
  outline: 3px solid var(--acu-citrus-orange);
  outline-offset: 3px;
}

.acu-ebenezer-hero__play svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.1875rem;
}

.acu-ebenezer-hero__ambient-toggle {
  position: absolute;
  right: 14%;
  bottom: 14%;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--acu-wildcat-purple);
  color: var(--acu-white);
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-out);
}

.acu-ebenezer-hero__ambient-toggle:hover {
  background-color: var(--acu-vibrant-purple);
}

.acu-ebenezer-hero__ambient-toggle svg {
  width: 0.875rem;
  height: 0.875rem;
}

.acu-ebenezer-hero__ambient-toggle .acu-ebenezer-hero__icon-play,
.acu-ebenezer-hero__ambient-toggle[data-state="paused"] .acu-ebenezer-hero__icon-pause {
  display: none;
}

.acu-ebenezer-hero__ambient-toggle[data-state="paused"] .acu-ebenezer-hero__icon-play {
  display: block;
}

.acu-ebenezer-hero__dialog {
  width: min(72rem, calc(100vw - 2 * var(--space-lg)));
  max-width: none;
  max-height: calc(100dvh - 2 * var(--space-lg));
  margin: auto;
  padding: var(--space-md);
  overflow: auto;
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--acu-midnight-purple);
  color: var(--acu-white);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--acu-white) 14%, transparent),
    0 1.5rem 4rem rgba(11, 7, 34, 0.45);
}

.acu-ebenezer-hero__dialog::backdrop {
  background-color: rgba(20, 13, 53, 0.88);
  backdrop-filter: blur(0.25rem);
}

.acu-ebenezer-hero__dialog a {
  color: inherit;
}

.acu-ebenezer-hero__dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.acu-ebenezer-hero__dialog-eyebrow {
  margin: 0;
  color: color-mix(in srgb, var(--acu-white) 82%, transparent);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-widest);
  line-height: var(--leading-normal);
  text-transform: uppercase;
}

.acu-ebenezer-hero__dialog-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: var(--space-xs);
  border: 1px solid color-mix(in srgb, var(--acu-white) 30%, transparent);
  border-radius: var(--radius-full);
  background-color: color-mix(in srgb, var(--acu-white) 8%, transparent);
  color: var(--acu-white);
  cursor: pointer;
}

.acu-ebenezer-hero__dialog-close:hover {
  border-color: color-mix(in srgb, var(--acu-white) 55%, transparent);
  background-color: color-mix(in srgb, var(--acu-white) 16%, transparent);
}

.acu-ebenezer-hero__dialog-close:focus-visible {
  outline: 2px solid var(--acu-white);
  outline-offset: 3px;
}

.acu-ebenezer-hero__dialog-close svg {
  width: 1rem;
  height: 1rem;
}

.acu-ebenezer-hero__dialog-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  background-color: #0d0925;
}

.acu-ebenezer-hero__video-description {
  max-width: 72ch;
  margin: var(--space-md) 0 0;
  color: color-mix(in srgb, var(--acu-white) 78%, transparent);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.acu-ebenezer-hero__video-description strong {
  color: var(--acu-citrus-orange);
}

.acu-ebenezer-hero__transcript {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid color-mix(in srgb, var(--acu-white) 20%, transparent);
}

.acu-ebenezer-hero__transcript a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-sm);
  align-items: center;
  width: fit-content;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  text-decoration: none;
}

.acu-ebenezer-hero__transcript svg {
  grid-row: span 2;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--acu-citrus-orange);
}

.acu-ebenezer-hero__transcript span {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.acu-ebenezer-hero__transcript small {
  color: color-mix(in srgb, var(--acu-white) 62%, transparent);
  font-size: var(--text-xs);
  font-weight: var(--font-regular);
}

.acu-ebenezer-hero--no-media .acu-ebenezer-hero__container {
  grid-template-columns: minmax(0, 1fr);
}

.acu-ebenezer-hero--no-media .acu-ebenezer-hero__content {
  max-width: var(--container-text);
  margin-inline: auto;
  text-align: center;
}

.acu-ebenezer-hero--no-media .acu-ebenezer-hero__description {
  margin-inline: auto;
}

.acu-ebenezer-hero--no-media .acu-ebenezer-hero__actions {
  justify-content: center;
}

/* Sticker overlay */

.acu-ebenezer-sticker {
  --sticker-size: 11rem;
  --sticker-tilt: 0deg;
  position: absolute;
  /* Keep the sticker between the hero background and foreground without a
     negative stacking layer, which Safari can clip during compositing. */
  z-index: 0;
  bottom: calc(var(--sticker-size) / -2);
  width: var(--sticker-size);
  height: var(--sticker-size);
  pointer-events: none;
  transform: rotate(var(--sticker-tilt));
  transform-origin: center;
}

.acu-ebenezer-sticker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.acu-ebenezer-sticker--small { --sticker-size: 7rem; }
.acu-ebenezer-sticker--medium { --sticker-size: 11rem; }
.acu-ebenezer-sticker--large { --sticker-size: 16rem; }
.acu-ebenezer-sticker--bottom-left { left: var(--space-xl); }
.acu-ebenezer-sticker--bottom-right { right: var(--space-xl); }

.acu-ebenezer-sticker--bottom-center {
  left: 50%;
  transform: translateX(-50%) rotate(var(--sticker-tilt));
}

.acu-ebenezer-sticker--tilt-left { --sticker-tilt: -8deg; }
.acu-ebenezer-sticker--tilt-none { --sticker-tilt: 0deg; }
.acu-ebenezer-sticker--tilt-right { --sticker-tilt: 8deg; }

@media (max-width: 1023px) {
  .acu-ebenezer-hero__container {
    --acu-ebenezer-hero-gutter: var(--space-lg);
    gap: var(--space-2xl);
    padding-block: var(--space-2xl) var(--space-3xl);
  }
}

@media (max-width: 47.9375rem) {
  .acu-ebenezer-hero__container {
    grid-template-columns: 1fr;
  }

  .acu-ebenezer-hero__content {
    max-width: 46ch;
  }
}

/* On larger desktop displays, return the media to the centered content grid
   and restore the complete ACU frame. */
@media (min-width: 1921px) {
  .acu-ebenezer-hero__media {
    width: min(100%, 38.6667rem);
    margin-right: 0;
  }

  .acu-ebenezer-hero__media-frame {
    -webkit-clip-path: url("#acu-ebenezer-hero-arc-frame");
    clip-path: url("#acu-ebenezer-hero-arc-frame");
  }

  .acu-ebenezer-hero__media--frame-rounded-arch .acu-ebenezer-hero__media-frame {
    -webkit-clip-path: url("#acu-ebenezer-hero-rounded-arch-frame");
    clip-path: url("#acu-ebenezer-hero-rounded-arch-frame");
  }
}

@media (max-width: 639px) {
  .acu-ebenezer-hero__dialog {
    width: calc(100vw - 2 * var(--space-sm));
    max-height: calc(100dvh - 2 * var(--space-sm));
  }

  .acu-ebenezer-sticker--large {
    --sticker-size: 12rem;
  }

  .acu-ebenezer-sticker--bottom-left { left: var(--space-lg); }
  .acu-ebenezer-sticker--bottom-right { right: var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
  .acu-ebenezer-hero__button,
  .acu-ebenezer-hero__play,
  .acu-ebenezer-hero__ambient-toggle {
    transition: none;
  }
}
