/* site-mobile.css — responsive layer for the public site.
   The public pages are heavily inline-styled with a fixed desktop header;
   this file adds the mobile breakpoint (hamburger drawer + tamed padding).
   Loaded alongside gmi/colors_and_type.css on every public page. */

/* Injected by site-nav.js; hidden on desktop. */
.mnav-burger { display: none; }
.mnav-drawer { display: none; }

@media (max-width: 860px) {
  /* Hide the desktop nav + action buttons; the drawer replaces them. */
  header nav { display: none !important; }
  header .hdr-actions { display: none !important; }

  .mnav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 44px; height: 44px; padding: 11px;
    background: transparent; border: 0; cursor: pointer; position: relative; z-index: 61;
  }
  /* Ink on the cream header; white once the dark drawer is open (26 Sep: the
     white bars were near-invisible on #fcf8f0). */
  .mnav-burger span {
    display: block; height: 2px; width: 100%; background: #16140f; border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
  }
  .mnav-burger.open span { background: #fff; }
  .mnav-burger:focus-visible { outline: 2px solid #E07688; outline-offset: 2px; border-radius: 4px; }
  .mnav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mnav-burger.open span:nth-child(2) { opacity: 0; }
  .mnav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mnav-drawer {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(11, 11, 13, 0.98); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  .mnav-drawer.open { opacity: 1; pointer-events: auto; }
  .mnav-inner { display: flex; flex-direction: column; padding: 92px 28px 32px; gap: 2px; }
  .mnav-link, .mnav-action {
    font-family:'At Aero',sans-serif; text-transform: uppercase; letter-spacing: .12em;
    font-size: 15px; color:#fff !important; text-decoration: none; padding: 18px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .mnav-action {
    margin-top: 18px; background: #E07688; color:#16140F !important; text-align: center;
    border: 0; border-radius: 3px; padding: 16px; letter-spacing: .1em; font-weight: 500;
    border-bottom: 0; color:#16140F; }
  /* Login (outline) needs its own !important — the solid CTA's dark-text rule above
     was winning, leaving black text on the dark drawer (26 Sep). */
  .mnav-action.secondary { background: transparent; border: 1px solid rgba(255,255,255,.45); margin-top: 10px; color:#fff !important; }

  /* Tame the fixed 32px gutter on the header bar for narrow screens. */
  header > div { padding-left: 20px !important; padding-right: 20px !important; gap: 12px !important; }
}

/* ---- Below-the-fold polish. These pages are inline-styled, so target the
   inline values directly with attribute-substring selectors. All scoped to
   phones; desktop is unaffected. ---- */
@media (max-width: 860px) {
  /* Narrower page gutters everywhere the 32px shell is used. */
  [style*="padding:0 32px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* Hero / section vertical breathing room (120px & 96px are desktop-scale). */
  [style*="padding:120px 32px"] { padding-top: 60px !important; padding-bottom: 60px !important; }
  [style*="padding:96px 32px"]  { padding-top: 52px !important; }

  /* Collapse two-column content grids to a single stacked column. */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:.82fr 1.18fr"],
  [style*="grid-template-columns:.9fr 1.1fr"],
  [style*="grid-template-columns:1.1fr .9fr"],
  [style*="grid-template-columns:1.05fr 0.95fr"],
  [style*="grid-template-columns:1.05fr .95fr"],
  [style*="grid-template-columns:150px 1fr"],
  [style*="grid-template-columns: 132px 1fr"],
  [style*="grid-template-columns:130px 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* "Platform experience" index rows (number | content | label): stack, and let
     the number sit inline with the heading. Its min-content was forcing 640px. */
  [style*="grid-template-columns:52px 1fr auto"] {
    grid-template-columns: auto 1fr !important;
    gap: 12px !important;
    row-gap: 6px !important;
  }
  [style*="grid-template-columns:52px 1fr auto"] > :last-child { grid-column: 1 / -1; }

  /* Safety net: allow grid/flex children to shrink instead of forcing overflow. */
  section [style*="display:grid"] > *,
  section [style*="display:flex"] > * { min-width: 0; }
}


/* ---- Modals on phones: the overlay scrolls (set inline per page); shrink the
   frame so the form fits more often without scrolling. ---- */
@media (max-width: 600px) {
  .modal { padding: 12px !important; }
  .modal .mbox:not(.success-mode) { padding: 26px 20px !important; }
}

/* Enterprise pricing box (membership): CTA goes full-width when the row stacks. */
@media (max-width: 600px) { .ent-box .ent-cta { width: 100%; } }

@media (max-width: 860px) {
  /* Testimonial cards are a fixed 440px inline; on a phone that clipped every quote. */
  .testi-track > figure { flex-basis: min(440px, 86vw) !important; padding: 24px !important; }
  /* Modal first/last name grid: the stacked-grid gap above plus the inputs' own
     margin left a ~40px hole between the two fields. */
  .modal form > [style*="grid-template-columns:1fr 1fr"] { gap: 0 !important; }
}
