/* ============================================================
   HERO — Terra Design Studio
   Full-viewport image with text overlay + slide counter
   ============================================================ */

.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--clr-dark);
}

/* ── Slides ───────────────────────────────────────────────── */
.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 1.2s ease-in-out;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero__slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s var(--ease-out);
}

.hero__slide.is-active .hero__slide-img {
  transform: scale(1);
}

/* CSS gradient placeholders (replace with real project photos) */
.hero__slide:nth-child(1) .hero__slide-img { object-position: center 40%; }
.hero__slide:nth-child(2) .hero__slide-img { object-position: center 35%; }
.hero__slide:nth-child(3) .hero__slide-img { object-position: center 45%; }

/* ── Overlay ──────────────────────────────────────────────── */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    var(--clr-overlay) 0%,
    rgba(14, 13, 11, 0.2) 40%,
    rgba(14, 13, 11, 0.6) 100%
  );
  pointer-events: none;
}

/* ── Content ──────────────────────────────────────────────── */
.hero__content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--sp-16);
  padding-inline: var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
  left: 0;
  right: 0;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--clr-accent-light);
  margin-bottom: var(--sp-4);
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fadeup 0.8s var(--ease-out) 0.3s forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--clr-white);
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: var(--sp-6);
  opacity: 0;
  transform: translateY(24px);
  animation: hero-fadeup 0.9s var(--ease-out) 0.5s forwards;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.78);
  max-width: 44ch;
  margin-bottom: var(--sp-8);
  line-height: var(--lh-snug);
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fadeup 0.8s var(--ease-out) 0.7s forwards;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fadeup 0.8s var(--ease-out) 0.9s forwards;
}

@keyframes hero-fadeup {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Prev / Next arrows ───────────────────────────────────── */
.hero__prev,
.hero__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition:
    background var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    transform var(--dur-fast) var(--ease);
  opacity: 0;
  animation: hero-fadeup 0.6s var(--ease-out) 1.1s forwards;
}

.hero__prev { left: 2rem; }
.hero__next { right: 2rem; }

.hero__prev:hover,
.hero__next:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%) scale(1.06);
}

/* ── Dot indicators ───────────────────────────────────────── */
.hero__dots {
  position: absolute;
  bottom: var(--sp-16);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  z-index: 10;
  opacity: 0;
  animation: hero-fadeup 0.6s var(--ease-out) 1.3s forwards;
}

.hero__dot {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition:
    background var(--dur-base) var(--ease),
    width      var(--dur-base) var(--ease),
    height     var(--dur-base) var(--ease);
}

.hero__dot.is-active {
  width: 10px;
  height: 10px;
  background: var(--clr-accent);
}

.hero__dot:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.75);
}

/* ── Counter ──────────────────────────────────────────────── */
.hero__counter {
  position: absolute;
  bottom: var(--sp-16);
  right: var(--gutter);
  z-index: 10;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0;
  animation: hero-fadeup 0.6s var(--ease-out) 1.2s forwards;
}

.hero__counter-current {
  font-weight: var(--fw-semi);
  color: var(--clr-white);
}

.hero__counter-bar {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.hero__counter-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress, 33%);
  background: var(--clr-white);
  transition: width 1.2s var(--ease);
}

/* ── Scroll indicator ─────────────────────────────────────── */
.hero__scroll {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  opacity: 0;
  animation: hero-fadeup 0.6s var(--ease-out) 1.4s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-white);
  animation: scroll-line 1.8s var(--ease-in-out) 1.6s infinite;
}

@keyframes scroll-line {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero__content { padding-bottom: var(--sp-12); }
  .hero__counter { bottom: var(--sp-6); right: var(--gutter); }
  .hero__scroll { display: none; }

  .hero__prev,
  .hero__next {
    width: 40px;
    height: 40px;
  }
  .hero__prev { left: var(--sp-4); }
  .hero__next { right: var(--sp-4); }

  .hero__dots { bottom: var(--sp-12); }
}
