/* Hero Component - Split Layout */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60vh;
  overflow: hidden;
  background-color: var(--background-alt);
}

@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
  }
}

/* Hero background — light, airy, ambient green glow */
.hero-gradient {
  background-color: var(--background);
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 80% 0%, rgba(0, 170, 203, 0.22) 0%, transparent 65%),
              radial-gradient(60% 60% at 0% 100%, rgba(0, 125, 148, 0.14) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

/* Hero split layout container */
.hero-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .hero-container {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }
}

/* Hero content - left side */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: var(--space-2xl) 0;
  flex: 1;
}

@media (min-width: 768px) {
  .hero-content {
    text-align: left;
    padding: var(--space-2xl) 0;
    flex: 1 1 50%;
  }
}

/* Hero label */
.hero-label {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease-out both;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--primary-light);
  vertical-align: middle;
  margin-right: var(--space-sm);
}

.hero-title {
  color: var(--secondary);
  margin-bottom: var(--space-md);
  line-height: 1.1;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  font-weight: 400;
  max-width: 480px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@media (max-width: 767px) {
  .hero-subtitle {
    max-width: none;
  }
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (min-width: 768px) {
  .hero-cta {
    justify-content: flex-start;
  }
}

.hero-cta .btn {
  min-width: 180px;
  max-width: 100%;
}

@media (max-width: 576px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Hero button overrides — solid sage primary, outline secondary on the light hero */
.hero-cta .btn-primary {
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.28);
}

.hero-cta .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.38);
}

.hero-cta .btn-secondary {
  background-color: transparent;
}

/* Fill on hover so the white label keeps contrast on the light hero/CTA bg */
.hero-cta .btn-secondary:hover {
  background-color: var(--primary);
  color: white;
}

/* Hero image - right side */
.hero-image {
  position: relative;
  flex: 1;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

@media (min-width: 768px) {
  .hero-image {
    flex: 1 1 50%;
  }
}

.hero-image picture {
  display: block;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 48px rgba(var(--secondary-rgb), 0.18), 0 4px 12px rgba(var(--secondary-rgb), 0.08);
  object-fit: cover;
  aspect-ratio: 4 / 3;
  max-height: 500px;
}

@media (min-width: 768px) {
  .hero-image img {
    max-height: 520px;
    aspect-ratio: 3 / 4;
  }
}

@media (min-width: 1024px) {
  .hero-image img {
    max-height: 580px;
    aspect-ratio: 4 / 5;
  }
}

/* Full-bleed image hero — image fills the whole section, content overlaid */
.hero-full .hero-image {
  position: absolute;
  inset: 0;
  flex: none;
  z-index: 0;
  animation: none;
}

.hero-full .hero-image picture,
.hero-full .hero-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-full .hero-image img {
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  aspect-ratio: auto;
}

/* Dark gradient overlay so the overlaid text keeps contrast */
.hero-full .hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 55%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 1;
}

@media (max-width: 767px) {
  .hero-full .hero-image::after {
    background: rgba(0, 0, 0, 0.55);
  }
}

.hero-full .hero-content {
  flex: 1 1 100%;
  max-width: 600px;
}

@media (min-width: 768px) {
  .hero-full .hero-content {
    flex: 1 1 100%;
  }
}

.hero-full .hero-title {
  color: #fff;
}

.hero-full .hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
}

/* Light eyebrow label so it reads against the photo */
.hero-full .hero-label {
  color: #fff;
}

.hero-full .hero-label::before {
  background-color: rgba(255, 255, 255, 0.85);
}

/* Outline secondary button — white border/text over the image, inverts on hover */
.hero-full .hero-cta .btn-secondary {
  background-color: transparent;
  color: #fff;
  border-color: #fff;
}

.hero-full .hero-cta .btn-secondary:hover {
  background-color: #fff;
  color: var(--secondary);
}

.hero-full .scroll-indicator svg {
  fill: #fff;
}

/* Hero variations */
.hero-small {
  min-height: 35vh;
}

@media (min-width: 768px) {
  .hero-small {
    min-height: 45vh;
  }
  .hero-small .hero-content {
    flex: 1 1 45%;
    padding: var(--space-xl) 0;
  }
  .hero-small .hero-image {
    flex: 1 1 55%;
  }
  .hero-small .hero-image img {
    max-height: 360px;
    aspect-ratio: 16 / 10;
  }
}

.hero-small .hero-title {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.hero-small .hero-subtitle {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: var(--space-md);
}

.hero-medium {
  min-height: 50vh;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .hero-image,
  .hero-label {
    animation: none;
  }
}

/* Hero features section */
.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-feature {
  text-align: center;
  color: var(--text);
}

.hero-feature-icon {
  font-size: 3.6rem;
  margin-bottom: var(--space-sm);
}

.hero-feature-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.hero-feature-text {
  font-size: 1.4rem;
  opacity: 0.9;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  fill: var(--primary);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}