/* ===================== HERO ===================== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
}

/* Soft white halo at the top-center — blends the sky behind the logo & nav */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(150%, 1750px);
  height: clamp(380px, 58%, 760px);
  background: radial-gradient(ellipse 62% 100% at 50% 0%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.70) 44%,
    rgba(255, 255, 255, 0.30) 66%,
    rgba(255, 255, 255, 0) 82%);
  z-index: 1;
  pointer-events: none;
}

/* Smooth fade from the hero floor into the white section below */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(110px, 18vh, 220px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 90%);
  z-index: 1;
  pointer-events: none;
}

/* Soft white halo at the top-left — blends the sky behind the brand logo */
.hero-splash {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(420px, 40vw, 760px);
  height: clamp(320px, 36vh, 560px);
  background: radial-gradient(ellipse 60% 64% at 16% 16%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.66) 38%,
    rgba(255, 255, 255, 0.30) 58%,
    rgba(255, 255, 255, 0) 80%);
  z-index: 1;
  pointer-events: none;
}

/* Full background scene — shown whole (not cropped) */
.hero-bg {
  display: block;
  width: 100%;
}

.hero-bg--pc img {
  width: 100%;
  height: auto;
  display: block;
}

/* phone slideshow hidden on desktop */
.hero-bg--phone { display: none; }

/* Headline sits in the white space above the machines */
.hero-heading {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(95%, 1180px);
  text-align: center;
  z-index: 2;
  animation: heroFadeDown 0.9s ease both;
}

.hero-title {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.3vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #0f2a4d;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.6);
}

.hero-subtitle {
  margin: 0.7em auto 0;
  max-width: 640px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  color: #335173;
}

/* Tagline near the bottom */
.hero-tagline {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  padding: 0 16px;
  z-index: 2;
  animation: heroFadeUp 1s ease 0.25s both;
}

.hero-tagline img {
  width: clamp(280px, 64vw, 920px);
  height: auto;
}

/* Animations */
@keyframes heroFadeDown {
  from { opacity: 0; transform: translate(-50%, -22px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  /* On phones: title sits a bit lower near the top, subtitle drops to the
     bottom area. The heading spans the whole hero and uses space-between. */
  .hero-heading {
    top: 0;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    padding: 31% 18px 9%;
    box-sizing: border-box;
    animation: none;
  }
  .hero-title {
    order: 1;
    font-size: clamp(1.55rem, 6.2vw, 2.1rem);
  }
  .hero-subtitle {
    order: 2;
    margin-top: auto;   /* push the subtitle down to the bottom area */
    max-width: 90%;
  }

  /* swap the single desktop image for the phone slideshow */
  .hero-bg--pc { display: none; }
  .hero-bg--phone {
    display: block;
    position: relative;
    width: 100%;
  }

  /* invisible sizer sets the section height from the image's ratio */
  .hero-sizer {
    width: 100%;
    height: auto;
    display: block;
    visibility: hidden;
  }

  /* stacked slides crossfade slowly and smoothly */
  .hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
    will-change: opacity;
  }
  .hero-slide.is-active {
    opacity: 1;
  }
}
