/* Shared nav, footer and industry finder for every practicerank.ai vertical page.
 *
 * Generated pages link this file through scripts/site_nav.py (apply_shared), so
 * a fix here reaches every page at once. Spec:
 * specs/active/2026-11-04_podiatry-vertical-and-mobile-industries_v2.html
 *
 * Rule from the motion skill: nothing here may hide content outside a guard.
 * The only display:none rules are the phone/desktop swap below, and every
 * vertical link stays in the HTML three times (desktop dropdown, footer column,
 * industry sheet), so a crawler without a viewport still reads all of them.
 */

/* Phone menu. It is a full-screen <dialog> centred with justify-content:center,
   which pushes overflow ABOVE the top edge where it cannot be scrolled to: at
   375x667 with Industries open, Services and Results were unreachable. Start at
   the top, and centre only when "safe" centring is supported (it falls back to
   start instead of clipping). */
dialog.mobile-menu[open] { justify-content: flex-start; overflow-y: auto; }
@supports (justify-content: safe center) {
  dialog.mobile-menu[open] { justify-content: safe center; }
}
/* Inside the phone menu the list opens on tap only. The desktop rule
   .industry-nav:hover .industry-dropdown outranks the menu's own display:none,
   and touch browsers apply :hover on touchstart, so the list opened under the
   finger before the click landed: in testing, tapping Industries followed the
   Medical Practices link that had just appeared under it. */
dialog.mobile-menu .industry-nav:not(.open):hover .industry-dropdown { display: none; }
@media (hover: none) {
  .industry-nav:not(.open):hover .industry-dropdown { display: none; }
}
/* The Industries button jumped left when its list opened. */
dialog.mobile-menu .industry-nav { display: flex; flex-direction: column; align-items: center; }
dialog.mobile-menu .industry-dropdown a { padding: 0.35rem 0; }

/* Footer. Links were --text-faint (30% ink, 1.9:1) and headings --text-muted
   (2.84:1). --text-secondary is 4.6:1 on the light background and 0.86 white in
   dark mode. */
/* --text-secondary measured 4.44:1 on the light background, still short of
   4.5:1, so the footer uses --text at 78% opacity instead: about 8:1 light and
   well clear in dark mode, from the same token in both themes. */
.footer-col h4,
.footer-col a,
.footer-brand p,
.footer-bottom { color: var(--text); opacity: 0.78; }
.footer-col a:hover,
.footer-col a:focus-visible { opacity: 1; }
/* Three footer columns with a 3rem gap overflowed a 390px phone by 47px once
   the Industries column joined them. */
.footer-links { flex-wrap: wrap; gap: 1.5rem 2.5rem; }

/* Phone industry finder. Nine wrapped pills filled 207px above the H1 on a 667px
   phone and pushed the main button below the first screen. Below 640px the pill
   row becomes one line that opens the sheet; wider screens keep the pills. */
.hv-finder { display: none; }
@media (max-width: 639px) {
  .hero-verticals { display: none; }
  .hv-finder { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }
  .hv-finder-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.78); }
  .hv-finder-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.1); color: #f5f5f5; font-size: 0.92rem; font-weight: 600; text-decoration: none; }
  .hv-finder-btn:focus-visible { outline: 2px solid #6ee7a0; outline-offset: 2px; }
  .hv-finder-change { font-size: 0.8rem; font-weight: 600; color: #6ee7a0; text-decoration: underline; text-underline-offset: 2px; }
}

/* The sheet. A modal <dialog>: Esc closes it natively, focus is trapped, and its
   links are ordinary anchors in the page source. */
dialog.industry-sheet { display: none; }
dialog.industry-sheet[open] { display: flex; flex-direction: column; position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; padding: 1rem 1.25rem 1.5rem; border: none; overflow-y: auto; background: var(--bg, #f8faf9); color: var(--text, #1a1a2e); z-index: 1100; }
dialog.industry-sheet::backdrop { background: rgba(0,0,0,0.5); }
.industry-sheet .is-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.25rem 0 0.75rem; border-bottom: 1px solid var(--divider, rgba(0,0,0,0.1)); }
.industry-sheet .is-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.industry-sheet .is-close { min-width: 44px; min-height: 44px; background: none; border: none; font-size: 2rem; line-height: 1; color: inherit; cursor: pointer; }
.industry-sheet .is-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.industry-sheet .is-list a { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--divider, rgba(0,0,0,0.08)); color: inherit; text-decoration: none; font-size: 1.05rem; }
.industry-sheet .is-list a[aria-current="page"] { color: var(--accent, #16a34a); font-weight: 700; }
.industry-sheet .is-list a[aria-current="page"]::after { content: "Current"; margin-left: auto; font-size: 0.78rem; font-weight: 600; }
.industry-sheet .is-list .ind-icon { display: inline-flex; width: 1.4rem; }
.industry-sheet .is-list .ico { width: 1.2rem; height: 1.2rem; }
.industry-sheet .is-request { display: block; margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px dashed var(--accent-border, rgba(22,163,74,0.4)); color: var(--accent, #16a34a); font-weight: 700; text-decoration: none; }
.industry-sheet .is-request span { display: block; margin-top: 0.25rem; font-weight: 400; color: var(--text-secondary, rgba(26,26,46,0.7)); font-size: 0.9rem; }

/* Keyboard focus for the dropdown links (the button now reports aria-expanded). */
.industry-nav-btn:focus-visible,
.industry-dropdown a:focus-visible { outline: 2px solid var(--accent, #16a34a); outline-offset: 2px; }

/* Visually hidden, still read by screen readers (labels on placeholder-only fields). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Service pages: their hover-only dropdowns (Services, Blog, Industries) now
   also open for keyboard users. */
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

/* Scroll reveal: .fade-up starts at opacity 0 until it scrolls into view, so a
   keyboard user tabbing ahead landed on invisible cards (34 to 38 on /blog/).
   Anything holding focus is shown at once. */
html.reveal .fade-up:not(.visible):focus,
html.reveal .fade-up:not(.visible):focus-within { opacity: 1; transform: none; }

/* Optional "Your industry" field on the homepage audit form, revealed by
   site-nav.js when the visitor came from "Don't see your industry?". */
#requested-industry-wrap { display: flex; }
#requested-industry-wrap[hidden] { display: none; }
