/* ==========================================================================
   UTILITIES.CSS
   Single-purpose helper classes. Used sparingly and only for spacing/
   alignment/visibility tweaks — never for building components. If a
   pattern repeats 3+ times, it belongs in components.css instead.
   ========================================================================== */

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text color utilities (map directly to tokens — no raw hex ever) */
.text-muted { color: var(--color-text-muted); }
.text-body { color: var(--color-text-body); }
.text-heading { color: var(--color-text-heading); }

/* Display / visibility */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Visibility helpers (.hide-on-mobile / .show-on-mobile) are defined in
   responsive.css, NOT here. This file loads BEFORE components.css, so a
   base rule here lost the cascade to any component that sets its own
   display at the same specificity — e.g. .btn { display: inline-flex }
   overrode .hide-on-mobile { display: none }, and the header's
   "Request a Quote" button never hid on mobile (it pushed the
   hamburger off-screen at 320-414px). responsive.css loads after
   components.css, so both the mobile base state and the tablet flip
   live there, together, where they can't be outranked. */

/* Scroll lock applied to <body> while a modal or mobile nav drawer
   is open (toggled by modal.js / navigation.js) */
.scroll-locked {
  overflow: hidden;
  height: 100vh;
}

/* Aspect-ratio boxes — used to reserve image space and prevent layout
   shift while assets lazy-load, per the Phase 1 performance strategy */
.aspect-box {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.aspect-box::before {
  content: "";
  display: block;
  padding-top: var(--aspect-ratio, 66.66%);
}
.aspect-box > img,
.aspect-box > picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aspect-box > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aspect-box > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Aspect-ratio modifiers — used instead of an inline style="--aspect-ratio: …"
   so every value still traces back to a class, not a per-element inline
   attribute. Default (no modifier) is 66.66% (3:2), matching most
   category/banner imagery in the concept. */
.aspect-box--square {
  --aspect-ratio: 100%;
}
.aspect-box--tall {
  --aspect-ratio: 75%;
}
.aspect-box--wide {
  --aspect-ratio: 56.25%;
}

/* Eyebrow label pattern (e.g. "OUR CATEGORIES", "WHY CHOOSE US") */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-teal-brand);
  margin-bottom: var(--space-2);
}
/* Stage 7A: on the navy bands the brighter cyan passes (6.30:1 on #0c2836);
   teal-500 there measured 4.29:1 and brand teal would be 1.99:1. */
.text-on-dark .eyebrow {
  color: var(--color-cyan-500);
}

/* Divider */
.divider {
  height: 1px;
  width: 100%;
  background-color: var(--color-border);
  border: 0;
}
.divider--dark {
  background-color: var(--overlay-white-12);
}

/* Stage 7A: the skip link's target (<main tabindex="-1">) takes programmatic
   focus only; it is not an interactive control, so no focus ring is drawn. */
#main-content:focus { outline: none; }
