@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #0d9488;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0f766e;
}

/* Hero entrance animation */
@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Section reveal animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card hover zoom */
@keyframes cardHover {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-4px);
  }
}

/* Gradient animation */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Apply animations */
#hero h1 {
  animation: heroFadeInUp 0.8s ease-out 0.1s backwards;
}

#hero p {
  animation: heroFadeInUp 0.8s ease-out 0.2s backwards;
}

#hero .flex.flex-col.sm\:flex-row {
  animation: heroFadeInUp 0.8s ease-out 0.3s backwards;
}

#hero .flex.items-center.gap-8 {
  animation: heroFadeInUp 0.8s ease-out 0.4s backwards;
}

#hero > div > div > div:last-child {
  animation: heroFadeInRight 0.8s ease-out 0.2s backwards;
}

/* Section animations */
#about h2,
#services h2,
#testimonials h2,
#contact h2 {
  animation: fadeInUp 0.8s ease-out backwards;
}

#about p,
#services > div > p,
#testimonials > div > p {
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

/* Service cards stagger */
.group {
  animation: fadeInUp 0.6s ease-out backwards;
}

.group:nth-child(1) { animation-delay: 0s; }
.group:nth-child(2) { animation-delay: 0.1s; }
.group:nth-child(3) { animation-delay: 0.2s; }
.group:nth-child(4) { animation-delay: 0.3s; }
.group:nth-child(5) { animation-delay: 0.4s; }

/* Testimonial cards */
#testimonials .rounded-xl:not(h2, p, a, div) {
  animation: fadeInUp 0.6s ease-out backwards;
}

#testimonials .p-8:nth-child(1) { animation-delay: 0s; }
#testimonials .p-8:nth-child(2) { animation-delay: 0.1s; }
#testimonials .p-8:nth-child(3) { animation-delay: 0.2s; }

/* Button interactions */
a[class*="bg-teal"],
button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

a[class*="bg-teal"]::before,
button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: 0;
}

a[class*="bg-teal"]:hover::before,
button:hover::before {
  left: 100%;
}

/* Smooth underline animation on links */
a {
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0d9488;
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* Nav link exceptions */
nav a::after {
  display: none;
}

/* Image loading states */
img {
  display: block;
  width: 100%;
  height: auto;
}

/* Gradient overlays */
.bg-gradient-to-tr {
  animation: gradientShift 6s ease infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #hero {
    padding-top: 8rem;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  #about,
  #services,
  #testimonials {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  nav {
    position: static;
  }

  .hidden {
    display: none !important;
  }
}

