/* Aserna Website Color Palette */
:root {
  /* Primary Colors - Slate Palette */
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  /* Accent Colors */
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-cyan-400: #22d3ee;
  --color-cyan-500: #06b6d4;

  /* Background Gradient */
  --gradient-start: #1f2937;
  --gradient-end: #020617;

  /* Semantic Colors */
  --color-text-primary: var(--color-slate-50);
  --color-text-secondary: var(--color-slate-200);
  --color-text-tertiary: var(--color-slate-300);
  --color-text-muted: var(--color-slate-400);

  --color-bg-primary: var(--color-slate-950);
  --color-bg-secondary: var(--color-slate-900);
  --color-bg-tertiary: var(--color-slate-800);

  --color-border-primary: var(--color-slate-800);
  --color-border-secondary: var(--color-slate-700);
  --color-border-tertiary: var(--color-slate-600);

  --color-accent: var(--color-emerald-400);
  --color-accent-hover: var(--color-emerald-500);

  --color-button-primary: var(--color-slate-50);
  --color-button-primary-hover: var(--color-slate-200);
  --color-button-text: var(--color-slate-900);
}

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

/* Base Styles */
body {
  background: radial-gradient(circle at top left, var(--gradient-start) 0, var(--gradient-end) 40%, var(--gradient-end) 100%);
  min-height: 100vh;
  color: var(--color-text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Elements */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(52, 211, 153, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
  animation: backgroundPulse 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Floating Orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
  pointer-events: none;
}

.floating-orb-1 {
  width: 300px;
  height: 300px;
  background: var(--color-cyan-400);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-orb-2 {
  width: 400px;
  height: 400px;
  background: var(--color-emerald-400);
  bottom: 10%;
  right: 10%;
  animation-delay: 5s;
}

.floating-orb-3 {
  width: 250px;
  height: 250px;
  background: var(--color-cyan-500);
  top: 50%;
  right: 20%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll Reveal Classes */
.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
  opacity: 0;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
  opacity: 0;
}

/* Staggered Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Glassmorphism Effect */
.glass {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.glass-strong {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s;
}

.card-hover:hover::before {
  left: 100%;
}

.card-hover:hover {
  transform: translateY(-8px);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-cyan-400), var(--color-emerald-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Border */
.animated-border {
  position: relative;
  overflow: hidden;
}

.animated-border::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan-400), transparent);
  animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

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

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

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Button Animations */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

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

/* Logo Animation */
.logo-animate {
  transition: transform 0.3s ease;
}

.logo-animate:hover {
  transform: scale(1.05) rotate(2deg);
}

/* Nav Link Underline Animation */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-cyan-400);
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: var(--color-slate-50);
}

/* Number Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-up {
  animation: countUp 0.8s ease-out forwards;
}

/* Progress Bar Animation */
.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-cyan-400), var(--color-emerald-400));
  animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
  to {
    width: 83.33%;
  }
}

/* Utility Classes */
.text-shadow {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .floating-orb {
    display: none;
  }
}

/* Intersection Observer triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Carousel Styles */
.carousel-container {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  width: 100%;
}

.carousel-slide {
  flex-shrink: 0;
  box-sizing: border-box;
}

.carousel-slide:not(:last-child) {
  padding-right: 1.5rem;
}

.carousel-dot.active {
  background-color: var(--color-cyan-400);
  width: 1.5rem;
}

@media (max-width: 768px) {
  .carousel-slide {
    width: 100% !important;
    min-width: 100%;
  }
  
  .carousel-slide:not(:last-child) {
    padding-right: 1.5rem;
  }
}

/* Hero Card Stack Styles */
.hero-card-stack {
  min-height: 500px;
  height: 500px;
  perspective: 1000px;
  position: relative;
}

.hero-card {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, z-index;
  height: 100%;
  max-height: 500px;
}

.hero-card-1 {
  z-index: 20;
}

.hero-card-2 {
  z-index: 10;
}

.hero-card-3 {
  z-index: 0;
}

/* Card switching states */
.hero-card-stack.show-card-1 .hero-card-1 {
  transform: translateX(0) translateY(0) scale(1);
  opacity: 1;
  z-index: 20;
  pointer-events: auto;
}

.hero-card-stack.show-card-1 .hero-card-2 {
  transform: translateX(-10px) translateY(10px) scale(0.97);
  opacity: 0.15;
  z-index: 10;
  pointer-events: none;
}

.hero-card-stack.show-card-1 .hero-card-2 > * {
  opacity: 0;
}

.hero-card-stack.show-card-1 .hero-card-3 {
  transform: translateX(-20px) translateY(20px) scale(0.95);
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.hero-card-stack.show-card-1 .hero-card-3 > * {
  opacity: 0;
}

.hero-card-stack.show-card-2 .hero-card-1 {
  transform: translateX(10px) translateY(10px) scale(0.97);
  opacity: 0.15;
  z-index: 10;
  pointer-events: none;
}

.hero-card-stack.show-card-2 .hero-card-1 > * {
  opacity: 0;
}

.hero-card-stack.show-card-2 .hero-card-2 {
  transform: translateX(0) translateY(0) scale(1);
  opacity: 1;
  z-index: 20;
  pointer-events: auto;
}

.hero-card-stack.show-card-2 .hero-card-3 {
  transform: translateX(-10px) translateY(10px) scale(0.97);
  opacity: 0.15;
  z-index: 10;
  pointer-events: none;
}

.hero-card-stack.show-card-2 .hero-card-3 > * {
  opacity: 0;
}

.hero-card-stack.show-card-3 .hero-card-1 {
  transform: translateX(20px) translateY(20px) scale(0.95);
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.hero-card-stack.show-card-3 .hero-card-1 > * {
  opacity: 0;
}

.hero-card-stack.show-card-3 .hero-card-2 {
  transform: translateX(10px) translateY(10px) scale(0.97);
  opacity: 0.15;
  z-index: 10;
  pointer-events: none;
}

.hero-card-stack.show-card-3 .hero-card-2 > * {
  opacity: 0;
}

.hero-card-stack.show-card-3 .hero-card-3 {
  transform: translateX(0) translateY(0) scale(1);
  opacity: 1;
  z-index: 20;
  pointer-events: auto;
}

.hero-card-indicator.active {
  background-color: var(--color-cyan-400);
  width: 1.5rem;
}
