/* ============================================
   HART PRIMARY CARE & AESTHETICS
   Custom Styles
   ============================================ */

/* Reset & base */
*, *::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;
}

/* ============================================
   GEOMETRIC BACKGROUND SHAPES
   ============================================ */
.geometric-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.04;
}

.shape-circle-1 {
  top: 15%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: #16a34a;
}

.shape-circle-2 {
  bottom: 20%;
  right: -8%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: #22c55e;
}

.shape-triangle {
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 260px solid #15803d;
  transform: translate(-50%, -50%) rotate(15deg);
}

.shape-square {
  top: 30%;
  right: 15%;
  width: 120px;
  height: 120px;
  background: #166534;
  transform: rotate(45deg);
}

.shape-ring {
  bottom: 10%;
  left: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 40px solid #4ade80;
}

/* ============================================
   GEOMETRIC PATTERN (for dark sections)
   ============================================ */
.geo-pattern {
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px) rotate(45deg); }
  50% { transform: translateY(-25px) rotate(55deg); }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.animate-float-medium {
  animation: float-medium 6s ease-in-out infinite;
}

.animate-float-fast {
  animation: float-fast 5s ease-in-out infinite;
}

/* ============================================
   SCROLL REVEAL (progressive enhancement)
   Only active when JS is enabled and user
   prefers reduced motion is NOT set.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered delays handled by JS */
}

/* Fallback: always visible if JS disabled */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion: never animate */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-float-slow,
  .animate-float-medium,
  .animate-float-fast {
    animation: none;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-container {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(254, 253, 248, 0.85);
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
  transition: box-shadow 0.3s ease;
}

.nav-container.scrolled {
  box-shadow: 0 4px 20px rgba(22, 101, 52, 0.1);
}

.nav-link {
  position: relative;
}

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

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

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) {
  .geometric-shape {
    display: none;
  }

  .shape-circle-1,
  .shape-circle-2,
  .shape-triangle,
  .shape-square,
  .shape-ring {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@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;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   SELECTION COLOR
   ============================================ */
::selection {
  background: #bbf7d0;
  color: #14532d;
}
