/* Custom Fonts */
* {
  font-family: "Inter", sans-serif;
}

.font-poppins {
  font-family: "Poppins", sans-serif;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Background Colors Matching SVG - Purple Theme */
body {
  background: linear-gradient(180deg, #f8f5ff 0%, #f5f0ff 50%, #faf7ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Hero Section Background */
.hero {
  background: linear-gradient(
    135deg,
    rgba(180, 123, 237, 0.18) 0%,
    rgba(141, 86, 204, 0.1) 50%,
    rgba(180, 123, 237, 0.15) 100%
  ) !important;
}

/* Custom Animations */
@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

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

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

/* Blob Animation */
.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Additional animation delays for hero image */
.fade-in-up.animation-delay-400 {
  animation-delay: 0.4s;
}

/* Gradient Animation */
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* Fade In Up Animation */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-up.animation-delay-200 {
  animation-delay: 0.2s;
}

.fade-in-up.animation-delay-400 {
  animation-delay: 0.4s;
}

.fade-in-up.animation-delay-600 {
  animation-delay: 0.6s;
}

.fade-in-up.animation-delay-800 {
  animation-delay: 0.8s;
}

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

/* Navigation Link Hover Effect */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, hsl(var(--p)), hsl(var(--s)));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Auth Buttons Styling */
.nav-auth-btn {
  position: relative;
  overflow: hidden;
}

.nav-auth-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(180, 123, 237, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.nav-auth-btn:hover::before {
  width: 300px;
  height: 300px;
}

.nav-auth-btn-daftar {
  position: relative;
  overflow: hidden;
  animation: pulse-glow 3s ease-in-out infinite;
}

.nav-auth-btn-daftar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.nav-auth-btn-daftar:hover::before {
  left: 100%;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(180, 123, 237, 0.3),
      0 0 40px rgba(180, 123, 237, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(180, 123, 237, 0.5),
      0 0 60px rgba(141, 86, 204, 0.3);
  }
}

/* Smooth Transitions */
.card,
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hover Effects */
.card:hover {
  transform: translateY(-8px);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--b2));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--p));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--pf));
}

/* Loading Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Slow Pulse Animation */
@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Dash Animation for SVG paths */
@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

.animate-dash {
  stroke-dashoffset: 0;
  animation: dash 2s linear infinite;
}

/* Intersection Observer Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Stack buttons vertically on mobile */
  .hero .flex.flex-col {
    width: 100%;
  }

  .hero .btn {
    width: 100%;
  }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .card,
  .nav-link {
    touch-action: manipulation;
  }

  .btn:active {
    transform: scale(0.95);
  }
}

/* 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;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  footer,
  .btn {
    display: none;
  }
}
