/* ==========================================================================
   305 Kolts — lean grid & utility layer.
   Replaces Bootstrap's CSS grid/utilities (was ~300KB for a handful of
   classes) with just the exact classes this site's templates use, built on
   plain flexbox. Keeps the same class names/behavior as Bootstrap 5 so no
   template markup had to change.
   ========================================================================== */

/* Bootstrap's global reset — without it, an element's declared width no
   longer includes its own padding/border, which is what the column/row
   math below (and plenty of existing component CSS) assumes. */
*, *::before, *::after {
    box-sizing: border-box;
}

/* The offcanvas menu panel sits off-screen via a `transform` on a
   `position: fixed` element (see .offcanvas__info in main.css). A fixed
   element's transformed box can still expand the document's scrollable
   area unless the root element itself clips horizontal overflow — body's
   own overflow-x: hidden isn't enough, since fixed elements position
   relative to the viewport/root, not the body box. */
html {
    overflow-x: hidden;
}

/* -------------------------------------------------------------------------
   Container — matches Bootstrap 5's default stepped breakpoints.
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1320px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 12px;
    padding-left: 12px;
}
@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}
@media (min-width: 1400px) {
    .container { max-width: 1320px; }
}

/* -------------------------------------------------------------------------
   Row / columns — a 12-column flex grid. This site only ever uses gutter
   class "g-4" (1.5rem), which is also Bootstrap's row default, so the
   gutter is simply built into .row itself rather than a separate variable.
   ------------------------------------------------------------------------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
    row-gap: 24px;
}
.row > * {
    padding-right: 12px;
    padding-left: 12px;
    width: 100%;
}

.col-6 { flex: 0 0 auto; width: 50%; }

@media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-3  { flex: 0 0 auto; width: 25%; }
    .col-lg-4  { flex: 0 0 auto; width: 33.33333333%; }
    .col-lg-5  { flex: 0 0 auto; width: 41.66666667%; }
    .col-lg-6  { flex: 0 0 auto; width: 50%; }
    .col-lg-7  { flex: 0 0 auto; width: 58.33333333%; }
    .col-lg-9  { flex: 0 0 auto; width: 75%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 1200px) {
    .col-xl-3 { flex: 0 0 auto; width: 25%; }
    .col-xl-4 { flex: 0 0 auto; width: 33.33333333%; }
}

/* -------------------------------------------------------------------------
   Display utilities
   ------------------------------------------------------------------------- */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
@media (min-width: 1200px) {
    .d-xl-block { display: block !important; }
    .d-xl-none  { display: none !important; }
}

/* -------------------------------------------------------------------------
   Flex utilities
   ------------------------------------------------------------------------- */
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-end     { justify-content: flex-end !important; }
.align-items-center      { align-items: center !important; }
.align-items-start { align-items: flex-start!important; }
.align-items-stretch     { align-items: stretch !important; }
.gap-3 { gap: 1rem !important; }

/* -------------------------------------------------------------------------
   Text / width utilities
   ------------------------------------------------------------------------- */
.text-center { text-align: center !important; }
.text-white  { color: #fff !important; }
.w-100 { width: 100% !important; }

/* Scales an <img> down to fit its container without ever upscaling it. */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Visually hides content while keeping it announced by screen readers
   (used for the Contact page's structural-only h2 above the info cards). */
.visually-hidden {
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    position: absolute !important;
}

/* -------------------------------------------------------------------------
   Spacing utilities (Bootstrap scale: 2=.5rem, 3=1rem, 4=1.5rem, 5=3rem)
   ------------------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }
.pt-0 { padding-top: 0 !important; }
