/* ============================================================
   CLAIPOT — MOBILE OPTIMIZATION + MEGA-MENU
   Loaded last. Refines touch UX and the mobile navigation.
   ============================================================ */

/* ---------- NAV CHEVRON (SVG, replaces glyph) ---------- */
.nav-chev { width: 14px; height: 14px; stroke: currentColor;
  transition: transform var(--dur-fast) var(--ease-clay); }
.nav-item:hover .nav-chev { transform: rotate(180deg); }

/* ---------- MOBILE MEGA-MENU DRAWER ---------- */
.nav-drawer {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 5rem 1.15rem 1.5rem;
}
.m-drawer-head { display: none; }
.m-section-label {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-faint);
  padding: 0.9rem 0.3rem 0.5rem;
}

/* product cards grid */
.m-mega-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem;
}
.m-mega-card {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.85rem; border: 1px solid var(--clay-200); border-radius: 12px;
  background: var(--white); transition: border-color var(--dur-fast) var(--ease-clay),
    transform var(--dur-fast) var(--ease-clay), background var(--dur-fast) var(--ease-clay);
}
.m-mega-card:active { transform: scale(0.97); background: var(--clay-50); }
.m-mega-ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--clay-100);
}
.m-mega-ico svg { width: 18px; height: 18px; stroke: var(--clay-700); }
.m-mega-tx { display: flex; flex-direction: column; line-height: 1.25; }
.m-mega-tx strong { font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.m-mega-tx small { font-size: 0.7rem; color: var(--ink-faint); margin-top: 1px; }

/* explore links */
.m-links { display: flex; flex-direction: column; }
.m-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.95rem 0.3rem; font-size: 1rem; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--clay-100);
  transition: color var(--dur-fast) var(--ease-clay), padding var(--dur-fast) var(--ease-clay);
}
.m-link:active { color: var(--clay-700); padding-left: 0.6rem; }
.m-link-chev { width: 16px; height: 16px; stroke: var(--clay-300); }

.m-drawer-cta { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 1.2rem; }

/* ---------- TOUCH TARGETS & TAP FEEDBACK ---------- */
@media (hover: none) {
  .btn, .nav-link, .chip-btn, a.h-prod, .m-mega-card, .m-link {
    -webkit-tap-highlight-color: transparent;
  }
  .btn:active { transform: scale(0.97); }
  .h-prod:active, .card:active, .bento-cell:active { transform: scale(0.99); }
  /* disable hover-only lift on touch so cards don't stick "lifted" */
  .h-prod:hover, .card:hover, .bento-cell:hover, .price-card:hover,
  .article-card:hover, .market-card:hover, .course-card:hover {
    transform: none;
  }
}

/* ---------- MOBILE LAYOUT REFINEMENTS ---------- */
@media (max-width: 760px) {
  /* generous, readable type */
  :root { --fs-base: 1rem; }
  .container, .container-wide { padding: 0 1.15rem; }

  /* hero breathing room */
  .h-hero { padding-top: 6.5rem; padding-bottom: 2.5rem; }
  .h-hero h1 { font-size: clamp(2rem, 8.5vw, 2.7rem); }
  .h-hero-sub, .hero-sub { font-size: 1.02rem; }
  .h-hero-cta .btn, .hero-cta .btn { flex: 1; min-width: 0; }
  .h-hero-meta { gap: 0.35rem 1rem; }

  /* tool windows never overflow */
  .tool-window, .h-preview { max-width: 100%; }
  .tool-row { gap: 0.5rem; }
  .tool-select, .tool-row select { min-width: 0; width: 100%; }
  .tool-row .btn { width: 100%; }

  /* tables scroll instead of breaking layout */
  .a-card table, .card table { display: block; overflow-x: auto; white-space: nowrap; }

  /* pricing & bento stack cleanly */
  .price-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .bento { grid-template-columns: 1fr; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: 1 / -1; }

  /* section heads centered, comfortable */
  .section-head h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: 1 / -1; }
  .newsletter-row { max-width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; text-align: left; }

  /* CTA banners */
  .cta-banner { padding: 2.25rem 1.4rem; }
  .cta-banner h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); }

  /* forms full width, larger tap area */
  .field input, .field select, .field textarea { padding: 0.85rem 0.95rem; font-size: 1rem; }

  /* auth screens stack */
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  /* kill horizontal scroll from decorative orbs */
  body { overflow-x: hidden; }
  .glow-orb { max-width: 70vw; }
}

@media (max-width: 420px) {
  .m-mega-grid { grid-template-columns: 1fr; }
  .h-hero-cta { flex-direction: column; }
  .h-hero-cta .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- SAFE-AREA (notched phones) ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .nav-drawer { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
}

/* ---------- PREVENT iOS INPUT ZOOM ---------- */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
}
