/* Use the selected image's ratio and the visible window to size the frame. */
html body main > section.tbb-responsive-hero {
  --hero-gap: clamp(12px, 1.25vw, 24px);
  --hero-copy-budget: 128px;
  --hero-active-ratio: var(--hero-wide-ratio);
  --hero-image-limit: max(80px, calc(100svh - var(--tbb-header-height, 76px) - 2 * var(--hero-gap) - var(--hero-copy-budget) - 8px));
  box-sizing: border-box !important;
  display: block !important;
  position: relative;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: var(--hero-gap) 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: #fff !important;
}

html body main > section.tbb-responsive-hero::before,
html body main > section.tbb-responsive-hero::after {
  content: none !important;
}

.tbb-responsive-hero > .tbb-hero-inner {
  position: relative;
  width: min(100%, calc(var(--hero-image-limit) * var(--hero-active-ratio)));
  margin-inline: auto;
}

.tbb-hero-inner > .tbb-hero-visual {
  position: relative;
  isolation: isolate;
  aspect-ratio: var(--hero-active-ratio);
  background: #efeeea;
}

.tbb-responsive-hero .tbb-hero-visual > picture,
.tbb-responsive-hero .tbb-hero-visual > img,
.tbb-responsive-hero .tbb-hero-visual > picture > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

.tbb-responsive-hero .tbb-hero-copy {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: clamp(14px, 2.1vw, 30px) clamp(18px, 4vw, 54px) 0;
  color: #242320;
  font-size: clamp(25px, 3.5vw, 50px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.tbb-responsive-hero .tbb-hero-main-title {
  font-size: clamp(38px, 7vw, 72px);
}

@media (max-width: 640px) {
  html body main > section.tbb-responsive-hero {
    --hero-active-ratio: var(--hero-narrow-ratio, var(--hero-wide-ratio));
  }
}

@media (min-width: 641px) and (max-width: 1100px) and (orientation: portrait) {
  html body main > section.tbb-responsive-hero {
    --hero-active-ratio: var(--hero-portrait-ratio, var(--hero-wide-ratio));
  }
}

@media (min-width: 641px) and (orientation: landscape) and (min-height: 440px) {
  html body main > section.tbb-responsive-hero--home {
    --hero-copy-budget: 0px;
  }

  .tbb-responsive-hero--home .tbb-hero-visual::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 0;
    background: linear-gradient(90deg, #101713b3 0 46%, transparent 64%);
    mask-image: linear-gradient(0deg, #000 0 32%, transparent 53%);
    pointer-events: none;
  }

  .tbb-responsive-hero--home .tbb-hero-main-title {
    position: absolute;
    z-index: 4;
    inset: auto auto 9% 7%;
    width: 39%;
    padding: 0;
    color: #fff;
    font-size: clamp(30px, min(5.1vw, 8.8svh), 112px);
    text-shadow: 0 2px 20px #0009;
    text-wrap: wrap;
  }
}

@media (max-height: 439px) {
  html body main > section.tbb-responsive-hero {
    --hero-copy-budget: 96px;
  }
  .tbb-responsive-hero .tbb-hero-copy {
    padding-inline: 0;
    font-size: clamp(21px, 4vw, 30px);
  }
}
