/* =================================================================
   Hero Section Block
   Figma: headline left, description + CTA right; 100vh sticky, fade on scroll
   ================================================================= */

.hero-section {
  --hero-section-bg-1: #0f172a;
  --hero-section-bg-2: #1e3a5f;
  --hero-section-bg-3: #0c4a6e;
  --hero-section-accent: rgba(14, 165, 233, 0.25);
  --hero-section-text: #ffffff;
z-index: 0;
  height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  min-height: 500px;
  max-height: 620px;
}

@media (min-width: 992px){
  .hero-section{
    /* position: sticky; */
    /* top: 0; */
  }
}
.hero-section:not(.has-video):not(.hero-section--css-anim) {
  display: none;
}

.hero-section__video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150%;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

.hero-section__video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

.hero-section.has-video .hero-section__bg {
  background-color: rgba(15, 23, 42, 0.6);
  background-blend-mode: multiply;
  display: none;
}

.hero-section__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--hero-section-accent) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 30%, rgba(59, 130, 246, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 50% 80%, rgba(30, 58, 95, 0.9) 0%, transparent 50%),
    linear-gradient(180deg, var(--hero-section-bg-1) 0%, var(--hero-section-bg-2) 40%, var(--hero-section-bg-3) 100%);
  pointer-events: none;
}

.hero-section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  will-change: opacity, transform;
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.hero-section__container {
  display: flex;
  justify-content: space-between;
  gap: 2rem 5rem;
  align-items: end;
  width: 100%;
}

.hero-section__headline-wrap {
  min-width: 0;
}

.hero-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7.3vw, 3.9rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--hero-section-text);
  -webkit-font-smoothing: antialiased;
  max-width: 52vw;
  opacity: 0;
}

.hero-section__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  min-width: 0;
  text-align: left;
  max-width: 24rem;
}

.hero-section__text {
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--hero-section-text);
  opacity: 0;
  max-width: 28rem;
  animation: heroSectionFadeIn 0.6s ease-out 0.2s forwards;
  margin-bottom: 1rem;
}

.hero-section__text p {
  margin: 0 0 0.5rem;
}

.hero-section__text p:last-child {
  margin-bottom: 0;
}

.hero-section__cta {
  opacity: 0;
  animation: heroSectionFadeIn 0.6s ease-out 0.3s forwards;
}

@keyframes heroSectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Next section overlays hero */
.hero-section + * {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 991px) {
  .hero-section__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    flex-direction: column;
  }

  .hero-section__aside {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .hero-section {
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }

  .hero-section__title {
    font-size: 2.6rem;
    max-width: 100%;
  }
  .hero-section__text{
    font-size: 1.2rem;
    line-height: 1.3
  }

  .hero-section__aside {
    gap: 2.25rem;
    padding-bottom: 2rem;
  }
}

/* =================================================================
   CSS Animation Background (dark mesh gradient)
   ================================================================= */

.hero-section--css-anim .hero-section__bg {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 119, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 30%, rgba(30, 50, 120, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 50% 80%, rgba(0, 80, 180, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #1a1a2e 0%, #111128 40%, #0d0d20 100%);
}

.hero-section__css-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-section__css-bg span {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}

.hero-section__css-bg span:nth-child(1) {
  top: 10%;
  left: 15%;
  width: 50vw;
  height: 50vw;
  background: rgba(0, 119, 255, 0.4);
  filter: blur(100px);
  animation: heroSectionDrift1 20s ease-in-out infinite alternate;
}

.hero-section__css-bg span:nth-child(2) {
  top: 60%;
  left: 60%;
  width: 40vw;
  height: 40vw;
  background: rgba(0, 80, 180, 0.35);
  filter: blur(120px);
  animation: heroSectionDrift2 25s ease-in-out infinite alternate;
}

.hero-section__css-bg span:nth-child(3) {
  top: 30%;
  left: 70%;
  width: 45vw;
  height: 45vw;
  background: rgba(30, 50, 120, 0.3);
  filter: blur(90px);
  animation: heroSectionDrift3 18s ease-in-out infinite alternate;
}

.hero-section__css-bg span:nth-child(4) {
  top: 70%;
  left: 20%;
  width: 35vw;
  height: 35vw;
  background: rgba(0, 150, 255, 0.2);
  filter: blur(110px);
  animation: heroSectionDrift4 22s ease-in-out infinite alternate;
}

@keyframes heroSectionDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20vw, 15vw) scale(1.2); }
}

@keyframes heroSectionDrift2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-25vw, -10vw) scale(0.8); }
}

@keyframes heroSectionDrift3 {
  0%   { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(-15vw, 20vw) scale(1.15); }
}

@keyframes heroSectionDrift4 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(18vw, -12vw) scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-section__inner {
    will-change: auto;
    transition: none;
  }

  .hero-section__title,
  .hero-section__cta {
    opacity: 1;
    animation: none;
  }

  .hero-section__text {
    opacity: 0.92;
    animation: none;
  }

  .hero-section__css-bg span {
    animation: none !important;
  }
}
