/* ===========================================
   FLOWBRAIN — Hero Section
   Modernized asymmetric layout, Aurora Dark
   =========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}

/* ---- Background image ---- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 110%;
  height: 110%;
  object-fit: cover;
  opacity: 0.45;
  will-change: transform;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(5, 5, 16, 0.85) 0%,
      rgba(5, 5, 16, 0.3) 40%,
      rgba(5, 5, 16, 0.3) 60%,
      rgba(5, 5, 16, 0.9) 100%
    );
  z-index: 1;
}

/* ---- Particle canvas overlay ---- */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 2s ease;
}

.hero__particles.is-fading {
  opacity: 0;
}

/* ---- Grid layout (asymmetric) ---- */
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: var(--z-content);
  padding: 120px 0 100px;
}

/* ---- Content (left column) ---- */
.hero__content {
  max-width: 700px;
}

/* ---- Title ---- */
.hero__title {
  font-size: var(--hero-size);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 24px;
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(60px);
  animation: heroTextReveal 0.8s var(--ease-out) forwards;
  color: var(--color-text-primary);
}

.hero__title-line:nth-child(1) {
  animation-delay: 0.3s;
}

.hero__title-line:nth-child(2) {
  animation-delay: 0.5s;
}

.hero__title-line:nth-child(3) {
  animation-delay: 0.7s;
}

.hero__title-line--accent {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes heroTextReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Subtitle ---- */
.hero__subtitle {
  animation: fadeUp 0.6s var(--ease-out) 0.9s both;
  max-width: 560px;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ---- Actions ---- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeUp 0.6s var(--ease-out) 1.1s both;
}

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

/* ---- Trust badges (right column, desktop only) ---- */
.hero__badges {
  position: relative;
  height: 100%;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding-left: 40px;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  white-space: nowrap;
  opacity: 0;
  animation: badgeFloat 0.6s var(--ease-out) forwards;
}

.hero__badge--1 {
  animation-delay: 1s;
}

.hero__badge--2 {
  animation-delay: 1.2s;
}

.hero__badge--3 {
  animation-delay: 1.4s;
}

/* Continuous floating orbit after entrance */
.hero__badge--1 {
  animation: badgeFloat 0.6s var(--ease-out) 1s forwards,
             badgeOrbit1 6s ease-in-out 1.6s infinite;
}

.hero__badge--2 {
  animation: badgeFloat 0.6s var(--ease-out) 1.2s forwards,
             badgeOrbit2 7s ease-in-out 1.8s infinite;
}

.hero__badge--3 {
  animation: badgeFloat 0.6s var(--ease-out) 1.4s forwards,
             badgeOrbit3 8s ease-in-out 2s infinite;
}

@keyframes badgeFloat {
  from {
    opacity: 0;
    transform: translateX(40px) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes badgeOrbit1 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-8px) translateX(6px); }
}

@keyframes badgeOrbit2 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(6px) translateX(-8px); }
}

@keyframes badgeOrbit3 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-6px) translateX(-4px); }
}

.hero__badge-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ---- Label dot (kept for compatibility) ---- */
.hero__label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(0, 200, 150, 0.6);
  animation: glowPulse 3s ease-in-out infinite;
}

/* ---- Scroll indicator ---- */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(0, 200, 150, 0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; height: 48px; }
  50% { opacity: 0.3; height: 32px; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 767px) {
  .hero__grid {
    grid-template-columns: 1fr;
    padding: 140px 0 60px;
  }

  .hero__badges {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.25rem, 9vw, 3rem);
  }

  .hero__scroll {
    display: none;
  }
}
