/* Mobile behaviour and touch sizing.
   Loaded on every page, including the standalone homepage — below 1000px the
   desktop links and mega-menu are hidden, so the panel here is the only way to
   navigate, and the touch-target rules have to reach the homepage too. */

.mob-util { display: none; align-items: center; gap: 10px; justify-self: end; }

.burger {
  width: 44px; height: 44px;              /* 44px: minimum comfortable touch target */
  border: 1px solid var(--line); border-radius: 50%; background: none;
  cursor: pointer; padding: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { width: 18px; height: 2px; background: var(--ink); transition: transform .3s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobnav {
  position: fixed; inset: var(--nav) 0 0; z-index: 59;
  background: var(--black);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .28s ease, transform .28s cubic-bezier(.16,1,.3,1), visibility .28s;
}
.mobnav.open { opacity: 1; visibility: visible; transform: none; }
.mobnav-inner { padding: clamp(18px,5vw,32px) var(--gut) 64px; max-width: 640px; margin: 0 auto; }
.mobnav ul { list-style: none; margin: 0; padding: 0; }
.mobnav a {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; color: var(--ink); text-decoration: none;
}
.mobnav a:active { color: var(--red); }

.mob-primary a {
  font-size: clamp(22px,6vw,28px); font-weight: 600; letter-spacing: -.02em; padding: 15px 0;
}
.mob-primary a.cur { color: var(--red); }

.mob-group { margin-top: 32px; }
.mob-group .lab { display: block; margin: 0 0 4px; }
.mob-group a { color: var(--muted); }
.mob-all { color: var(--red) !important; border-bottom: 0 !important; }

.mob-cta { margin-top: 34px; width: 100%; justify-content: center; padding: 17px 24px; }

@media (max-width: 1000px) {
  .mob-util, .burger { display: flex; }
}
/* Panel is mobile-only — a resize back to desktop must not strand it open. */
@media (min-width: 1001px) {
  .mobnav { display: none; }
}

/* ---- touch sizing ----
   Comfortable targets are ~44px. These elements are sized for a cursor on
   desktop and are too small to hit reliably on a phone. */
@media (max-width: 760px) {
  .mob-util .theme-toggle { width: 44px; height: 44px; }

  /* Footer link lists: 14px text gives a ~21px target. Pad rather than resize
     the text so the footer keeps its proportions. */
  .fg a { padding: 9px 0; margin-bottom: 0; }

  /* Inline "read more" style links. */
  .gauge-desc .more, .frow .go, .alllink { padding: 10px 0; }

  /* Phone / email links in the contact block — tapping these actually dials. */
  .cinfo a { display: inline-block; padding: 10px 0; }

  /* Careers "Apply" link. */
  .role .apply { padding: 12px 0; }

  /* BASE-X orbit nodes on the capital page. */
  .o-node { min-height: 40px; padding: 11px 13px; }

  /* Industry rail stepper: the dots are 12px visually. Widen the hit area with a
     pseudo-element so the target grows without changing the design. */
  .rnode2 { position: relative; }
  .rnode2::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 44px; height: 44px; transform: translate(-50%, -50%);
  }

  /* Any form control: 16px stops iOS zooming the page on focus. */
  input, select, textarea { font-size: 16px; }
}
