/* =========================================================
   Gerber and Associates — Custom stylesheet
   Handles the small pieces of behavior/animation that the
   Tailwind Play CDN cannot generate via @apply (no build step).
========================================================= */

html {
  scroll-behavior: smooth;
}

/* Offset in-page anchor jumps so the sticky header never covers a section's top */
section[id] {
  scroll-margin-top: 88px;
}

@media (min-width: 1024px) {
  section[id] {
    scroll-margin-top: 144px;
  }
}

/* Consistent, visible focus state for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #14b8a0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   Desktop navigation links
--------------------------------------------------------- */
.nav-link {
  position: relative;
  padding-block: 0.25rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background-color: #14b8a0;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #1a4278;
}

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

.nav-link--active {
  color: #1a4278;
}

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

/* ---------------------------------------------------------
   Mobile navigation links
--------------------------------------------------------- */
.mobile-nav-link {
  padding: 0.75rem 0.75rem;
  border-radius: 0.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: #eef4fb;
  color: #1a4278;
}

.mobile-nav-link--active {
  background-color: #eef4fb;
  color: #1a4278;
}

/* ---------------------------------------------------------
   Header + mobile menu states (toggled via js/main.js)
--------------------------------------------------------- */
#site-header.is-scrolled {
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
}

#mobile-menu.is-open {
  max-height: 32rem;
}

/* ---------------------------------------------------------
   Hero carousel
--------------------------------------------------------- */
.hero-slide {
  opacity: 0;
  z-index: 0;
  transition: opacity 1200ms ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  transform: scale(1);
  transition: transform 7000ms ease-out;
}

.hero-slide.is-active img {
  transform: scale(1.08);
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.hero-dot.is-active {
  width: 28px;
  background-color: #14b8a0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide img {
    transition: none !important;
  }
}

/* ---------------------------------------------------------
   Services grid reveal animation
--------------------------------------------------------- */
@keyframes serviceFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-fade-in {
  animation: serviceFadeIn 0.5s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .service-fade-in {
    animation: none;
  }
}

/* ---------------------------------------------------------
   Contact / appointment form
--------------------------------------------------------- */
.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #173a68;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1e293b;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #1a4278;
  box-shadow: 0 0 0 3px rgba(26, 66, 120, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

#form-success {
  animation: serviceFadeIn 0.4s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  #form-success {
    animation: none;
  }
}
