/* ===================================
   MAIN STYLES
   =================================== */

/* Body */
body {
  padding-top: 60px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background-color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) 0;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.2s forwards;
}

.hero__content {
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-gold);
  margin-bottom: var(--spacing-md);
  letter-spacing: var(--letter-spacing-wider);
  font-family: var(--font-heading);
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-off-white);
  margin-bottom: var(--spacing-lg);
  letter-spacing: var(--letter-spacing-wider);
  font-weight: var(--font-weight-light);
  font-family: var(--font-primary);
}

.hero__cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Services Section */
.services {
  background-color: var(--color-off-white);
  padding: var(--spacing-xl) 0;
}

.section__title {
  font-size: var(--font-size-3xl);
  color: var(--color-navy);
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.service-card {
  background-color: var(--color-steel-blue);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.service-card.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Focus styles for service cards when navigating with keyboard */
.service-card:focus-within {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

.service-card__icon {
  margin-bottom: var(--spacing-md);
}

.service-card__icon img {
  width: 64px;
  height: 64px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(18%) saturate(1234%) hue-rotate(88deg) brightness(95%) contrast(89%);
}

.service-card__title {
  font-size: var(--font-size-xl);
  color: var(--color-navy);
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-heading);
}

.service-card__description {
  color: var(--color-grey);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
}

/* Footer Section */
.footer {
  background-color: var(--color-navy);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  color: var(--color-white);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer__heading {
  color: var(--color-gold);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-heading);
}

.footer__text {
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
}

.footer__text a {
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-normal);
  border-radius: 2px;
}

.footer__text a:hover,
.footer__text a:focus {
  color: var(--color-gold);
}

.footer__text a:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  background-color: rgba(212, 175, 55, 0.1);
}

address.footer__text {
  font-style: normal;
}

.footer__bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--font-size-sm);
  color: var(--color-light-grey);
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

@media (max-width: 768px) {
  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-md);
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 280px;
  }

  .section__title {
    font-size: var(--font-size-2xl);
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-md);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-lg);
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

/* ===================================
   KEYBOARD NAVIGATION & ACCESSIBILITY
   =================================== */

/* Enhanced focus styles for keyboard navigation */
/* Use :focus-visible to show focus only for keyboard users */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  transition: outline-offset 0.1s ease;
}

/* Specific focus styles for different elements */
a:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Ensure sections can receive focus for smooth scrolling */
section:focus {
  outline: none;
}

/* High contrast focus for better visibility */
@media (prefers-contrast: high) {
  *:focus-visible {
    outline-width: 4px;
    outline-offset: 4px;
  }
}

/* ===================================
   ANIMATIONS
   =================================== */

/* Fade-in animation for hero section */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in-up animation for service cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

/* Respect user's motion preferences for accessibility */
@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;
  }
  
  /* Ensure hero section is visible immediately */
  .hero {
    opacity: 1;
    animation: none;
  }
  
  /* Ensure service cards are visible immediately */
  .service-card {
    opacity: 1;
    transform: translateY(0);
  }
  
  .service-card.animate-in {
    animation: none;
  }
  
  /* Keep hover effects but remove transforms */
  .service-card:hover,
  .service-card:focus-within {
    transform: translateY(0);
  }
  
  .btn--primary:hover,
  .btn--primary:focus,
  .btn--secondary:hover,
  .btn--secondary:focus {
    transform: scale(1);
  }
}
