/* Orbit site — tablet/mobile overrides.
   Pages are authored inline-styled at desktop widths; these rules override the
   structural inline styles via !important, keyed on style-attribute substrings. */

html, body { overflow-x: clip; }

/* ── Landing hero composition (fixed 980px canvas) — scale down in steps ── */
@media (max-width: 1059px) {
  section[data-hero-ref] { overflow: hidden; }
  section[data-hero-ref] > div[style*="980px"] { transform: scale(0.7); transform-origin: top center; height: 400px !important; margin-top: 0 !important; }
  section[data-hero-ref] h1 { font-size: clamp(32px, 5.6vw, 60px) !important; }
  section[data-hero-ref] > p { margin-top: 0 !important; }
}
@media (max-width: 719px) {
  section[data-hero-ref] > div[style*="980px"] { transform: scale(0.42); height: 245px !important; }
}
@media (max-width: 479px) {
  section[data-hero-ref] > div[style*="980px"] { transform: scale(0.36); height: 215px !important; }
}

/* ── Two-column section heads / splits collapse ── */
@media (max-width: 1023px) {
  [style*="7fr 5fr"], [style*="4fr 7fr"], [style*="5fr 6fr"],
  [style*="1.1fr 0.9fr"], [style*="1.04fr 1.16fr"],
  [style*="minmax(0,5fr) minmax(0,6fr)"], [style*="minmax(0, 5fr) minmax(0, 6fr)"], [style*="minmax(0px, 5fr) minmax(0px, 6fr)"],
  [style*="minmax(0,1fr) 600px"], [style*="minmax(0, 1fr) 600px"], [style*="minmax(0px, 1fr) 600px"],
  [style*="200px minmax(0,1fr)"], [style*="200px minmax(0, 1fr)"], [style*="200px minmax(0px, 1fr)"] {
    grid-template-columns: minmax(0,1fr) !important;
  }
  [style*="2fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; row-gap: 36px !important; }
}

/* ── Three/four-across grids ── */
@media (max-width: 859px) {
  [style*="repeat(3,1fr)"], [style*="repeat(3, 1fr)"],
  [style*="1fr 1fr 1fr"] { grid-template-columns: minmax(0,1fr) !important; }
  [style*="repeat(4,1fr)"], [style*="repeat(4, 1fr)"] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  [style*="56px 1fr 200px"] { grid-template-columns: 48px minmax(0,1fr) !important; }
  [style*="repeat(2,minmax(0px, 1fr))"], [style*="repeat(2, minmax(0px, 1fr))"] { grid-template-columns: minmax(0,1fr) !important; }
  section, header, footer { padding-left: 20px !important; padding-right: 20px !important; }
  h2 { font-size: clamp(24px, 6.2vw, 40px) !important; }
}

/* ── Phones ── */
@media (max-width: 599px) {
  [style*="repeat(2,1fr)"], [style*="repeat(2, 1fr)"], [style*="1fr 1fr"] { grid-template-columns: minmax(0,1fr) !important; }
  nav div[style*="gap:28px"], nav div[style*="gap: 28px"] { display: none !important; }
  h1 { font-size: clamp(28px, 9vw, 46px) !important; line-height: 1.1 !important; }
  [style*="padding:96px 24px"] { padding-top: 64px !important; }
  [style*="padding:104px"] { padding-top: 64px !important; padding-bottom: 56px !important; }
  [style*="padding:128px"] { padding-top: 72px !important; padding-bottom: 72px !important; }
}
