/* v2.4.0: Hero Section (video support, focal point, cinematic) */
.hero {
  position: relative;
  padding: var(--space-xl) 0;
  min-height: 35vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* v2.3.0: Hero size variants */
.hero.hero-compact,
.hero.hero-small {
  min-height: auto;
  padding: var(--space-lg) 0;
}

.hero.hero-compact .hero-content h1,
.hero.hero-small .hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.hero.hero-large {
  min-height: 55vh;
  padding: var(--space-3xl) 0;
}

.hero.hero-large .hero-content h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.hero.hero-full {
  min-height: 100vh;
  padding: var(--space-3xl) 0;
}

.hero.hero-full .hero-content h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
}

/* ── Background layer (image) ─────────────────────── */
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--green-800);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* ── Video background ─────────────────────────────── */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ── Overlay — sits above BOTH image and video ────── */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Default: strong green overlay for text readability (no background image) */
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.9) 0%, rgba(20, 83, 45, 0.95) 100%);
}

/* Reduced overlay when background image is present */
.hero-has-image .hero-overlay {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.55) 0%, rgba(20, 83, 45, 0.65) 100%);
}

/* Slightly darker overlay for video — ensures text pops over moving content */
.hero-has-video .hero-overlay {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.6) 0%, rgba(20, 83, 45, 0.7) 100%);
}

/* Pattern overlay on top of gradient */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hide pattern overlay on video hero — too noisy over motion */
.hero-has-video .hero-overlay::after {
  display: none;
}

/* ── Dark overlay (no green tint) ────────────────── */
.hero-overlay-dark .hero-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-overlay-dark.hero-has-image .hero-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-overlay-dark.hero-has-video .hero-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.hero-overlay-dark .hero-bg {
  background-color: #1a1a2e;
}

/* Video play/pause toggle */
.hero-video-toggle {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
}

.hero-video-toggle:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
}

/* ── Ken Burns cinematic effect (image-only) ──────── */
@keyframes kenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.hero-cinematic .hero-bg {
  animation: kenBurns 20s ease-in-out alternate infinite;
  will-change: transform;
}

/* ── Content layer ────────────────────────────────── */
.hero .container {
  position: relative;
  z-index: 3;
}

.hero-content {
  max-width: 700px;
  color: white;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: var(--space-sm) var(--space-md);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold-300);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-400);
}

.hero-content > p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin-top: var(--space-xs);
}

/* ── Accessibility: reduced motion ────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-cinematic .hero-bg {
    animation: none;
  }
}

/* ── Mobile: hide video on small screens for perf ─── */
@media (max-width: 768px) {
  .hero-video {
    display: none;
  }

  .hero-video-toggle {
    display: none;
  }
}
