/* ==========================================================================
   FleetSquad — Reset, typography primitives and layout helpers
   Mobile-first: every rule here is the small-screen rule; media queries only
   ever scale *up*.
   ========================================================================== */

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

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

html { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--surface);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.35rem); }
h3 { font-size: clamp(1.125rem, 2.4vw, 1.5rem); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--blue-700); }

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-6) 0;
}

/* Visible keyboard focus everywhere — never remove it, only restyle it. */
:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--blue-100); color: var(--navy-900); }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--sp-7); } }

.section { padding-block: var(--sp-9); }
@media (min-width: 768px) { .section { padding-block: var(--sp-10); } }

.section-head { text-align: center; margin-bottom: var(--sp-7); }
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head p {
  color: var(--ink-500);
  max-width: 640px;
  margin-inline: auto;
}
.section-head--left { text-align: left; }
.section-head--left p { margin-inline: 0; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stack   { display: flex; flex-direction: column; gap: var(--sp-4); }
.row     { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.row-wrap { flex-wrap: wrap; }
.spacer  { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--ink-500); }
.text-dim    { color: var(--ink-400); }
.text-sm     { font-size: var(--fs-sm); }
.text-xs     { font-size: var(--fs-xs); }
.text-lg     { font-size: var(--fs-lg); }
.text-bold   { font-weight: 700; }
.text-semi   { font-weight: 600; }
.text-navy   { color: var(--navy-800); }
.text-blue   { color: var(--blue-600); }
.text-ok     { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-nowrap { white-space: nowrap; }
.uppercase   { text-transform: uppercase; letter-spacing: .06em; }

.mt-0 { margin-top: 0; }     .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--sp-2); }  .mb-2 { margin-bottom: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }  .mb-3 { margin-bottom: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }  .mb-4 { margin-bottom: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }  .mb-6 { margin-bottom: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }  .mb-8 { margin-bottom: var(--sp-8); }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* Present for screen readers, invisible on screen. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.show-mobile { display: block; }
.show-desktop { display: none; }
@media (min-width: 992px) {
  .show-mobile { display: none; }
  .show-desktop { display: block; }
}

/* Horizontal scroll containment — wide tables never push the page sideways. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Inline variants of the responsive show/hide helpers, for swapping copy
   between the phone and desktop compositions. */
.show-desktop-inline { display: none; }
.show-mobile-inline  { display: inline; }
@media (min-width: 992px) {
  .show-desktop-inline { display: inline; }
  .show-mobile-inline  { display: none; }
}

/* Icon placeholders: FS.hydrateIcons() fills <i data-icon="name"> with an SVG,
   so the wrapper needs to behave like the icon it contains. */
i[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  flex: none;
}

/* Two-column splits used by the marketing templates (content + rail). */
.split { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 992px) {
  .split--2-1 { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
  .split--1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
