/* SECTION HOME - FIXED POSITIONING */
.section-home {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  transform-style: preserve-3d;
  transform-origin: center bottom;
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
  padding: 0;
  min-height: 100vh;
}

/* SPACER - Allows content to scroll over */
.section-home-spacer {
  height: 100vh;
  width: 100%;
  pointer-events: none;
  position: relative;
  z-index: 0;
}

/* BACKGROUND LAYER WITH BREATHING ANIMATION */
.section-home .bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: url('../../assets/background/newbg.webp') center / cover no-repeat;
  filter: brightness(1.12) contrast(1.05) saturate(1.1);
  /* FIX 2: Use CSS variable for scroll offset so JS doesn't override the animation */
  transform: scale(1.05) translateY(var(--bg-scroll-y, 0px));
  will-change: transform, filter;
  animation: heroFloat 14s ease-in-out infinite;
}

/* FIX 3: Single ::before — merged duplicate */
.section-home .bg-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* cyan light (left) */
    radial-gradient(ellipse at 25% 65%,
      rgba(0,217,255,0.14) 0%,
      transparent 55%
    ),
    /* gold light (right) */
    radial-gradient(ellipse at 75% 30%,
      rgba(212,175,55,0.16) 0%,
      transparent 55%
    ),
    /* softer vignette (LESS DARK) */
    radial-gradient(ellipse at center,
      rgba(0,0,0,0.08) 45%,
      rgba(0,0,0,0.52) 100%
    ),
    /* lighter top/bottom fade (LESS DARK) */
    linear-gradient(
      180deg,
      rgba(6,9,14,0.40) 0%,
      rgba(6,9,14,0.32) 35%,
      rgba(6,9,14,0.55) 100%
    );
  backdrop-filter: blur(1px) saturate(115%);
  -webkit-backdrop-filter: blur(1px) saturate(115%);
}

/* FIX 3: Single ::after — merged duplicate */
.section-home .bg-layer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 25%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
  pointer-events: none;
}

@keyframes heroFloat {
  0%   { transform: scale(1.05) translate3d(0,0,0); }
  50%  { transform: scale(1.08) translate3d(-1%, -0.6%, 0); }
  100% { transform: scale(1.05) translate3d(0,0,0); }
}

@keyframes grainMove {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-2%, 2%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .section-home .bg-layer,
  .section-home .bg-layer::after {
    animation: none;
  }
}

.section-home .hero-content {
  position: relative;
  z-index: 2;
  text-shadow:
    0 12px 40px rgba(0,0,0,0.75),
    0 2px 10px rgba(0,0,0,0.6);
}

/* BOTTOM GRADIENT OVERLAY */
.section-home::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* CONTENT CONTAINER */
/* 
  FIX: was '.section-home .content' — still works because 
  .content is a direct child of .section-home 
*/
.section-home .content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  z-index: 10;
  padding: var(--spacing-xl);
}

/* DISCOVER TEXT */
.discover-text {
  padding-top: 150px;
  margin-top: 150px;
  font-size: 1rem;
  letter-spacing: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  font-weight: 500;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
  text-transform: uppercase;
}

/* HERO TITLE */
.hero-title {
  font-size: clamp(2.1rem, 6.5vw, 4.8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 10px;
  color: white;
  text-shadow:
    0 4px 22px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(212, 175, 55, 0.18);
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
  line-height: 1.1;
}

/* HERO SUBTITLE */
.hero-subtitle {
  font-size: clamp(0.75rem, 1.4vw, 1.05rem);
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  font-weight: 400;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: fadeInUp 1s ease 0.8s forwards;
  text-transform: uppercase;
}

/* SOCIAL ICONS */
.social-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeInUp 1s ease 1s forwards;
}

.social-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  text-decoration: none;
}

.social-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-bg-dark);
  transform: translateY(-8px) scale(1.1);
  box-shadow:
    0 15px 40px rgba(212, 175, 55, 0.4),
    0 0 30px rgba(212, 175, 55, 0.3);
}

.social-icon:hover svg {
  transform: scale(1.1);
}

/* SCROLL DOWN INDICATOR */
.scroll-down-indicator {
  position: relative;
  margin-top: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
}

.scroll-down-indicator:hover {
  transform: translateX(-50%) translateY(-5px);
}

.scroll-down-indicator span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

.scroll-arrow {
  width: 28px;
  height: 28px;
  color: var(--color-gold);
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(12px);
  }
  60% {
    transform: translateY(6px);
  }
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3D EFFECT STATE CLASSES */
.section-home.hidden-3d {
  opacity: 0;
  pointer-events: none;
}

/* RESPONSIVE STYLES */
@media (max-width: 1400px) {
  .hero-title {
    letter-spacing: 6px;
  }
}

@media (max-width: 1200px) {
  .hero-title {
    letter-spacing: 5px;
  }

  .discover-text {
    letter-spacing: 12px;
  }

  .hero-subtitle {
    letter-spacing: 6px;
  }
}

@media (max-width: 1024px) {
  .discover-text {
    font-size: 0.9rem;
    letter-spacing: 10px;
  }

  .hero-subtitle {
    letter-spacing: 5px;
  }

  .social-icon {
    width: 50px;
    height: 50px;
  }

  .social-icon svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .section-home .bg-layer {
    background-size: cover;
    animation: floatPulseMobile 12s ease-in-out infinite;
  }

  @keyframes floatPulseMobile {
    0%, 100% {
      transform: translateY(0) scale(1);
      filter: brightness(0.7) saturate(0.85);
    }
    50% {
      transform: translateY(-8px) scale(1.02);
      filter: brightness(0.8) saturate(0.95);
    }
  }

  .discover-text {
    font-size: 0.75rem;
    letter-spacing: 8px;
    margin-bottom: 15px;
  }

  .hero-title {
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 0.7rem;
    letter-spacing: 4px;
    margin-bottom: 30px;
  }

  .social-icons {
    gap: 15px;
    margin-bottom: 40px;
  }

  .social-icon {
    width: 48px;
    height: 48px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  .scroll-down-indicator {
    bottom: 30px;
  }

  .scroll-down-indicator span {
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  .scroll-arrow {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .section-home .content {
    padding: var(--spacing-md);
  }

  .discover-text {
    font-size: 0.65rem;
    letter-spacing: 6px;
  }

  .hero-title {
    letter-spacing: 3px;
  }

  .hero-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
  }

  .social-icons {
    gap: 12px;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  .social-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (prefers-reduced-motion: reduce) {
  .section-home .bg-layer {
    animation: none;
  }

  .scroll-arrow {
    animation: none;
  }

  .discover-text,
  .hero-title,
  .hero-subtitle,
  .social-icons,
  .scroll-down-indicator {
    animation: none;
    opacity: 1;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .hero-title {
    text-shadow: 0 0 0 black;
    -webkit-text-stroke: 2px white;
  }

  .social-icon {
    border-width: 3px;
  }
}