/* ========================
   GTK Studio - Smooth Scroll Experience
   Enhanced scrolling with animations
   ======================== */

/* Native Smooth Scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed navbar */
}

/* Custom Scrollbar Design */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-green, #7dd87d), #6bc96b);
  border-radius: 6px;
  border: 2px solid #f1f1f1;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6bc96b, var(--accent-green, #7dd87d));
  border-color: #e0e0e0;
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent-green, #7dd87d);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #7dd87d #f1f1f1;
}

/* Scroll Progress Indicator Enhancement */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green, #7dd87d), #6bc96b, var(--accent-green, #7dd87d));
  background-size: 200% 100%;
  z-index: 9999;
  transition: width 0.1s ease-out;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Smooth Scroll Anchor Links */
a[href^="#"] {
  transition: color 0.3s ease;
}

/* Scroll Reveal Animation Base */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-scroll-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Reveal Variants */
[data-scroll-reveal="fade"] {
  opacity: 0;
  transform: none;
}

[data-scroll-reveal="fade"].revealed {
  opacity: 1;
}

[data-scroll-reveal="slide-left"] {
  opacity: 0;
  transform: translateX(-50px);
}

[data-scroll-reveal="slide-left"].revealed {
  opacity: 1;
  transform: translateX(0);
}

[data-scroll-reveal="slide-right"] {
  opacity: 0;
  transform: translateX(50px);
}

[data-scroll-reveal="slide-right"].revealed {
  opacity: 1;
  transform: translateX(0);
}

[data-scroll-reveal="scale"] {
  opacity: 0;
  transform: scale(0.9);
}

[data-scroll-reveal="scale"].revealed {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Animation Delays */
[data-scroll-reveal][data-delay="100"] {
  transition-delay: 0.1s;
}

[data-scroll-reveal][data-delay="200"] {
  transition-delay: 0.2s;
}

[data-scroll-reveal][data-delay="300"] {
  transition-delay: 0.3s;
}

[data-scroll-reveal][data-delay="400"] {
  transition-delay: 0.4s;
}

[data-scroll-reveal][data-delay="500"] {
  transition-delay: 0.5s;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-green, #7dd87d), #6bc96b);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(125, 216, 125, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.back-to-top:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(125, 216, 125, 0.4);
}

.back-to-top:active {
  transform: scale(0.95);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* Smooth Page Transitions */
body {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  [data-scroll-reveal] {
    opacity: 1;
    transform: none;
  }
  
  .back-to-top {
    transition: none;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  html {
    scroll-padding-top: 60px;
  }
}

