/* ===== HERO ===== */

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

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

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.9;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 28, 18, 0.45) 0%,
    rgba(12, 45, 28, 0.35) 50%
  );
}

/* CANVAS — Three.js listići */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  contain: strict;
}

/* GRAIN */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* INNER */
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 120px 5vw 80px;
  width: 100%;
  text-align: center;
}

/* TITLE */
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.06;
  max-width: 760px;
  margin: 0 auto 24px;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.38s ease forwards;
}

.hero__title span {
  color: var(--color-primary-light);
  font-style: italic;
}

/* SUBTITLE */
.hero__sub {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
  line-height: 1.8;
  font-weight: 300;
  margin: 0 auto 44px;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.54s ease forwards;
}

/* ACTIONS */
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.68s ease forwards;
}

/* ANIMACIJE */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.4);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
  }

  .hero__inner {
    padding: 100px 24px 60px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .hero__stats {
    flex-direction: column;
    width: 100%;
  }
  .hero__stat + .hero__stat::before {
    left: 20%;
    right: 20%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* Hero pokriva ceo viewport — ne treba body padding-top offset */
.hero {
  margin-top: -80px;
}
