/* ===== Homepage Hero Section ===== */
:root {
  /* Fallbacks if custom vars aren’t defined globally */
  --primary-green: #2d5016;
  --primary-green-light: #4ecdc4;
  --primary-green-dark: #1f3910;
  --accent-blue: #3aa6ff;
  --text-dark: #1b1c1d;
}

/* Motion and contrast preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  .home-hero .lead,
  .stat-label {
    opacity: 1 !important;
  }
}

/* ===== Hero ===== */
.home-hero {
  min-height: 100vh;
  background-image:
    linear-gradient(
      135deg,
      rgba(45, 80, 22, 0.85) 0%,
      rgba(31, 57, 16, 0.75) 100%
    ),
    url('https://res.cloudinary.com/dv6keahg3/image/upload/v1680772539/f_auto/q_auto/Outdoorsy/camprise_b2cbsv.jpg');
  background-size: cover;
  background-position: center;
  /* Parallax can cause jank on mobile: disable below 576px */
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 8rem 2rem;
  color: #fff;
  overflow: hidden;
  will-change: transform, opacity;
}

/* Animated gradient overlay */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(45, 80, 22, 0.3) 0%,
    rgba(78, 205, 196, 0.2) 50%,
    rgba(255, 107, 53, 0.2) 100%
  );
  opacity: 0.6;
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* Floating particles effect */
.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #ffffff, transparent),
    radial-gradient(2px 2px at 60% 70%, #ffffff, transparent),
    radial-gradient(1px 1px at 50% 50%, #ffffff, transparent),
    radial-gradient(1px 1px at 80% 10%, #ffffff, transparent),
    radial-gradient(2px 2px at 90% 60%, #ffffff, transparent),
    radial-gradient(1px 1px at 33% 85%, #ffffff, transparent);
  background-size: 200% 200%;
  animation: sparkle 20s linear infinite;
  opacity: 0.4;
  pointer-events: none;
  will-change: background-position, opacity;
}

@keyframes sparkle {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  animation: heroFadeIn 1.2s ease-out both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.home-hero h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
  }
}

.home-hero .lead {
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.4rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.8;
  opacity: 0.95;
}

/* Hero buttons container */
.home-hero .d-flex.gap-3 {
  margin-top: 2.5rem;
}

/* Hero Buttons */
.home-hero .btn {
  padding: 1.1rem 2.8rem;
  font-size: 1.15rem;
  min-width: 200px;
  border-radius: 50px;
  font-weight: 600;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  will-change: transform, box-shadow;
}

.home-hero .btn-primary {
  background: linear-gradient(135deg, #4ecdc4 0%, #2d5016 100%);
  border-color: transparent;
}

.home-hero .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.home-hero .btn-primary:hover::before {
  left: 100%;
}

.home-hero .btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(78, 205, 196, 0.4);
}

.home-hero .btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
}

.home-hero .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark) !important;
  transform: translateY(-4px) scale(1.05);
  border-color: var(--text-dark);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

/* Navigation override for hero */
.home-hero .nav-link {
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    width 0.3s ease;
  position: relative;
}

.home-hero .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition:
    width 0.3s ease,
    left 0.3s ease;
  transform: translateX(-50%);
}

.home-hero .nav-link:hover::after,
.home-hero .nav-link.active::after {
  width: 80%;
}

.home-hero .nav-link:hover,
.home-hero .nav-link:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Features Section ===== */
.features-section {
  padding: 8rem 2rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-green),
    transparent
  );
}

.features-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.features-section .display-5 {
  font-size: clamp(2rem, 1.2rem + 2vw, 3rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--accent-blue) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.feature-icon {
  font-size: 3.5rem;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  display: inline-block;
  position: relative;
  transition:
    transform 0.4s ease,
    color 0.4s ease;
  will-change: transform;
}

.feature-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    rgba(78, 205, 196, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  transition:
    width 0.4s ease,
    height 0.4s ease,
    background 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotateY(360deg);
  color: var(--accent-blue);
}

.feature-card:hover .feature-icon::before {
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(78, 205, 196, 0.3) 0%,
    transparent 70%
  );
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
  color: var(--primary-green);
}

.feature-description {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.7;
}

.feature-card {
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 80, 22, 0.1);
  will-change: transform, box-shadow;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(78, 205, 196, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(45, 80, 22, 0.15);
  border-color: var(--primary-green);
}

/* ===== Stats Section ===== */
.stats-section {
  padding: 6rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(78, 205, 196, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(255, 107, 53, 0.2) 0%,
      transparent 50%
    );
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.stats-section .container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.stat-item {
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  padding: 2rem 1rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  will-change: transform;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  font-weight: 800;
  display: block;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, rgba(78, 205, 196, 1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: countUp 0.8s ease-out both;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 6rem 3rem;
  background: linear-gradient(
    135deg,
    var(--accent-blue) 0%,
    var(--primary-green-light) 100%
  );
  color: #ffffff;
  text-align: center;
  border-radius: 30px;
  max-width: 1000px;
  margin: 6rem auto;
  box-shadow: 0 20px 60px rgba(45, 80, 22, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin-bottom: 1rem;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.cta-section p {
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.4rem);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  opacity: 0.95;
}

.cta-section .btn {
  padding: 1.25rem 3.5rem;
  font-size: 1.2rem;
  border-radius: 50px;
  min-width: 250px;
  background: #ffffff;
  color: var(--primary-green);
  font-weight: 700;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  will-change: transform, box-shadow;
}

.cta-section .btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.scroll-indicator i {
  font-size: 2.5rem;
  color: #ffffff;
  animation: bounce 2s infinite;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

/* ===== Responsive - Homepage ===== */
@media (max-width: 992px) {
  .features-section .display-5 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: 6rem 1.5rem;
    min-height: 100vh;
  }

  .home-hero .btn {
    width: 100%;
    min-width: auto;
    padding: 1rem 2rem;
    font-size: 1.05rem;
  }

  .feature-card {
    margin-bottom: 2rem;
  }

  .features-section {
    padding: 5rem 1.5rem;
  }
  .stats-section {
    padding: 4rem 1.5rem;
  }

  .cta-section {
    padding: 4rem 2rem;
    margin: 4rem 1rem;
    border-radius: 20px;
  }

  .cta-section .btn {
    width: 100%;
    padding: 1rem 2rem;
  }
}

@media (max-width: 576px) {
  .home-hero {
    /* Disable parallax on mobile for performance */
    background-attachment: scroll;
    padding: 5rem 1rem;
  }

  .feature-icon {
    font-size: 3rem;
  }
  .feature-card {
    padding: 2rem 1.5rem;
  }

  .stat-item {
    padding: 1.5rem 0.75rem;
  }
  .scroll-indicator {
    bottom: 20px;
  }
  .scroll-indicator i {
    font-size: 2rem;
  }
}

/* Accessibility focus visuals */
:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 3px;
}
