/* KSHC homepage: mobile refinements (3 Oct 2026). Loaded after the app styles. */
@media (max-width: 640px) {
  /* ---- Hero ---- */
  #home { padding-top: 28px !important; padding-bottom: 28px !important; }
  /* keep only the soft background gradient; drop the chart lines, labels, dots and floating card */
  #home > div[aria-hidden="true"] > *:not(:first-child):not(:last-child) { display: none !important; }
  #home div:has(+ h1) { display: none !important; }      /* eyebrow that repeats the logo */
  #home h1 { font-size: 38px !important; line-height: 1.06 !important; margin-bottom: 14px !important; }
  #home h1 + p { font-size: 16px !important; line-height: 1.55 !important; margin-bottom: 20px !important; }
  #home h1 + p + div { margin-bottom: 24px !important; gap: 8px !important; }
  #home h1 + p + div a { padding: 13px 20px !important; font-size: 15px !important; }

  /* Services ticker under the stats */
  #home [style*="kshc-marquee"] span { font-size: 15px !important; }
  #home div:has(> [style*="kshc-marquee"]) { padding: 9px 0 !important; }

  /* ---- Section rhythm ---- */
  #problem, #services, #founder, #insights, #faq, #contact { padding-top: 44px !important; padding-bottom: 44px !important; }
  #problem h2, #services h2, #founder h2, #insights h2, #faq h2, #contact h2 {
    font-size: 31px !important; line-height: 1.12 !important; margin-bottom: 16px !important;
  }
  #problem p, #services p, #founder p, #insights p, #faq p, #contact p { font-size: 15.5px !important; line-height: 1.6 !important; }

  /* Services: compact cards, small number beside the title */
  #services h2 + p { margin-bottom: 22px !important; }
  #services a[href*="/services/"] {
    display: grid !important; grid-template-columns: 34px 1fr !important; gap: 10px !important;
    align-items: start !important; padding: 16px 16px !important; margin: 4px 0 !important;
  }
  #services a[href*="/services/"] > div:first-child { grid-area: 1 / 1 !important; font-size: 24px !important; line-height: 1.1 !important; padding-top: 2px; }
  #services a[href*="/services/"] > div:last-child { grid-area: 1 / 2 !important; padding-top: 0 !important; }
  #services a[href*="/services/"] h3 { font-size: 20px !important; margin-bottom: 4px !important; }
  #services a[href*="/services/"] p { font-size: 14.5px !important; line-height: 1.55 !important; }

  /* Founder: hide the "SK" placeholder card until a real portrait is added */
  #founder [style*="aspect-ratio: 4 / 5"] { display: none !important; }
  #founder p { font-size: 14.5px !important; line-height: 1.6 !important; margin-bottom: 12px !important; }

  /* Contact list: icon + value only, so long links do not break */
  #contact a[style*="border-bottom"] > div:first-of-type { display: none !important; }
  #contact h2 + p { margin-bottom: 20px !important; }
  #contact div:has(> a[style*="border-bottom"]) { gap: 0 !important; }
  #contact a[style*="border-bottom"] { gap: 14px !important; min-height: 44px; padding: 8px 0 !important; }
  #contact [style*="grid-template-columns: 0.9fr 1.1fr"] { gap: 28px !important; }
  /* Form: name and email one under the other, so the fields are not cut */
  #contact form { grid-template-columns: 1fr !important; padding: 20px !important; gap: 12px !important; }
  #contact form > * { grid-column: 1 / -1 !important; }
  #contact form p { font-size: 13px !important; line-height: 1.5 !important; }
  #contact form div:has(> button[type="submit"]) { display: flex !important; flex-direction: column-reverse !important; align-items: stretch !important; gap: 10px !important; }
  #contact form button[type="submit"] { width: 100% !important; justify-content: center !important; padding: 14px 20px !important; font-size: 15px !important; }
}

/* Stats panel: phones and tablets */
@media (max-width: 1024px) {
  /* Stats: one tight 2 x 2 panel */
  #home [style*="repeat(4, 1fr)"], #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] {
    grid-template-columns: 1fr 1fr !important; gap: 0 !important;
    border: 1px solid var(--border-warm) !important; border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.6) !important; margin-bottom: 18px !important; overflow: hidden;
  }
  #home [style*="repeat(4, 1fr)"] > div > div, #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] > div > div { padding: 14px 14px 13px !important; border-left: 0 !important; }
  #home [style*="repeat(4, 1fr)"] > div:nth-child(2n) > div, #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] > div:nth-child(2n) > div { border-left: 1px solid var(--border-warm) !important; }
  #home [style*="repeat(4, 1fr)"] > div:nth-child(n+3) > div, #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] > div:nth-child(n+3) > div { border-top: 1px solid var(--border-warm) !important; }
  #home [style*="repeat(4, 1fr)"] > div > div > div:first-child, #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] > div > div > div:first-child { font-size: 23px !important; margin-bottom: 3px !important; line-height: 1.1 !important; }
  #home [style*="repeat(4, 1fr)"] > div > div > div:last-child, #home [style*="grid-template-columns: 1fr 1fr"][style*="border-top"] > div > div > div:last-child { font-size: 12.5px !important; line-height: 1.4 !important; }

}
