/* ==========================================================================
   UTILITIES
   Single-purpose, highest-specificity overrides. Prefixed `u-`.
   These win on purpose — use sparingly, never build a component from them.
   ========================================================================== */

.u-text-center { text-align: center !important; }

/* Forces a line break, desktop only (>1024px) — hidden everywhere else so
   it doesn't affect mobile/tablet wrapping. */
.u-break-desktop { display: none !important; }
@media (min-width: 1025px) {
  .u-break-desktop { display: block !important; }
}

.u-mb-0 { margin-bottom: 0 !important; }

.u-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  /* Genuinely invisible either way (clipped to 1x1px), but contrast
     checkers (WAVE included) still compute a text/background pairing
     for it — without this, that pairing is whatever the element
     inherits from its ancestors, which varies by where it's used and
     can land on a low-contrast combination (e.g. dark text inherited
     over a dark section background) and get flagged as a false-positive
     error. Pinning an explicit, always-passing pair here fixes that
     for every use of this class sitewide. */
  color: var(--color-ink) !important;
  background: var(--color-white) !important;
}

/* Skip-to-content link — hidden until keyboard-focused, then pinned
   top-left above everything so keyboard/screen-reader users can bypass
   the repeated primary nav on every page. */
.u-skip-link {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  z-index: 1000;
  background: var(--color-espresso-900);
  color: var(--color-white);
  font-family: var(--font-sub);
  font-size: var(--fs-sm);
  text-decoration: none;
  padding-block: var(--space-3) !important;
  padding-inline: var(--space-5) !important;
}

.u-skip-link:focus {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  top: var(--space-3);
  left: var(--space-3);
}

/* Motion — scroll reveal
   Gated behind .js (set by js/main.js as soon as it runs) so that with
   JavaScript disabled or failed, [data-reveal] content is simply visible —
   this is progressive enhancement, not a required behavior. */
.js [data-reveal] {
  filter: opacity(0);
  transform: translateY(24px);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.js [data-reveal].is-visible {
  filter: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    filter: none;
    transform: none;
    transition: none;
  }
}

/* Print — hide chrome/decoration, keep the content and contact info legible
   on paper. Clients commonly print a page for their records. */
@media print {
  .c-header, .c-nav-toggle, .c-footer__ghost,
  .c-follow__marquee, .u-skip-link, .c-nav-toggle__bar,
  [class*="chat-widget"], .c-post-consult__btn, .c-mission-cta__btn,
  .c-post-consult, .c-contact-cta__row a[href^="tel:"] ~ *,
  .c-name-banner,
  form, button, iframe {
    display: none !important;
  }

  /* [data-reveal] elements stay at opacity:0 on screen until scrolled
     into view via IntersectionObserver — a freshly-loaded page printed
     immediately would otherwise render most of its content invisible.
     Print-only; never affects on-screen rendering. */
  .js [data-reveal] {
    filter: none !important;
    transform: none !important;
  }

  /* Native <details> prints in whatever open/closed state it's in on
     screen; with no FAQ item open by default, every answer would
     otherwise be silently omitted. Force answers visible on paper
     regardless of their on-screen expanded/collapsed state. The
     accordion's own JS sets height/opacity/visibility/pointer-events
     as inline styles when closed (faq/index.html) — display alone no
     longer suffices to reveal a closed answer since that inline JS
     was added; every property it sets must be reset here too. */
  .c-faq__item:not([open]) > .c-faq__answer {
    display: block !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: normal;
  }

  a[href^="#"]::after,
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after {
    content: "";
  }

  /* These headings/ledes are styled white/snow for readability over a
     dark photo overlay on screen — browsers don't print CSS background
     images/colors by default, so on paper the overlay disappears but the
     text color didn't, leaving it invisible on the white page. Print-only;
     never affects on-screen rendering. */
  .c-mission-cta__title,
  .c-mission-cta__lede,
  .c-contact-hero__title,
  .c-contact-hero__lede,
  .c-contact-hero__lede a,
  .c-explore__link-title--overlay,
  .c-btn {
    color: var(--color-ink) !important;
  }

  body {
    color: #000;
    background: var(--color-white);
  }

  .o-container {
    max-width: 100% !important;
  }

  /* Same reasoning as the no-JS fallback above (components.css): with JS
     present, all slides but the active one are hidden and grid-stacked on
     top of each other for the on-screen crossfade — printing would
     otherwise silently omit 5 of 6 testimonials with no indication
     anything was left out. Reset to plain auto-flow, all visible. */
  .js .c-tslider__slide {
    grid-row-start: auto;
    grid-row-end: auto;
    grid-column-start: auto;
    grid-column-end: auto;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
