/* RideUS Web -- base reset, typography, layout primitives */

*, *::before, *::after { box-sizing: border-box; }

/* Bug fix: signup.html's Phone/Email toggle sets the hidden attribute on
   #su-email-submit ("Create account") while Phone is selected, but that
   button also carries .btn, which sets display:inline-flex in
   components.css. Author-origin CSS always wins over the browser's own
   [hidden]{display:none} UA rule at equal specificity, and CSS files load
   after the UA stylesheet -- so .btn's display value won, and the
   supposedly-hidden button rendered anyway, stacked directly under "Send
   code" with the two pill shapes touching edge-to-edge (the "no gap"
   symptom actually reported). This is the exact same root cause already
   hit once on #mobile-menu (see components.css's comment there, which
   worked around it narrowly by simply never giving that one element a
   display value) -- rather than repeat that narrow, easy-to-forget
   avoidance for every future hidden+styled-class element on this site,
   this makes `hidden` unconditionally win everywhere. The !important is
   deliberate and necessary here, not a shortcut: it's the only way for a
   plain HTML attribute to reliably beat an arbitrary future class's own
   display rule without every such class having to know to cooperate. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: var(--color-text-primary);
}
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 var(--space-md); color: var(--color-text-secondary); }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Sept 2026 audit fix: was `padding: var(--space-xxl) 0` -- that 2-value
   shorthand explicitly sets left/right padding to 0, which wins over
   .container's `padding: 0 var(--space-lg)` (same specificity, later in
   the cascade) on every `class="container section"` element -- i.e. the
   main content wrapper on nearly every page (about, account, buses,
   home, offer, search, support, trip, both legal pages). Same bug as the
   .hero / .routes-section fixes; padding-top only leaves horizontal
   padding untouched. */
.section {
  padding-top: var(--space-xxl); padding-bottom: var(--space-xxl);
}

.text-center { text-align: center; }
.muted { color: var(--color-text-secondary); }
.tiny { color: var(--color-text-tertiary); font-size: 13px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.stack { display: flex; flex-direction: column; }
.gap-xs { gap: var(--space-xs); } .gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); } .gap-lg { gap: var(--space-lg); }

.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .section { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
}

::selection { background: var(--color-primary); color: #fff; }

/* Scrollbars kept unobtrusive on the near-black surface */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-track { background: transparent; }
