/*
  Home page section: Hero.
  Scoped to classes prefixed with `home-hero`.
*/

.home-hero {
  --hero-shift: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Prevent occasional 1px seams between sticky header and hero on narrow viewports. */
  margin-top: -1px;
  border-radius: 0;
  min-height: clamp(530px, 74vh, 820px);
  padding: clamp(2.2rem, 6vw, 4.2rem) 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #10243a;
  background-position: center calc(50% + var(--hero-shift));
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: none;
  transition: background-position 0.22s linear;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 95, 169, 0) 0%,
    rgba(0, 95, 169, 0.22) 36%,
    rgba(0, 95, 169, 0.56) 66%,
    rgba(0, 95, 169, 0.84) 84%,
    rgba(0, 95, 169, 0.95) 100%
  );
  z-index: 0;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-inline: auto;
  animation: homeHeroReveal 0.9s ease-out;
}

.home-hero-title {
  margin: 0 0 0.85rem;
  color: #ffffff;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.08;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  overflow-wrap: anywhere;
}

.home-hero-subtitle {
  margin: 0 auto;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.96rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
  overflow-wrap: anywhere;
}

.home-hero-cta {
  margin-top: 1.35rem;
  min-width: 220px;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background-color: #1f64b0;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 500;
  padding-inline: 1.4rem;
}

.home-hero-cta:hover,
.home-hero-cta:focus {
  background-color: #16518f;
  color: #ffffff;
}

.home-hero-cta:active,
.home-hero-cta.is-touch-active {
  background-color: #16518f;
  color: #ffffff;
}

.home-scroll-indicator {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.home-scroll-indicator span {
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  animation: homeScrollHint 1.5s ease-in-out infinite;
}

@keyframes homeHeroReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes homeScrollHint {
  0% {
    transform: translateY(0);
    opacity: 0.95;
  }
  70% {
    transform: translateY(12px);
    opacity: 0.28;
  }
  100% {
    transform: translateY(0);
    opacity: 0.95;
  }
}

@media (max-width: 900px) {
  .home-hero {
    min-height: 68vh;
  }

  .home-hero-title {
    font-size: clamp(1.6rem, 5.2vw, 2.4rem);
  }

  .home-hero-subtitle {
    font-size: clamp(0.9rem, 3.4vw, 1.08rem);
  }

  .home-hero-cta {
    min-width: 190px;
    min-height: 52px;
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  .home-hero {
    border-radius: 0;
    min-height: 62vh;
    background-position: 48% center;
  }

  .home-hero-content {
    max-width: 92%;
  }

  .home-scroll-indicator {
    display: none;
  }
}

@media (max-width: 420px) {
  .home-hero {
    min-height: 58vh;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .home-hero-title {
    font-size: clamp(1.55rem, 8.2vw, 2.1rem);
  }

  .home-hero-subtitle {
    font-size: clamp(0.88rem, 4.3vw, 1rem);
    line-height: 1.5;
  }

  .home-hero-cta {
    min-width: 162px;
    min-height: 48px;
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero {
    transition: none !important;
  }
}
