/* mobile.css — Meridian marketing pages responsive layer */

/* ─── Prevent horizontal overflow on the whole page ─────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }

/* ─── Hamburger button (hidden on desktop) ───────────────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  border: none; background: transparent; cursor: pointer; padding: 4px;
  border-radius: 6px; flex-shrink: 0;
}
.hamburger-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform .22s ease, opacity .22s, width .22s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile nav overlay ─────────────────────────────────────────────────── */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }

/* ─── Mobile nav drawer ──────────────────────────────────────────────────── */
.mobile-nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(280px, 82vw); z-index: 201;
  background: var(--bg-nav);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
  padding: 16px 16px 28px;
  overflow-y: auto;
}
.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-wordmark {
  font-size: 17px; font-weight: 700; letter-spacing: -.3px;
  color: var(--text); text-decoration: none;
}
.mobile-nav-close {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.mobile-nav-close:hover { border-color: var(--text-muted); color: var(--text); }

.mobile-nav-links {
  list-style: none; display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.mobile-nav-links a {
  display: block; padding: 12px 14px; border-radius: 7px;
  font-size: 15px; font-weight: 500; color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mobile-nav-links a:hover { background: var(--border); color: var(--text); }
.mobile-nav-links a.active { background: var(--accent-bg); color: var(--accent); }

.mobile-nav-bottom {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.mobile-nav-bottom .mobile-cta {
  display: block; text-align: center;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 13px 20px; border-radius: 7px; text-decoration: none;
  transition: opacity .15s;
}
.mobile-nav-bottom .mobile-cta:hover { opacity: .88; color: #fff; }
.mobile-nav-bottom .theme-toggle { width: 100%; justify-content: center; }

/* ─── Show hamburger at 860px, hide desktop nav elements ─────────────────── */
@media (max-width: 860px) {
  .hamburger-btn { display: flex; }
  .nav-links { display: none; }
  .nav-right .btn-nav { display: none; }
  .nav-right .theme-toggle { display: none; }
}

/* ─── 600px: layout tightening ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-inner { padding: 0 16px; height: 56px; }
  .container { padding: 0 16px; }

  /* Hero */
  #hero { padding: 72px 0 60px; }
  .hero-title { letter-spacing: -.8px; }
  .hero-sub { font-size: 16px; margin-bottom: 32px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn-primary,
  .hero-cta .btn-outline { justify-content: center; }

  /* Sections */
  section { padding: 56px 0; }
  .section-sub { font-size: 15px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 16px; }
  .footer-copy { text-align: left; }

  /* How It Works: steps already auto-fit but force 1-col below 480px */
  .steps { grid-template-columns: 1fr; }

  /* Pricing cards */
  .pricing-cards { grid-template-columns: 1fr; }

  /* Waitlist form */
  .waitlist-wrap { gap: 32px; }

  /* Demo: make chat tables horizontally scrollable */
  .chat-window { border-radius: 10px; }
  .msg-bot { font-size: 13px; }
  .chat-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Developer: hide endpoint description text on small screens */
  .endpoint-meta { font-size: 12px; }
}

/* ─── 400px: very small phones ───────────────────────────────────────────── */
@media (max-width: 400px) {
  .hero-badge { font-size: 11px; }
  .btn-primary, .btn-outline { font-size: 14px; padding: 11px 20px; }
}
