/* Bespoke hero banner
   Overrides SectionUi's standard full-photo hero.
*/

/* --------------------------------------------------------------------------
   Hero layout
   -------------------------------------------------------------------------- */

.page-section--hero_banner {
 padding: 0;

 .page-section__inner {
   position: relative;
   display: flex;
   align-items: stretch;
   justify-content: stretch;

   width: 100%;
   max-width: 1440px;

   /* Fill the viewport on laptop-sized screens,
      but don't grow excessively on large desktop displays */
   min-height: calc(100svh - var(--height-nav));

   margin-inline: auto;
   padding: 40px 64px 48px;

   z-index: 10;
 }
}

.hero-banner {
 position: relative;

 min-height: min(
   calc(100svh - var(--height-nav)),
   640px
 );

 overflow: hidden;
}

/* --------------------------------------------------------------------------
   Background
   -------------------------------------------------------------------------- */

.hero-banner__media-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-banner__background {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  /* Remove SectionUi's default image zoom */
  transform: none;
}

.hero-banner__background--empty {
  background: var(--color-hero-background);
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
}

/* --------------------------------------------------------------------------
   Content layout
   -------------------------------------------------------------------------- */

.hero-banner__content {
  position: relative;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "eyebrow eyebrow"
    ".       ."
    "title   details";

  width: 100%;
  max-width: none;

  gap: 0;
  margin: 0;

  align-items: end;

  color: var(--color-hero-content);
  text-align: left;
}

/* Neutralize spacing utilities from the generic hero */
.hero-banner__content > * {
  margin-block-start: 0;
}

/* --------------------------------------------------------------------------
   Eyebrow
   -------------------------------------------------------------------------- */

.hero-banner__eyebrow {
  grid-area: eyebrow;

  margin: 0;

  color: var(--color-hero-content);
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.2;

  letter-spacing: 0.155em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */

.hero-banner__title {
  grid-area: title;

  position: relative;

  max-width: 720px;
  margin: 0;
  padding-top: 18px;

  color: var(--color-hero-content);
  font-family: var(--font-heading);

  font-size: clamp(3rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 0.97;
  letter-spacing: -0.015em;

  text-align: left;
  text-transform: none;
}

/* Accent signal above the title */
.hero-banner__title::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 32px;
  height: 3px;

  background: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Supporting copy
   -------------------------------------------------------------------------- */

.hero-banner__subtitle {
  grid-area: details;

  align-self: end;

  margin: 0 0 3rem;

  color: var(--color-hero-content);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;

  text-align: left;
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.hero-banner__actions {
  grid-area: details;

  align-self: end;

  display: flex;
  flex-wrap: nowrap;

  margin: 0;
  padding: 0;

  gap: 0;
}

/* Turn the standard .btn.accent into an editorial link */
.hero-banner__actions .btn.accent {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  width: fit-content;
  height: auto;

  padding: 0 0 6px;

  background: transparent;
  border: 0;
  border-bottom: 1px solid
    color-mix(in srgb, var(--color-hero-content) 46%, transparent);
  border-radius: 0;
  box-shadow: none;

  color: var(--color-hero-content);

  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;

  text-transform: none;
}

.hero-banner__actions .btn.accent::after {
  content: "↗";

  color: var(--color-hero-content);
  font-size: 1rem;
  line-height: 1;
}

.hero-banner__actions .btn.accent:hover {
  background: transparent;
  color: var(--color-hero-content);

  border-bottom-color: var(--color-hero-content);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .page-section--hero_banner {
    .page-section__inner {
      padding: 32px 32px 40px;
    }
  }

  .hero-banner__content {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .hero-banner__title {
    max-width: 620px;
    font-size: clamp(2.75rem, 5.5vw, 3.5rem);
  }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .page-section--hero_banner {
    .page-section__inner {
      min-height: calc(100svh - var(--height-nav));
      padding: 24px 20px;
    }
  }

  .hero-banner {
    min-height: calc(100svh - var(--height-nav));
  }

  .hero-banner__content {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas:
      "eyebrow eyebrow"
      ".       ."
      "title   title"
      "details details";

    align-items: end;
  }

  .hero-banner__eyebrow {
    font-size: 0.625rem;
  }

  .hero-banner__title {
    max-width: 100%;
    padding-top: 14px;

    font-size: clamp(2.25rem, 10vw, 2.75rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
  }

  .hero-banner__title::before {
    width: 26px;
  }

  .hero-banner__subtitle {
    margin-top: 18px;
    margin-bottom: 0;
    padding-right: 1rem;

    font-size: 0.6875rem;
    line-height: 1.5;
  }

  .hero-banner__actions {
    justify-self: end;

    margin-top: 18px;
  }

  .hero-banner__actions .btn.accent {
    font-size: 0.8125rem;
  }
}
