/* ==========================================================================
   Hero Section - Skeleton Crew
   ========================================================================== */

/* --- Hero layout --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(28rem, 70vh, 50rem);
  overflow: hidden;
}

/* --- Animated background ---
   Overlapping radial gradients that slowly drift. Subtle enough to
   feel alive without pulling focus from the content. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(46, 204, 64, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(46, 204, 64, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.01) 0%, transparent 60%);
  animation: hero-bg-drift 20s ease-in-out infinite alternate;
}

@keyframes hero-bg-drift {
  0% {
    background-position: 0% 0%, 100% 100%, 50% 50%;
    opacity: 0.6;
  }
  50% {
    background-position: 30% 20%, 70% 80%, 40% 60%;
    opacity: 1;
  }
  100% {
    background-position: 10% 40%, 90% 30%, 60% 40%;
    opacity: 0.7;
  }
}

/* --- Short hero modifier ---
   Used on subpages (Work, Services) where the hero is a compact
   heading strip rather than the full-viewport homepage hero. */
.hero--short {
  min-height: auto;
}

.hero--short .hero__content {
  padding-block: var(--space-xl);
}

.hero--short .hero__headline {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
}

@media (min-width: 600px) {
  .hero--short .hero__content {
    padding-block: var(--space-2xl);
  }

  .hero--short .hero__headline {
    font-size: var(--font-size-3xl);
  }
}

/* --- Hero content --- */
.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: var(--space-2xl);
}

/* --- Headline --- */
.hero__headline {
  font-family: var(--font-display);
  font-size: var(--font-size-hero);
  color: var(--color-text);
  text-transform: uppercase;
  line-height: 1.1;
  max-width: 18ch;
}

/* --- Subheadline --- */
.hero__sub {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-muted);
  max-width: 40ch;
  margin-top: var(--space-md);
  line-height: 1.6;
}

/* --- CTA buttons --- */
.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
  width: 100%;
  max-width: 22rem;
}

.hero__ctas .btn {
  width: 100%;
  position: relative;
  font-size: var(--font-size-xl);
  padding: 1rem 2.25rem;
  letter-spacing: 0.08em;
  border-radius: 3px;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out,
    background-color 200ms ease-out, color 200ms ease-out,
    border-color 200ms ease-out;
}

/* --- Primary CTA (toggle button) ---
   Solid green with glow, wobbles every few seconds to draw the eye. */
.hero__ctas .btn--primary {
  box-shadow: 0 0 16px rgba(46, 204, 64, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: btn-wobble 3s ease-in-out infinite;
}

@keyframes btn-wobble {
  0%, 85%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(-2deg) scale(1.02); }
  91% { transform: rotate(1.5deg) scale(1.02); }
  94% { transform: rotate(-1deg); }
  97% { transform: rotate(0.5deg); }
}

.hero__ctas .btn--primary:hover {
  animation: none;
  transform: scale(1.05);
  box-shadow: 0 0 28px rgba(46, 204, 64, 0.5), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.hero__ctas .btn--primary:active {
  transform: scale(0.97);
  box-shadow: 0 0 10px rgba(46, 204, 64, 0.3), 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* --- Ghost CTAs - "See our work" / "Get a quote" --- */
.hero__ctas .btn--ghost {
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__ctas .btn--ghost:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(46, 204, 64, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.hero__ctas .btn--ghost:active {
  transform: scale(0.97);
}

@media (min-width: 600px) {
  .hero__ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: none;
    gap: var(--space-lg);
  }

  .hero__ctas .btn {
    width: auto;
    padding: 1.15rem 2.75rem;
    font-size: 1.65rem;
  }

  .hero__ctas .btn--primary {
    grid-column: 1 / -1;
  }
}

/* --- Reduced motion: kill transforms and glows --- */
@media (prefers-reduced-motion: reduce) {
  .hero__ctas .btn {
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
    transition: background-color 200ms ease-out, color 200ms ease-out,
      border-color 200ms ease-out;
  }
}

/* --- Responsive --- */
@media (min-width: 600px) {
  .hero__sub {
    font-size: var(--font-size-xl);
  }
}

@media (min-width: 1024px) {
  .hero__content {
    text-align: left;
    align-items: flex-start;
    max-width: none;
    padding-inline: clamp(var(--space-xl), 5vw, 6rem);
  }

  .hero__ctas {
    align-self: center;
  }

  .hero__headline {
    max-width: 20ch;
  }

  .hero__sub {
    max-width: 50ch;
  }
}

/* --- Reduced motion: disable background animation --- */
@media (prefers-reduced-motion: reduce) {
  .hero__bg {
    animation: none;
    opacity: 0.8;
  }
}
