/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f6f6f7;
}
::-webkit-scrollbar-thumb {
  background: #c4c6cb;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a5ad;
}

/* Hero fade-in animations (above-the-fold — always visible) */
.fade-in {
  opacity: 1;
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.15s;
}

.fade-in-delay-2 {
  animation-delay: 0.3s;
}

.fade-in-delay-3 {
  animation-delay: 0.45s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animations (below-the-fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.revealed,
  .reveal[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 {
    transition-delay: 0.1s;
  }

  .reveal-delay-2 {
    transition-delay: 0.2s;
  }

  .reveal-delay-3 {
    transition-delay: 0.3s;
  }
}

/* Fallback: if JS doesn't run, all .reveal content is visible */
.no-js .reveal,
.js .reveal:not(.revealed):not([data-revealed="true"]) {
  /* Only animated when JS is active */
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(30, 33, 39, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile menu transition */
#mobile-menu {
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Selection color */
::selection {
  background: #ff6b3f;
  color: #ffffff;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #ff6b3f;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
