/* Custom styles to complement Tailwind */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #1e3a8a;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e40af;
}

/* Image hover effects */
img {
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

/* Button animations */
button,
a.bg-yellow-400,
a.bg-blue-900 {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button:active,
a.bg-yellow-400:active,
a.bg-blue-900:active {
  transform: scale(0.98);
}

/* Form input enhancements */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Checkbox custom styling */
input[type="checkbox"] {
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  background-color: #1e3a8a;
  border-color: #1e3a8a;
}

/* Card hover effects */
.hover\:shadow-2xl {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover\:shadow-2xl:hover {
  transform: translateY(-4px);
}

/* Mobile menu animation */
#mobileMenu {
  transition: max-height 0.3s ease-in-out;
  max-height: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  max-height: 500px;
}

/* Cookie popup animation */
#cookiePopup {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section spacing consistency */
section {
  position: relative;
}

/* Image loading placeholder */
img[src*="placeholder.svg"] {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Responsive iframe */
iframe {
  max-width: 100%;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookiePopup {
    display: none;
  }

  section {
    page-break-inside: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  * {
    border-width: 2px !important;
  }
}

/* Reduced motion support */
@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;
  }
}

/* Dark mode preparations (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Ready for dark mode if required */
}

/* Additional utility classes */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Error state for form fields */
.border-red-500 {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Success state for form fields */
.border-green-500 {
  border-color: #10b981 !important;
}

/* Added Muse Group inspired styles with condensed fonts and bold colors */

/* Condensed font simulation for headings */
.hero-title,
h1,
h2,
h3 {
  letter-spacing: -0.02em;
  font-stretch: condensed;
}

/* Service card hover effects */
.service-card {
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.service-card .service-content {
  transition: opacity 0.3s ease;
}

/* Team card animations */
.team-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-card:hover {
  z-index: 10;
}

/* Why card interactive effects */
.why-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease;
}

.why-card:hover {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

/* Case card entrance animations */
.case-card {
  will-change: transform, opacity;
}

/* Hero section tilted images */
.hero-images img {
  will-change: transform;
  transition: transform 0.3s ease;
}

.hero-images img:hover {
  z-index: 20;
  transform: scale(1.1) rotate(0deg) !important;
}

/* Smooth color transitions for links */
a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Enhanced button hover states */
button,
a.bg-yellow-400,
a.bg-black,
a.bg-green-500 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

button:hover,
a.bg-yellow-400:hover,
a.bg-black:hover,
a.bg-green-500:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

/* Mobile menu enhanced animation */
#mobileMenu {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service details expand animation */
.service-details {
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Header shadow enhancement */
header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Form input focus enhancements */
input:focus,
textarea:focus {
  transform: scale(1.01);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

/* Gradient overlays for depth */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.service-card:hover::before {
  opacity: 1;
}

/* Border animations */
.border-black {
  border-color: #000;
  transition: border-color 0.3s ease;
}

/* Background transitions */
.bg-white,
.bg-black,
.bg-yellow-300,
.bg-green-500 {
  transition: background-color 0.3s ease;
}

/* Text selection styling */
::selection {
  background-color: #84cc16;
  color: #000;
}

::-moz-selection {
  background-color: #84cc16;
  color: #000;
}

/* Loading states for images */
img {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

img:not([src]),
img[src="/placeholder.svg"] {
  opacity: 0.5;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }
}

/* Accessibility: Focus visible */
*:focus-visible {
  outline: 3px solid #84cc16;
  outline-offset: 3px;
}

/* Print optimizations */
@media print {
  .service-card,
  .team-card,
  .why-card,
  .case-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* High performance animations */
@media (prefers-reduced-motion: no-preference) {
  .service-card,
  .team-card,
  .why-card,
  .case-card {
    will-change: transform;
  }
}
