/* Flatland Chiropractic and Wellness — site styles extracted from the approved
   mockup's <head>. Fonts, base body type, link colors, native-<details> FAQ,
   the two fixed-background sections (+ touch fallback), and the layout's
   skip-link. Everything else is inline on the elements, verbatim from design. */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

body { margin: 0; background: #FEFEFE; font-family: Montserrat, sans-serif; color: #2B2B2B }

a { color: #601B1E }
a:hover { color: #3F1113 }

details summary { cursor: pointer; list-style: none }
details summary::-webkit-details-marker { display: none }
/* FAQ accordions: a +/− marker on the right of each question, and a light-green
   divider between items (overrides the pale inline border). */
details > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px }
details > summary::after { content: "+"; font-size: 26px; font-weight: 400; line-height: 1; color: #601B1E; flex: 0 0 auto }
details[open] > summary::after { content: "−" }
details { border-bottom: 1px solid #A8BD7E !important }

/* Fixed-background (parallax-style) sections */
.fx-svc { background-image: url(/assets/images/bg-treatment-room.jpg); background-attachment: fixed; background-size: cover; background-position: center }
.fx-faq { background-image: url(/assets/images/bg-faq-head-support.jpg); background-attachment: fixed; background-size: cover; background-position: center }
/* Generic fixed-background utility for inner pages (image set inline). */
.fx-bg { background-attachment: fixed; background-size: cover; background-position: center }
/* iOS/most touch devices ignore fixed backgrounds — fall back to normal scroll */
@media (hover: none) { .fx-svc, .fx-faq, .fx-bg { background-attachment: scroll } }

/* Services mega menu (desktop): hovering/focusing the Services nav item drops a
   full-width panel of the service pages. It lives inside .nav-desktop, so it is
   hidden with the rest of the desktop nav below 960px (the mobile menu lists the
   services instead). */
.mega { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #FEFEFE; border-top: 1px solid #ECE4DD; box-shadow: 0 18px 30px rgba(46, 12, 14, 0.10); z-index: 60 }
.mega::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px } /* hover bridge over the gap */
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.mega-open .mega { display: block }
.mega-item { display: block; padding: 13px 16px; border-radius: 10px; text-decoration: none; transition: background-color 0.18s ease }
.mega-item strong { display: block; color: #601B1E; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 17px; margin-bottom: 3px }
.mega-item span { display: block; color: #4A4A4A; font-weight: 400; font-size: 13px; line-height: 1.45 }
.mega-item:hover { background: #F7F3EF }
.mega-all { background: #F7F3EF }
.mega-all strong { color: #627047 }

/* Active-page nav indicator (classes added by public/site.js). Top-level items
   (and the parent section of a service sub-page) get an olive underline; the
   active Services mega item gets an olive-tinted panel; mobile items get an
   olive bar and tint. */
header a.nav-active-top, header a.nav-parent-top {
  text-decoration: underline !important; /* beats the inline text-decoration:none */
  text-decoration-color: #627047 !important;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}
header .mega-item.nav-active-mega { background: #EDE4DB }
header .mega-item.nav-active-mega strong { color: #627047 }
#mobile-nav a.nav-active-mobile, #mobile-nav a.nav-parent-mobile {
  color: #627047 !important; /* beats the inline color */
  background: #F4EFE9;
  box-shadow: inset 4px 0 0 #627047;
}

/* Mobile menu: below 960px the desktop nav collapses to a hamburger that opens
   #mobile-nav (toggled by public/site.js). */
.nav-toggle { display: none }
.mobile-nav { display: none }
@media (max-width: 960px) {
  .nav-desktop { display: none !important } /* beats the inline display:flex */
  .nav-toggle { display: inline-flex; align-items: center }
  .nav-row { justify-content: space-between !important } /* beats inline justify-content:center; logo left, toggle right */
  .mobile-nav.is-open { display: block }
}

/* Homepage "What to expect at your first visit" decor: on phones the shapes
   bunch at the top, so drop the cream/red soft shape to the bottom of the
   section (the sage shape + maroon rings stay put). */
@media (max-width: 700px) {
  .decor-red { top: auto !important; bottom: -200px !important }
}

/* Skip-to-content link injected by SiteLayout: off-screen until focused */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden }
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 10px 16px; background: #601B1E; color: #FEFEFE; border-radius: 6px; z-index: 1000 }

/* Scroll-reveal: elements tagged [data-reveal] (scripts/add-reveal.mjs) fade +
   rise + gently zoom in as they enter the viewport; public/site.js adds
   .is-visible. Gated on html.js (set inline in the layout head, so content is
   never hidden pre-paint for no-JS) AND on prefers-reduced-motion: no-preference
   (so reduced-motion users get everything shown instantly). A ~0.9s ease with a
   140ms base delay keeps it unhurried; --reveal-delay staggers items within a
   section. box-shadow/border-color are in the list (0 delay) so card hovers on
   these same elements stay snappy. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    transition:
      opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
      box-shadow 0.3s ease,
      border-color 0.3s ease,
      color 0.2s ease;
    transition-delay: calc(140ms + var(--reveal-delay, 0ms)), calc(140ms + var(--reveal-delay, 0ms)), 0s, 0s, 0s;
  }
  html.js [data-reveal].is-visible { opacity: 1; transform: none }
}

/* --- Hover affordances (elements tagged by public/site.js) --- */

/* Buttons (.btn): lift + soft maroon-tinted shadow; press settles back down. */
.btn { transition: box-shadow 0.22s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) }
.btn:hover { box-shadow: 0 10px 22px rgba(46, 12, 14, 0.22) }

/* Cards (.card-hover): deepen the shadow and warm the border on hover. */
.card-hover { transition: box-shadow 0.3s ease, border-color 0.3s ease }
.card-hover:hover { box-shadow: 0 16px 34px rgba(46, 12, 14, 0.14); border-color: #D8C9BE }

/* Footer columns: a wide logo column with three skinnier text columns; it
   collapses to two columns, then one, on narrower screens. */
.footer-cols { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr }
@media (max-width: 1000px) { .footer-cols { grid-template-columns: repeat(3, 1fr) } }
@media (max-width: 620px) { .footer-cols { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 400px) { .footer-cols { grid-template-columns: 1fr } }

/* Placeholders: unfilled [bracketed] copy, highlighted so it's obvious on the
   page until the client supplies the real value. */
.ph { background: #fff35b; color: #2B2B2B; font-weight: 700; padding: 0 3px; border-radius: 2px }

/* Service cards (homepage services grid): the whole card is a link that floats
   on hover while the round icon fills maroon (its line icon turns white). The
   card link has no underline; only the .svc-link "button" keeps one. */
.svc-card { display: block; text-align: center; text-decoration: none; color: inherit; border-radius: 14px; padding: 24px 18px; transition: box-shadow 0.26s ease, background-color 0.26s ease, transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) }
.svc-card:hover { background: #FEFEFE; box-shadow: 0 20px 40px rgba(46, 12, 14, 0.16) }
.svc-card .svc-icon { transition: background-color 0.26s ease, border-color 0.26s ease }
.svc-card .svc-icon svg { transition: stroke 0.26s ease }
.svc-card:hover .svc-icon { background: #601B1E; border-color: #601B1E }
.svc-card:hover .svc-icon svg { stroke: #FEFEFE }
.svc-card .svc-link { color: #627047; font-weight: 600; font-size: 14px; text-decoration: underline }

/* Hero check-mark badges (.check-item): label turns maroon, icon pops. */
.check-item { transition: color 0.2s ease }
.check-item:hover { color: #601B1E }
.check-item svg { transition: transform 0.2s ease }

/* Movement-only hover bits, disabled for reduced-motion users. */
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px) }
  .btn:active { transform: translateY(0) }
  .check-item:hover svg { transform: scale(1.18) }
  .svc-card:hover { transform: translateY(-8px) }
}

/* reCAPTCHA v3: the floating badge is hidden; the required Google notice sits
   under the contact form instead (Google permits this when the notice is shown). */
.grecaptcha-badge { visibility: hidden }
