/* Responsive layer. Media queries cannot be expressed inline, so this file
   holds ONLY breakpoint overrides for the inline-styled pages. */

/* ---------- tablet and below ---------- */
@media (max-width: 1024px) {
  [style*="min-width:1440px"],
  [style*="min-width: 1440px"] { min-width: 0 !important; }

  /* section shells */
  [style*="padding:0 34px"],
  [style*="padding: 0 34px"] { padding-left: 22px !important; padding-right: 22px !important; }
  [style*="padding:78px 34px 0"],
  [style*="padding: 78px 34px 0"] { padding: 40px 22px 0 !important; }

  /* every inline grid drops to two tracks */
  [style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* asymmetric layouts (map + aside, shield row) read better fully stacked */
  [style*="130px 1fr 150px"],
  [style*="360px 1fr 300px"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* hero copy reflows into the space the art vacated */
  [style*="max-width: 610px"],
  [style*="max-width:610px"],
  [style*="max-width: 600px"],
  [style*="max-width:600px"],
  [style*="max-width: 640px"],
  [style*="max-width:640px"] { max-width: min(100%, 780px) !important; }
  [style*="max-width: 545px"],
  [style*="max-width:545px"],
  [style*="max-width: 560px"],
  [style*="max-width:560px"],
  [style*="max-width: 540px"],
  [style*="max-width:540px"] { max-width: min(100%, 720px) !important; }

  /* decorative art and ambient glows are desktop-only */
  div:has(> [data-parallax]) { display: none !important; }
  [style*="animation: abd-drift"],
  [style*="animation:abd-drift"] { display: none !important; }

  /* nav */
  [data-desk-nav] { display: none !important; }
  [data-mob-btn] { display: flex !important; }
  [data-nav-cta] { display: none !important; }
  [data-nav-sub] { display: none !important; }
  nav[style*="height"] { height: 68px !important; gap: 14px !important; }
  nav img[alt="ABD Limited"] { height: 34px !important; }

  /* type scale */
  h1 { font-size: 42px !important; line-height: 1.12 !important; }
  h2 { font-size: 30px !important; line-height: 1.22 !important; }
  h3 { font-size: 19px !important; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* stacked cells lose their divider rules */
  [style*="border-right:1px solid"],
  [style*="border-right: 1px solid"] { border-right: 0 !important; }

  /* button rows stack full width, tap target never under 48px */
  a[style*="border-radius:6px"][style*="padding"]:not([data-nav-cta]),
  a[style*="border-radius: 6px"][style*="padding"]:not([data-nav-cta]),
  button[style*="border-radius:6px"],
  button[style*="border-radius: 6px"] {
    width: 100% !important;
    justify-content: center !important;
    min-height: 52px !important;
    font-size: 16px !important;
  }
  div[style*="display:flex"][style*="gap:22px"],
  div[style*="display: flex"][style*="gap: 22px"],
  div[style*="display:flex"][style*="gap:18px"],
  div[style*="display: flex"][style*="gap: 18px"],
  div[style*="display:flex"][style*="gap:16px"],
  div[style*="display: flex"][style*="gap: 16px"] { flex-wrap: wrap !important; }

  h1 { font-size: 33px !important; letter-spacing: -.015em !important; }
  h2 { font-size: 25px !important; }
  p { font-size: 15.5px !important; }

  [style*="padding:0 34px"],
  [style*="padding: 0 34px"] { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="padding:78px 34px 0"],
  [style*="padding: 78px 34px 0"] { padding: 28px 16px 0 !important; }

  /* generous inner padding shrinks so cards stop feeling hollow */
  [style*="padding:44px"],
  [style*="padding: 44px"],
  [style*="padding:46px"],
  [style*="padding: 46px"] { padding: 26px 20px !important; }

  section[style*="min-height"] { min-height: 0 !important; }
  [style*="max-width:1030px"],
  [style*="max-width: 1030px"] { max-width: 100% !important; }
  nav[style*="height"] { height: 62px !important; }
  nav img[alt="ABD Limited"] { height: 30px !important; }
  [data-nav-tag] { display: none !important; }
}

/* ---------- interaction polish ---------- */
a, button { -webkit-tap-highlight-color: rgba(245,130,32,.18); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #F58220;
  outline-offset: 3px;
  border-radius: 4px;
}
img { -webkit-user-drag: none; }

@media (hover: none) {
  /* no sticky hover states on touch */
  a, button, [style*="transition"] { transition-duration: .12s !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .abd-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
}
