/* ==========================================================================
   SebaGhar — Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block-start: calc(var(--header-height) + var(--space-16));
  padding-block-end: var(--space-24);
  overflow: hidden;
  isolation: isolate;
}

@media (max-width: 767px) {
  .hero {
    padding-block-start: calc(var(--header-height) + var(--space-10));
    padding-block-end: var(--space-16);
  }
}

/* -- Background layer -----------------------------------------------------
   Soft ambient gradient + blurred blobs + faint grid. Sits behind content,
   pointer-events disabled, decorative only. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg-gradient {
  position: absolute;
  inset: -10%;
  background: linear-gradient(
    120deg,
    var(--color-bg) 0%,
    var(--color-primary-50) 38%,
    #EFFBF3 62%,
    var(--color-bg) 100%
  );
  background-size: 200% 200%;
  animation: gradientDrift var(--duration-ambient) ease-in-out infinite alternate;
}

@keyframes gradientDrift {
  from { background-position: 0% 30%; }
  to { background-position: 100% 70%; }
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 20%, black 20%, transparent 75%);
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.hero__blob--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: rgba(var(--color-primary-rgb), 0.28);
  animation: floatBlob 16s var(--ease-in-out) infinite;
}

.hero__blob--2 {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: -60px;
  background: rgba(var(--color-secondary-rgb), 0.22);
  animation: floatBlob 20s var(--ease-in-out) infinite reverse;
}

.hero__blob--3 {
  width: 220px;
  height: 220px;
  top: 40%;
  left: 55%;
  background: rgba(var(--color-accent-rgb), 0.18);
  animation: floatBlob 18s var(--ease-in-out) infinite;
  animation-delay: -4s;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.06); }
  66% { transform: translate(-18px, 14px) scale(0.96); }
}

/* -- Layout ------------------------------------------------------------- */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-12);
  }
}

.hero__content {
  max-width: 620px;
}

@media (min-width: 1024px) {
  .hero__content {
    max-width: none;
  }
}

.hero__eyebrow {
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 80ms;
  margin-bottom: var(--space-5);
}

.hero__headline {
  font-size: clamp(2rem, 4.6vw, var(--fs-5xl));
  line-height: var(--lh-tight);
  margin-bottom: var(--space-5);
}

.hero__headline-line {
  display: block;
  overflow: hidden;
}

.hero__headline-line span {
  display: block;
  opacity: 0;
  transform: translateY(110%);
  animation: heroLineReveal var(--duration-slow) var(--ease-out) forwards;
}

.hero__headline-line:nth-child(1) span { animation-delay: 160ms; }
.hero__headline-line:nth-child(2) span { animation-delay: 280ms; }

.hero__headline .accent-text {
  color: var(--color-primary);
}

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

.hero__description {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 420ms;
}

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

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 560ms;
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .hero__actions .btn {
    width: 100%;
  }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-10);
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 680ms;
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.hero__meta-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* -- Illustration --------------------------------------------------------- */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 320ms;
}

.hero__visual-inner {
  width: 100%;
  max-width: 480px;
  animation: illustrationFloat 7s var(--ease-in-out) infinite;
  will-change: transform;
}

@keyframes illustrationFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Pointer-parallax target layers (transform set via JS, desktop only) */
.parallax-layer {
  transition: transform 120ms linear;
}

/* -- Scroll indicator ------------------------------------------------------- */
.hero__scroll-cue {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  opacity: 0;
  animation: heroFadeUp var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 820ms;
}

@media (max-width: 767px) {
  .hero__scroll-cue {
    display: none;
  }
}

.hero__scroll-cue-icon {
  width: 22px;
  height: 34px;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.hero__scroll-cue-dot {
  width: 4px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  animation: scrollDot 1.8s var(--ease-in-out) infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-gradient,
  .hero__blob,
  .hero__visual-inner,
  .hero__scroll-cue-dot {
    animation: none !important;
  }

  .hero__eyebrow,
  .hero__headline-line span,
  .hero__description,
  .hero__actions,
  .hero__meta,
  .hero__visual,
  .hero__scroll-cue {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
