/* ===========================================================
   Konvertable — Responsive overrides (mobile + tablet)
   Loaded site-wide AFTER each page's inline <style> so it wins
   on cascade. Keep desktop visuals untouched (>= 768px).
   =========================================================== */

/* Phones (≤ 640px) ---------------------------------------- */
@media (max-width: 640px) {

  /* --- Container padding (so content never glues to edges) -- */
  .max-w-\[1240px\],
  .max-w-\[1100px\],
  .max-w-\[1400px\],
  .max-w-\[900px\],
  .max-w-\[1040px\],
  .max-w-\[1000px\] { padding-left: 20px; padding-right: 20px; }

  /* --- Heading scale-down (large display sizes break narrow vp) -- */
  .text-\[92px\] { font-size: 44px !important; line-height: 1.04 !important; }
  .text-\[64px\] { font-size: 36px !important; line-height: 1.06 !important; }
  .text-\[60px\] { font-size: 34px !important; line-height: 1.06 !important; }
  .text-\[58px\] { font-size: 34px !important; line-height: 1.06 !important; }
  .text-\[56px\] { font-size: 32px !important; line-height: 1.08 !important; }
  .text-\[52px\] { font-size: 30px !important; line-height: 1.1  !important; }
  .text-\[44px\] { font-size: 30px !important; line-height: 1.1  !important; }
  .text-\[40px\] { font-size: 28px !important; line-height: 1.12 !important; }
  .text-\[38px\] { font-size: 26px !important; }
  .text-\[34px\] { font-size: 26px !important; }
  .text-\[32px\] { font-size: 24px !important; }
  .text-\[28px\] { font-size: 22px !important; }
  .text-\[26px\] { font-size: 20px !important; }
  .text-\[22px\] { font-size: 18px !important; }

  /* Stat numbers (clamp had high min) */
  .stat-num     { font-size: 56px !important; }
  .stat-num-sm  { font-size: 38px !important; }

  /* --- Section vertical padding --- */
  .py-28 { padding-top: 64px !important;  padding-bottom: 64px !important; }
  .py-20 { padding-top: 56px !important;  padding-bottom: 56px !important; }
  .pt-40 { padding-top: 80px !important; }
  .pb-32 { padding-bottom: 64px !important; }
  .pt-24 { padding-top: 56px !important; }
  .pt-20 { padding-top: 56px !important; }

  /* --- Cards: kill fixed heights and excessive padding --- */
  .h-\[320px\] { height: auto !important; min-height: 0 !important; }
  .h-\[280px\] { height: auto !important; }
  .p-10 { padding: 24px !important; }
  .p-8  { padding: 22px !important; }
  .p-6  { padding: 18px !important; }

  /* --- Testimonial cards: stack stat over quote --- */
  .grid.grid-cols-\[auto_1fr\] { grid-template-columns: 1fr !important; gap: 18px !important; }
  .grid.grid-cols-\[auto_1fr\] > div.max-w-\[180px\] { max-width: 100% !important; }

  /* --- FAQ section: stack header above questions --- */
  .grid.md\:grid-cols-\[0\.9fr_1\.4fr\] { grid-template-columns: 1fr !important; }

  /* --- Process section sticky disabled on mobile (already handles this with md:sticky) --- */

  /* --- Hero dashboard mock: tighten padding --- */
  .px-6.py-12 { padding-top: 28px !important; padding-bottom: 28px !important; }

  /* --- "Tilt" laptop mockup → hide sidebar, let main content fit --- */
  .tilt {
    transform: none !important;
    box-shadow: 0 30px 60px -30px rgba(42,108,255,0.4) !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .tilt > .flex { display: block !important; }
  .tilt aside { display: none !important; }
  .tilt main { padding: 12px !important; min-width: 0 !important; }
  .tilt main .grid.grid-cols-2 { grid-template-columns: 1fr !important; gap: 10px !important; }
  .tilt main .grid.grid-cols-2 .grid.grid-cols-2 { grid-template-columns: 1fr 1fr !important; }
  .tilt main .col-span-2 { grid-column: span 2 / span 2 !important; }
  .tilt main .bg-white { padding: 10px !important; border-radius: 8px !important; }
  .tilt main .text-\[22px\] { font-size: 16px !important; }
  .tilt main .text-\[18px\] { font-size: 13px !important; }
  /* table goes into its own scroll container */
  .tilt main > .bg-white:last-child {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .tilt main table { font-size: 9px !important; min-width: 460px; }
  .tilt main table td, .tilt main table th { padding: 4px 4px !important; white-space: nowrap; }
  .tilt main svg.w-12 { width: 36px !important; height: 36px !important; }

  /* --- Footer CTA strip layout --- */
  .px-6.md\:px-10.py-8 { padding-left: 20px !important; padding-right: 20px !important; }

  /* --- Nav: pull horizontal padding in slightly --- */
  header nav.max-w-\[1240px\] { padding-left: 16px !important; padding-right: 16px !important; }
  header nav.max-w-\[1240px\] { height: 68px !important; }

  /* --- Buttons: never overflow narrow viewports --- */
  .btn-primary, .btn-ghost, .btn-dark { font-size: 13px !important; padding: 10px 18px !important; }

  /* --- Reduce dashboard inner card padding --- */
  .rounded-\[16px\].border.border-white\/8 { padding: 14px !important; }

  /* --- Logo size in header --- */
  header .font-display.text-\[22px\] { font-size: 18px !important; }

  /* --- Footer brand block --- */
  footer .text-\[34px\], footer .text-\[38px\] { font-size: 28px !important; }

  /* --- Body inputs --- */
  input, textarea, select { font-size: 16px !important; } /* prevent iOS zoom-on-focus */

  /* --- Generic margin tightening for huge top gaps --- */
  .mt-20 { margin-top: 48px !important; }
  .mt-24 { margin-top: 56px !important; }
  .mt-16 { margin-top: 40px !important; }
  .mt-14 { margin-top: 36px !important; }
  .mt-12 { margin-top: 32px !important; }

  /* --- Service card price/foot row --- */
  .svc-foot { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
  .svc-foot .svc-link { align-self: flex-start; }

  /* --- Long word break safety --- */
  h1, h2, h3, p, a { overflow-wrap: anywhere; word-break: normal; }

  /* --- Radar stays inside viewport --- */
  .radar-bg { max-width: 100% !important; height: 320px !important; top: 64px !important; }
}

/* Tablets & small laptops (641–900px) ---------------------- */
@media (min-width: 641px) and (max-width: 900px) {
  .text-\[92px\] { font-size: 64px !important; }
  .text-\[64px\] { font-size: 48px !important; }
  .text-\[60px\] { font-size: 46px !important; }
  .text-\[56px\] { font-size: 44px !important; }
  .text-\[52px\] { font-size: 40px !important; }
  .max-w-\[1240px\] { padding-left: 28px; padding-right: 28px; }
  .h-\[320px\] { height: auto !important; min-height: 280px !important; }
}

/* iPad portrait specific tweak ---------------------------- */
@media (min-width: 641px) and (max-width: 820px) {
  .grid.grid-cols-\[auto_1fr\] { grid-template-columns: 1fr !important; gap: 18px !important; }
}

/* ===========================================================
   Mobile navigation (hamburger panel) — styles
   The drawer markup is injected by mobile-nav.js
   =========================================================== */
.mnav-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: 12px;
  align-items: center; justify-content: center;
  background: rgba(123,168,255,0.06);
  border: 1px solid rgba(183,205,255,0.20);
  color: #E5EDFF;
  transition: background .2s, border-color .2s;
  margin-left: 6px;
}
.mnav-toggle:hover { background: rgba(123,168,255,0.12); border-color: rgba(183,205,255,0.4); }
.mnav-toggle:focus-visible { outline: 2px solid #B7CDFF; outline-offset: 3px; }
.mnav-toggle svg { width: 20px; height: 20px; }
.mnav-toggle .mnav-close-icon { display: none; }
.mnav-toggle[aria-expanded="true"] .mnav-open-icon  { display: none; }
.mnav-toggle[aria-expanded="true"] .mnav-close-icon { display: inline-block; }

.mnav-panel {
  position: fixed; inset: 68px 0 0 0;
  z-index: 60;
  background: rgba(4, 12, 32, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px 22px 32px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  border-top: 1px solid rgba(123,168,255,0.12);
  overflow-y: auto;
}
.mnav-panel.open {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}
.mnav-panel a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px;
  color: rgba(229,237,255,0.86);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(123,168,255,0.08);
  transition: color .2s ease, padding-left .2s ease;
}
.mnav-panel a:hover { color: #fff; padding-left: 8px; }
.mnav-panel a .mnav-arrow { color: rgba(123,168,255,0.6); font-size: 14px; }
.mnav-panel .mnav-cta-row {
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.mnav-panel .mnav-cta-row a {
  border-bottom: 0; justify-content: center;
  padding: 14px 22px; border-radius: 999px;
  font-size: 15px;
}
.mnav-panel .mnav-cta-row a.mnav-primary {
  background: linear-gradient(180deg, #4380FF 0%, #2A6CFF 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.30) inset, 0 -8px 18px rgba(20,52,170,0.55) inset, 0 18px 30px -12px rgba(42,108,255,0.6);
}
.mnav-panel .mnav-cta-row a.mnav-ghost {
  border: 1px solid rgba(183,205,255,0.22);
  color: #fff;
}
.mnav-panel .mnav-meta {
  margin-top: auto; padding-top: 18px;
  font-size: 12px; color: rgba(189,203,232,0.55);
  letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center;
}

@media (max-width: 1023px) {
  .mnav-toggle { display: inline-flex; }
  body.mnav-open { overflow: hidden; }
  /* Hide the inline desktop nav links on tablets/phones — hamburger handles it */
  header nav > ul { display: none !important; }
  /* Hide the secondary "Contact Us" ghost CTA when space is tight (already hidden on phones via sm:inline-block) */
}
@media (max-width: 540px) {
  /* On narrow phones drop the secondary CTA to save room */
  header nav .btn-ghost { display: none !important; }
}
