/* ==========================
   Hero
========================== */

.hero {
  position: relative;
  height: 40vh;
  min-height: 260px;
  overflow: hidden;

  /* Fallback */
  background-image:
    url("../../images/hero/richmond-skyline-hero.webp"), url("../../images/hero/richmond-skyline-hero.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform: translateY(15px);
}

.hero-title {
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: 8px;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-title::after {
  content: "";
  display: block;
  width: 240px;
  height: 3px;
  margin: 16px auto 0;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent-dark));
  transform: scaleX(0);
  transform-origin: center;
  animation: heroLineExpand 0.8s ease 0.15s forwards;
}

.hero-title.shrink-control::after {
  animation: none;
  transform: scaleX(var(--line-scale, 1));
}

@keyframes heroLineExpand {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}
