/* ============================================================== */
/* Skedulab Landing Page — Custom Styles & Animations             */
/* ============================================================== */

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ---- Selection ---- */
::selection {
  background-color: rgba(16, 185, 129, 0.15);
  color: #047857;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpDelay {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  30% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes floatDelay {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-up {
  animation: fadeUp 0.8s ease-out both;
}

.animate-fade-up-delay {
  animation: fadeUpDelay 1.2s ease-out both;
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.animate-float-delay {
  animation: floatDelay 6s ease-in-out infinite;
  animation-delay: 1s;
}

/* ---- Scroll Reveal ---- */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger feature cards */
.feature-card:nth-child(1) { transition-delay: 0ms; }
.feature-card:nth-child(2) { transition-delay: 80ms; }
.feature-card:nth-child(3) { transition-delay: 160ms; }
.feature-card:nth-child(4) { transition-delay: 240ms; }
.feature-card:nth-child(5) { transition-delay: 320ms; }
.feature-card:nth-child(6) { transition-delay: 400ms; }
.feature-card:nth-child(7) { transition-delay: 480ms; }
.feature-card:nth-child(8) { transition-delay: 560ms; }
.feature-card:nth-child(9) { transition-delay: 640ms; }

.revealed {
  opacity: 1 !important;
  transform: translateX(0) translateY(0) !important;
}

/* ---- FAQ Transition ---- */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-content:not(.hidden) {
  max-height: 300px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* ---- Button Hover Glow ---- */
.btn-primary {
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(34, 197, 94, 0.1));
  pointer-events: none;
}

.btn-primary:hover::after {
  opacity: 1;
}

/* ---- Feature Card Gradient Border ---- */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(59, 143, 255, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card:hover::before {
  opacity: 1;
}

/* ---- Nav Link Underline ---- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #22c55e);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ---- Smooth Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 768px) {
  .animate-float,
  .animate-float-delay {
    display: none;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal-left,
  .reveal-right,
  .feature-card {
    opacity: 1;
    transform: none;
  }
}
