/* Shared by every page. Linked before each page's own <style>, so a page can
   still override any of this. Holds only what every page needs and none had:
   a visible focus ring, reduced-motion handling, the phone nav toggle, larger
   hit areas on small text links, and a print layout. */

:root {
  --navy: #0f2d4a;
  /* gold for small text on the navy gradients: 4.99:1 at the gradient's light end */
  --gold-light: #e0c67a;
}

/* Two-tone ring: the navy outline shows on light surfaces, the white inner ring
   on navy ones, so one rule works everywhere. */
:focus-visible {
  outline: 3px solid #0f2d4a;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
  border-radius: 4px;
}

.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;
}

/* Phone nav toggle. Pages hide .nav-links at 768px; this button and
   resources/js/mobile-nav.js bring them back as a menu. */
nav .nav-mobile-toggle {
  display: none; width: 44px; height: 44px; padding: 11px; margin-right: -11px;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
nav .nav-mobile-toggle span {
  display: block; width: 22px; height: 2px; margin: 4px 0;
  background: #ffffff; border-radius: 2px;
}
@media (max-width: 768px) {
  nav .nav-mobile-toggle { display: block; }
}

/* Hit areas: nav and back links are about 24px of text. Padding grows the
   target to 44px while the negative margin keeps the layout where it was. */
.nav-links a:not(.cta-nav),
.nav-brand,
.nav-back,
.back-link {
  padding-block: 10px;
  margin-block: -10px;
}
@media (max-width: 768px) {
  /* inside the opened phone menu the links stack, so let them take full height */
  .nav-links a:not(.cta-nav) { margin-block: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .fade-up { opacity: 1 !important; transform: none !important; }
}

@media print {
  nav, .nav-mobile-toggle, .socials-bar, .cta-block, .cta-section, .header-cta-sm { display: none !important; }
  body { background: #ffffff !important; color: #000000 !important; }
  a { color: inherit !important; text-decoration: underline; }
}

/* The social icon row doesn't fit a very narrow viewport (a phone at 200% zoom). */
.socials-bar { flex-wrap: wrap; row-gap: 16px; }

/* Very narrow viewports (a 390px phone at 200% zoom is ~195px wide): let long
   words wrap anywhere, cap images to their column, and step hero headlines down. The
   :root prefix outranks each page's own .hero h1 rule, which loads later. */
@media (max-width: 360px) {
  :root img { max-width: 100%; height: auto; }
  :root .hero h1 { font-size: 1.9rem; }
  /* grid and flex children default to min-width: auto, which stops 1fr tracks
     from shrinking below their content */
  :root body * { min-width: 0; overflow-wrap: anywhere; }
}
