/* ===== Amaith — responsive overrides ===== */
/* Inline styles win over normal rules, so these use !important and
   target inline-style substrings to stack the fixed grids on small screens. */

img { max-width: 100%; }
* { box-sizing: border-box; }

/* ---------- Tablet & below ---------- */
@media (max-width: 900px) {
  /* two-column / hero splits stack */
  [style*=": 1fr 1fr"],
  [style*=":1fr 1fr"],
  [style*="1.03fr 0.97fr"],
  [style*="1.02fr 0.98fr"],
  [style*="1.05fr 0.95fr"],
  [style*="0.9fr 1.1fr"],
  [style*="1.5fr 1.05fr"],
  [style*="1.6fr 1fr 1fr 1fr"],
  [style*="0.82fr 1.55fr 1.05fr"],
  [style*="1fr auto 1fr auto 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* equal multi-column card grids → 2 up */
  [style*="repeat(3"] { grid-template-columns: 1fr 1fr !important; }
  [style*="repeat(4"] { grid-template-columns: 1fr 1fr !important; }
  [style*="repeat(5"] { grid-template-columns: 1fr 1fr !important; }

  /* tighten oversized section padding (keep generous rhythm, less side gutter) */
  [style*="padding: 92px 32px 96px"] { padding: 60px 20px 56px !important; }
  [style*="padding: 96px 32px"]  { padding: 60px 20px !important; }
  [style*="padding: 100px 32px"] { padding: 60px 20px !important; }
  [style*="padding: 104px 32px"] { padding: 60px 20px !important; }
  [style*="padding: 90px 32px"]  { padding: 56px 20px !important; }
  [style*="padding: 88px 32px"]  { padding: 56px 20px !important; }
  [style*="padding: 84px 32px"]  { padding: 56px 20px !important; }
  [style*="padding: 92px 32px"]  { padding: 56px 20px !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 620px) {
  [style*="repeat(3"],
  [style*="repeat(4"],
  [style*="repeat(5"] { grid-template-columns: 1fr !important; }

  h1 { font-size: 33px !important; line-height: 1.14 !important; }
  h2 { font-size: 26px !important; line-height: 1.2 !important; }
  h3 { font-size: 19px !important; }

  /* keep big hero dashboards/quotes from overflowing */
  blockquote { font-size: 21px !important; line-height: 1.4 !important; }
}

/* ===== Mobile navigation ===== */
[data-navtoggle] { display: none; }

@media (max-width: 860px) {
  [data-navlinks] { display: none !important; }
  [data-navtoggle] { display: inline-flex !important; }

  [data-navlinks][data-open="true"] {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 74px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid #E6EBF2;
    padding: 10px 16px 16px !important;
    gap: 2px !important;
    box-shadow: 0 18px 30px -16px rgba(15,42,74,.25);
  }
  [data-navlinks][data-open="true"] a {
    padding: 13px 14px !important;
    font-size: 16px !important;
    border-radius: 8px;
  }
}

@media (max-width: 520px) {
  header img { height: 38px !important; }
  [data-navcta] { padding: 9px 14px !important; font-size: 13px !important; }
}
