/* e_synergo — custom styles on top of Tailwind */

:root {
  --color-cream: #FFFDF8;
  --color-coral: #E89485;
  --color-yellow: #F5C84C;
  --color-lavender: #B69BD8;
  --color-lavender-dark: #8E73B8;
  --color-sky: #8FC4E0;
  --color-sky-dark: #5E8BB0;
  --color-sage: #A4B36F;
  --color-rose: #E89BA8;
  --color-ink: #3A4A5C;
  --color-muted: #6B7884;
  /* Primary brand color = the blue used in logo text & mascot */
  --color-brand: #5E8BB0;
  --color-brand-dark: #466F92;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--color-cream);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Quicksand', 'Nunito', sans-serif; letter-spacing: -0.01em; }

/* Decorative blob backgrounds */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Hand-drawn underline accent */
.underline-wavy {
  background-image: linear-gradient(transparent 70%, var(--color-yellow) 70%);
  background-size: 100% 100%;
  padding: 0 0.15em;
}

/* Service card hover */
.service-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(43, 36, 64, 0.18);
}

/* Subtle floating animation for hero illustration */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.float-slow { animation: float 6s ease-in-out infinite; }

/* Mobile menu */
#mobile-menu { transition: max-height 0.3s ease, opacity 0.3s ease; }
#mobile-menu.hidden-menu { max-height: 0; opacity: 0; overflow: hidden; }
#mobile-menu.open-menu { max-height: 500px; opacity: 1; }

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Print-friendly */
@media print {
  .no-print { display: none !important; }
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--color-brand);
  color: white;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 0 0 12px 0;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Scroll-margin for anchor targets (compensate for sticky header) */
section[id], [id^="service-"], #ergotherapy, #logotherapy, #special-education, #psychology, #parent-counseling, #assessment, #services, #contact-form {
  scroll-margin-top: 90px;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Sticky mobile call FAB */
.mobile-call-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  background: var(--color-brand);
  color: white;
  box-shadow: 0 12px 28px -8px rgba(94, 139, 176, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulse-ring 2.4s ease-out infinite;
}
.mobile-call-fab:hover, .mobile-call-fab:focus-visible { transform: scale(1.08); }
@media (min-width: 768px) { .mobile-call-fab { display: none; } }
@keyframes pulse-ring {
  0% { box-shadow: 0 12px 28px -8px rgba(94, 139, 176, 0.6), 0 0 0 0 rgba(94, 139, 176, 0.4); }
  70% { box-shadow: 0 12px 28px -8px rgba(94, 139, 176, 0.6), 0 0 0 14px rgba(94, 139, 176, 0); }
  100% { box-shadow: 0 12px 28px -8px rgba(94, 139, 176, 0.6), 0 0 0 0 rgba(94, 139, 176, 0); }
}

/* Stat number style */
.stat-num {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Better focus visible */
*:focus-visible {
  outline-color: var(--color-brand) !important;
}
button:focus-visible, a:focus-visible {
  outline-offset: 4px;
}

/* Inverts a dark logo to crisp white for placement on dark backgrounds */
.brand-mark-light {
  filter: brightness(0) invert(1);
  opacity: 0.65;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
a:hover .brand-mark-light,
.brand-mark-light:hover {
  opacity: 1;
  transform: scale(1.04);
}

/* Footer credit treatment */
.credit-line {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}
.credit-line:hover { color: rgba(255, 255, 255, 0.95); }
.credit-divider {
  width: 1px;
  height: 1.25rem;
  background: rgba(255, 255, 255, 0.18);
}
