/* =========================================
   Global base (keeps your laptop look)
   ========================================= */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
img { max-width: 100%; height: auto; display: block; }  /* responsive images */
a { text-decoration: none; }
:root {
  --container-max: 1200px;   /* nice readable width on laptops */
  --pad: 24px;               /* default horizontal padding */
}

/* Utility container (centered content) */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Optional helpers you can use in HTML */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Buttons (touch-friendly by default) */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 8px;
}

/* =========================================
   Mobile overrides (phones ≤ 640px wide)
   ========================================= */
@media (max-width: 640px) {
  /* Typography: shrink headlines a bit on phones */
  h1 { font-size: 1.75rem; line-height: 1.2; }  /* ~28px */
  h2 { font-size: 1.375rem; line-height: 1.25; }/* ~22px */

  /* Tighter side padding on small screens */
  :root { --pad: 16px; }

  /* Stack any 2-column hero/sections into 1 column */
  .stack-on-mobile { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

  /* Make buttons a touch larger */
  .btn { padding: 14px 20px; }

  /* Show/hide utilities */
  .desktop-only { display: none !important; }
  .mobile-only  { display: block !important; }

  /* Nav tweaks (if your nav uses a horizontal list) */
  .nav-horizontal { display: flex; gap: 16px; }
  .nav-collapse   { display: none; } /* hide extra links by default on phones */

  /* Images inside tight areas get rounded edges (optional) */
  .rounded-img { border-radius: 12px; overflow: hidden; }
}

/* =========================================
   Tablet & up (optional refinements)
   ========================================= */
@media (min-width: 768px) {
  /* Keep your laptop look as-is; add optional polish */
  .stack-on-mobile { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
