/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(52, 212, 168, 0.3);
  color: #fff;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #34D4A8;
  color: #050C18;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Navigation */
.nav-link {
  position: relative;
}

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

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

.nav-link:hover {
  color: #fff;
}

/* Mobile Menu */
.mobile-link {
  font-family: 'Playfair Display', Georgia, serif;
}

.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Hamburger Animation */
#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  width: 5rem;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Hero Animations */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero-headline {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero-sub {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Line Animation */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Section Animations (below fold only) */
.section-header {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.revealed {
  opacity: 1;
  transform: translateY(0);
}

.service-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.service-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about-image {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image.revealed {
  opacity: 1;
  transform: translateX(0);
}

.about-content {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.revealed {
  opacity: 1;
  transform: translateX(0);
}

.feature-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
  opacity: 1;
  transform: scale(1);
}

.contact-info-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-info-item.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }

.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }
.gallery-item:nth-child(5) { transition-delay: 0.25s; }
.gallery-item:nth-child(6) { transition-delay: 0.3s; }

/* Section Eyebrow */
.section-eyebrow {
  display: inline-block;
}

/* Section Title */
.section-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
}

/* Section Subtitle */
.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Service Tags */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.tag-pill:hover {
  border-color: rgba(52, 212, 168, 0.3);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(52, 212, 168, 0.06);
}

/* CTA Buttons */
.cta-primary {
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-primary:hover::before {
  opacity: 1;
}

.cta-secondary {
  position: relative;
}

/* Form Styles */
.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-input {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
}

.form-input option {
  background: #050C18;
  color: #fff;
}

.form-input:focus {
  border-color: rgba(52, 212, 168, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(52, 212, 168, 0.1) !important;
}

.form-submit {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

/* Back to Top */
.back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 8px 30px rgba(52, 212, 168, 0.4);
}

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

  html {
    scroll-behavior: auto;
  }

  .section-header,
  .service-card,
  .about-image,
  .about-content,
  .feature-card,
  .gallery-item,
  .contact-info-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Responsive */
@media (max-width: 767px) {
  .hero-headline {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .section-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .about-image {
    order: -1;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }

  .stat-item {
    text-align: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Focus Visible */
*:focus-visible {
  outline: 2px solid #34D4A8;
  outline-offset: 2px;
  border-radius: 4px;
}

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

::-webkit-scrollbar-track {
  background: #050C18;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
