/* Phone layout tweaks. Only applies on narrow screens; desktop is unchanged.
   The pages use inline styles, so overrides here need !important. */
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  /* Header: compact, logo on top, menu buttons wrap to fit the screen width */
  .hdr {
    padding: 14px 20px 12px !important;
    gap: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hdr > a:first-child { font-size: 24px !important; }
  .nav {
    flex-wrap: wrap !important;
    gap: 6px !important;
    font-size: 14px !important;
  }
  .nav > a { white-space: nowrap; padding: 8px 12px !important; }

  /* Happy Bee: slimmer top bar and logo */
  .topbar { padding: 8px 20px !important; font-size: 13px !important; }
  .topbar > span { display: none; }
  .hdr-bee { background: #f3c431; }
  .hdr-bee > a:first-child span[style*="width:64px"] { width: 44px !important; height: 44px !important; }
  .hdr-bee > a:first-child > span:last-child { font-size: 22px !important; }
  .hdr-bee > a:first-child > span:last-child > span { font-size: 14px !important; }

  /* Less empty space between sections */
  [style*="padding:88px"], [style*="padding:80px"], [style*="padding:72px"] {
    padding-top: 52px !important; padding-bottom: 52px !important;
  }
  [style*="88px;display:grid"], [style*="96px;columns"], [style*="72px;display:flex"], [style*="0 clamp(20px,4vw,48px) 88px"] {
    padding-bottom: 52px !important;
  }
  [style*="gap:48px"] { gap: 32px !important; }
  [style*="gap:56px"] { gap: 36px !important; }

  /* Buttons in the Happy Bee hero: full width, easy to tap */
  .cta { flex-direction: column; align-items: stretch !important; }
  .cta > a { text-align: center; }
}

@media (max-width: 640px) {
  /* Happy Bee hero hexagon: smaller so the page content comes sooner */
  .hero-hex { max-width: 220px !important; }
}

@media (max-width: 640px) {
  /* Small gap above sections reached by jump links */
  [id] { scroll-margin-top: 12px; }
}

@media (max-width: 640px) {
  /* Happy Bee: show "Join the waitlist" first in the menu row */
  .hdr-bee .nav > a:last-child { order: -1; }
}

@media (max-width: 380px) {
  /* Smaller phones: slightly tighter menu buttons so they fit in two rows */
  .nav { gap: 4px !important; font-size: 13px !important; }
  .nav > a { padding: 7px 10px !important; }
}
