/* BHS Homecare — site enhancements (works with Tailwind CDN) */
:root {
  --bhs-teal: #0d9488;
  --bhs-teal-dark: #0f766e;
  --bhs-navy: #0f172a;
  --bhs-navy-soft: #1e40af;
  --bhs-cream: #f8fafc;
  --bhs-focus: #0d9488;
  --header-h: 4.5rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--bhs-navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Focus — WCAG 2.2 AA visible focus */
:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--bhs-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--bhs-navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* Header glass */
.site-header {
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* Hero gradient wash */
.hero-wash {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(13, 148, 136, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(30, 64, 175, 0.08), transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Cards */
.bhs-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.bhs-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.25);
  border-color: rgba(13, 148, 136, 0.35);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bhs-teal);
  color: #fff;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px -10px rgba(13, 148, 136, 0.7);
}
.btn-primary:hover {
  background: var(--bhs-teal-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--bhs-navy);
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.btn-secondary:hover {
  border-color: var(--bhs-teal);
  background: #f0fdfa;
  transform: translateY(-1px);
}

/* Mobile nav */
#mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}
#mobile-nav.open {
  max-height: 28rem;
  opacity: 1;
}

/* FAQ */
.faq-item[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-panel.open {
  max-height: 20rem;
}

/* Service selector chips */
.selector-chip {
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}
.selector-chip:hover,
.selector-chip[aria-pressed="true"] {
  background: #f0fdfa;
  border-color: var(--bhs-teal);
  color: var(--bhs-teal-dark);
}

/* Form success */
.form-success {
  display: none;
}
.form-success.show {
  display: block;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bhs-card,
  .btn-primary,
  .btn-secondary,
  #mobile-nav,
  .faq-panel {
    transition: none !important;
  }
  .bhs-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}

/* JotForm host frame polish */
.jotform-host {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  min-height: 420px;
  box-shadow: 0 12px 40px -24px rgba(15, 23, 42, 0.35);
}
.jotform-host iframe {
  width: 100%;
  min-height: 520px;
  border: 0;
  display: block;
}

/* Print */
@media print {
  .site-header,
  #mobile-nav,
  .no-print {
    display: none !important;
  }
}
