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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

/* Hover effects */
a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* Smooth transitions */
transition {
  transition: all 0.3s ease;
}

/* Image fallback gradient */
img.onerror-gradient {
  background: linear-gradient(135deg, #d1fae5 0%, #ccfbf1 100%);
}

/* Marquee-style section titles */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

section {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Mobile menu smooth slide */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mobile-nav:not(.hidden) {
  animation: slideDown 0.3s ease-out forwards;
}

/* Card hover lift */
.group:hover {
  transform: translateY(-4px);
}

/* Button transitions */
button[type="submit"]:active {
  transform: translateY(2px);
}

/* Form input focus styling */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Subtle grain overlay (optional) */
.grain-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" result="noise" seed="1"/></filter><rect width="100" height="100" fill="%23fff" filter="url(%23noiseFilter)" opacity="0.02"/></svg>');
  pointer-events: none;
  z-index: 1;
}

/* Ensure all text is visible by default */
body, html {
  color: #111827;
  background-color: #ffffff;
}

/* Nav links smooth hover underline */
.nav-link {
  position: relative;
  display: inline-block;
}

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

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

/* Mobile menu link styling */
.mobile-nav-link {
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  transform: translateX(4px);
}

/* Service card grid responsive */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .md\:grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Ensure sticky nav shadow is subtle but visible */
nav {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Hero gradient backgrounds */
.bg-gradient-to-br {
  background-image: linear-gradient(135deg, var(--tw-gradient-stops));
}

.from-teal-50 {
  --tw-gradient-from: #f0fdfa;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 253, 250, 0));
}

.to-teal-100 {
  --tw-gradient-to: #ccfbf1;
}

.from-teal-700 {
  --tw-gradient-from: #0d7377;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(13, 115, 119, 0));
}

.to-teal-800 {
  --tw-gradient-to: #055b62;
}

/* Text selection color */
::selection {
  background-color: #0d9488;
  color: white;
}

/* Scrollbar styling for better UX */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* Print styles */
@media print {
  nav, footer {
    display: none;
  }
}
