.homepage-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: min(58rem, calc(100vh - 4rem));
  padding: clamp(2rem, 3vw, 2.75rem) 0;
  background: linear-gradient(180deg, #081018 0%, #0b0f14 100%);
  color: #f8fafc;
}

.homepage-hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.homepage-hero__background::before,
.homepage-hero__background::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.homepage-hero__background::before {
  background:
    linear-gradient(
      0deg,
      #0f2a44 0%,
      rgba(15, 42, 68, 0) 50%,
      rgba(15, 42, 68, 0.6) 100%
    ),
    linear-gradient(
      90deg,
      rgba(3, 10, 7, 0.95) 0%,
      rgba(3, 10, 7, 0.8) 50%,
      rgba(3, 10, 7, 0.4) 100%
    );
}

.homepage-hero__background::after {
  top: auto;
  height: 70%;
  background: linear-gradient(180deg, rgba(11, 15, 20, 0) 0%, #0b0f14 61%);
}

.homepage-hero__background-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.26;
  filter: saturate(0.9) contrast(1.05);
}

.homepage-hero__background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  filter: saturate(0.92) contrast(1.03);
}

.homepage-hero__watermark {
  position: absolute;
  /* top: -96px; */
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: "rama-slab-c", serif;
  font-size: 40vw;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
  letter-spacing: clamp(0.125rem, 0.95vw, 1.25rem);
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(-50%) scaleY(1.2) scaleX(0.96);
  transform-origin: top center;
}

.homepage-hero__inner {
  /* position: relative; */
  width: min(
    var(--gilliam-law-homepage-max-width),
    calc(100% - (var(--gilliam-law-page-gutter) * 2))
  );
  min-height: min(61rem, calc(100vh - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gilliam-law-homepage-grid-gap);
  align-items: center;
}

.homepage-hero__content {
  grid-column: 1 / span 5;
  position: relative;
  z-index: 2;
  max-width: none;
  margin-left: 0;
  padding-top: clamp(10rem, 18vw, 13.625rem);
  padding-bottom: clamp(6rem, 12vw, 10rem);
}

.homepage-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #fba346;
  border-radius: 999px;
  background: rgba(251, 163, 70, 0.3);
  backdrop-filter: blur(3px);
  color: #ffd08e;
  font-family:
    "Proxima Nova", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.010625rem;
}

.homepage-hero__badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ffd08e;
  box-shadow: 0 0 0 0.35rem rgba(255, 208, 142, 0.12);
}

.homepage-hero__headline {
  margin: 0;
  display: grid;
  gap: 0;
  font-family: var(--gilliam-law-font-serif, "novantique-serif", serif);
  font-size: clamp(4rem, 6.5vw, 5.0625rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.homepage-hero__headline-primary,
.homepage-hero__headline-highlight {
  display: block;
}

.homepage-hero__headline-highlight {
  color: #5aaaed;
  font-style: italic;
}

.homepage-hero__subheadline {
  max-width: 30.125rem;
  margin-top: 1rem;
  color: #fff;
  font-family:
    "Proxima Nova", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.3;
}

.homepage-hero__subheadline > * {
  margin: 0;
}

.homepage-hero__actions {
  margin-top: 3rem;
}

.homepage-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 4.0625rem;
  padding: 1.5rem 3rem;
  border-radius: 0.25rem;
  background: #fba346;
  color: #2c2d2c;
  font-family:
    "Proxima Nova", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  box-shadow:
    0 8px 10px -6px rgba(251, 163, 70, 0.2),
    0 20px 25px -5px rgba(251, 163, 70, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.homepage-hero__cta:hover,
.homepage-hero__cta:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow:
    0 12px 16px -6px rgba(251, 163, 70, 0.24),
    0 26px 34px -7px rgba(251, 163, 70, 0.24);
}

.homepage-hero__cta-arrow {
  font-size: 1rem;
  line-height: 1;
}

.homepage-hero__media {
  grid-column: 6 / -1;
  position: absolute;
  min-height: 100vh;
  align-self: end;
  isolation: isolate;
  z-index: 1;
  width: 60%;
  right: 0;
  bottom: 0;
}

.homepage-hero__media.is-empty {
  display: none;
}

.homepage-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 15, 20, 0) 0%,
    rgba(11, 15, 20, 0.08) 54%,
    rgba(11, 15, 20, 0.4) 72%,
    rgba(11, 15, 20, 0.82) 88%,
    #0b0f14 100%
  );
  pointer-events: none;
  z-index: 5;
}

.homepage-hero__portrait {
  position: absolute;
  bottom: 0;
  /* Cap at ~80vh at 1080px viewport height; stop unbounded growth on very tall screens */
  height: min(80vh, calc(80% - 0.5rem), 864px);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
  z-index: 1;
  pointer-events: none;
}

.homepage-hero__portrait img {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.92) 82%,
    rgba(0, 0, 0, 0.56) 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.92) 82%,
    rgba(0, 0, 0, 0.56) 92%,
    transparent 100%
  );
}

.homepage-hero__portrait--left {
  left: 0;
  z-index: 1;
}

.homepage-hero__portrait--center {
  left: 45%;
  bottom: 0;
  z-index: 3;
  transform: translateX(-40%);
}

.homepage-hero__portrait--right {
  right: -100px;
  bottom: 0;
  z-index: 2;
}

.homepage-hero__scroll {
  position: absolute;
  right: 24px;
  bottom: 6.125rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 8;
  color: #ffb556;
  font-family:
    "Proxima Nova", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
}

.homepage-hero__scroll-label {
  display: inline-block;
  white-space: nowrap;
  transform: rotate(-90deg);
  transform-origin: center;
}

.homepage-hero__scroll-arrow {
  width: 1rem;
  height: 1rem;
  position: relative;
}

.homepage-hero__scroll-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.33px solid currentColor;
  border-bottom: 1.33px solid currentColor;
  transform: translate(-50%, -65%) rotate(45deg);
}

@media (max-width: 1180px) {
  .homepage-hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .homepage-hero__content {
    grid-column: 1 / -1;
    max-width: 42rem;
    margin-left: 0;
    padding-top: clamp(6rem, 10vw, 8rem);
    padding-bottom: 0;
  }

  .homepage-hero__media {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 42rem;
    min-height: clamp(24rem, 58vw, 34rem);
    margin-left: auto;
    margin-right: auto;
  }

  .homepage-hero__scroll {
    right: 1.5rem;
  }
}

@media (max-width: 820px) {
  .homepage-hero {
    min-height: auto;
  }

  .homepage-hero__watermark {
    inset: auto;
    top: 1.5rem;
    left: 50%;
    height: auto;
    display: block;
    width: 100vw;
    max-width: 100vw;
    font-size: clamp(4rem, 24vw, 8rem);
    letter-spacing: 0.04em;
    font-style: normal;
    transform: translateX(-50%);
  }

  .homepage-hero__content {
    max-width: none;
    margin-left: 0;
    padding-top: 4rem;
  }

  .homepage-hero__headline {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .homepage-hero__subheadline {
    font-size: 1rem;
  }

  .homepage-hero__cta {
    width: 100%;
    justify-content: center;
  }

  .homepage-hero__media {
    min-height: 24rem;
  }

  .homepage-hero__portrait--left {
    left: 0;
    display: none;
  }

  .homepage-hero__portrait--center {
    left: 50%;
    transform: translateX(-50%);
    display: none;
  }

  .homepage-hero__portrait--right {
    right: 0;
    display: none;
  }

  .homepage-hero__scroll {
    display: none;
  }
}
