/* ============================================================
   ENHANCE — responsive, mobile nav, a11y. Layered on top of the
   design's inline styles WITHOUT changing the desktop look.
   ============================================================ */

/* Skip link */
.skip-link { position:absolute; left:-9999px; top:0; z-index:999; background:var(--ink,#1B1712); color:#FBF7EE; padding:12px 20px; font-family:'IBM Plex Mono',monospace; font-size:13px; }
.skip-link:focus { left:8px; top:8px; }

/* Image-or-placeholder helper block keeps the design's aspect box */
.hc-img { width:100%; height:100%; object-fit:cover; display:block; }

/* Mobile nav toggle — hidden on desktop, shown under 820px */
.nav-toggle { display:none; background:none; border:0; cursor:pointer; padding:8px; margin-left:auto; }
.nav-toggle span { display:block; width:24px; height:2px; background:var(--ink,#1B1712); margin:5px 0; transition:transform .25s, opacity .25s; }

@media (max-width: 820px) {
  /* Hide the desktop link cluster; show hamburger */
  nav > div[style*="gap:26px"] { display:none !important; }
  .nav-toggle { display:block; }
  body.nav-open nav > div[style*="gap:26px"] {
    display:flex !important; position:absolute; left:0; right:0; top:100%;
    flex-direction:column; align-items:flex-start; gap:4px !important;
    background:var(--paper,#F3EDE1); border-bottom:2px solid var(--ink,#1B1712);
    padding:16px 44px 24px; z-index:90;
  }
  nav { position:relative; flex-wrap:wrap; }

  /* Top bar: collapse the three-column strip on small screens */
  div[style*="ESTABLISHED ACROSS FIVE"] { display:none !important; }

  /* Grids that are 2-col in the design collapse to 1-col */
  section div[style*="grid-template-columns:1fr 1fr"],
  section div[style*="grid-template-columns: 1fr 1fr"],
  section div[style*="grid-template-columns:1.1fr"],
  section div[style*="grid-template-columns:1.2fr"],
  section div[style*="grid-template-columns:1.3fr"],
  section div[style*="grid-template-columns:1.4fr"],
  section div[style*="grid-template-columns:0.9fr"],
  section div[style*="grid-template-columns:repeat(3"],
  section div[style*="grid-template-columns:repeat(4"],
  section div[style*="grid-template-columns:190px"] {
    grid-template-columns: 1fr !important;
  }

  /* Footer columns stack */
  footer div[style*="grid-template-columns:1.4fr"] { grid-template-columns:1fr !important; gap:32px !important; }

  /* Reduce big hero type on phones */
  h1[style*="82px"] { font-size:clamp(40px,11vw,60px) !important; }
  h2[style*="48px"], h2[style*="44px"], h2[style*="40px"] { font-size:clamp(28px,7vw,38px) !important; }

  /* Tighten section padding */
  section div[style*="padding:74px 44px"],
  section div[style*="padding:76px 44px"],
  section div[style*="padding:84px 44px"] { padding:48px 22px !important; }
  nav[style*="padding:20px 44px"] { padding:16px 22px !important; }
  div[style*="padding:10px 44px"] { padding:10px 22px !important; }
  footer div[style*="padding:64px 44px"] { padding:48px 22px 32px !important; }
}

@media (max-width: 520px) {
  /* Credibility strip / any 4-col strips → single column */
  section div[style*="grid-template-columns:repeat(4"] { grid-template-columns:1fr !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
