/* ============================================================================
   Global rounded-corners pass — The UpScale Tech & Print
   Rounds every contained visible box: cards, panels, buttons, form fields,
   alerts, modals, dropdowns, badges, tables and content images.
   Full-bleed colored bands (nav, footer, full-width section bands) keep
   square edges on purpose — nothing here adds a radius to them, and the
   explicit guard at the bottom keeps any that pick one up square.
   Loaded LAST in the <head> so it wins over component defaults.
   ========================================================================== */

:root{
  /* Bootstrap radius tokens — rounds cards, buttons, inputs, selects, alerts,
     modals, dropdowns, badges, list-groups, toasts, popovers, pagination… */
  --bs-border-radius:     0.9rem;
  --bs-border-radius-sm:  0.6rem;
  --bs-border-radius-lg:  1.1rem;
  --bs-border-radius-xl:  1.4rem;
  --bs-border-radius-xxl: 1.8rem;
  --tust-radius:          0.9rem;
}

/* Buttons: rounded, but never a full pill (keeps explicit .rounded-pill) */
.btn:not(.rounded-pill){ border-radius: 0.7rem; }

/* Form fields */
.form-control, .form-select, .input-group-text, textarea, select{
  border-radius: var(--tust-radius);
}
.input-group > .form-control:first-child,
.input-group > .form-select:first-child{
  border-top-left-radius: var(--tust-radius); border-bottom-left-radius: var(--tust-radius);
}
.input-group > :last-child{
  border-top-right-radius: var(--tust-radius); border-bottom-right-radius: var(--tust-radius);
}

/* Content images & embeds — skip the logo, opted-out images (.no-round),
   and anything that is meant to bleed full width (has a w-100 class). */
main img:not(.navbar-logo):not(.no-round):not([class*="w-100"]),
.card img:not(.no-round),
.card-img, .card-img-top, .card-img-bottom,
main iframe:not([class*="w-100"]),
main video:not([class*="w-100"]){
  border-radius: var(--tust-radius);
}

/* Bordered boxes that were left square (utility border without a radius) */
.border.rounded-0,
.p-2.border, .p-3.border, .p-4.border, .p-5.border{
  border-radius: var(--tust-radius);
}

/* Bordered tables: round the outer frame */
.table-bordered{ border-radius: var(--tust-radius); overflow: hidden; }

/* Container-width section bands are boxes — the page container leaves side
   gutters, so they do NOT reach the viewport edge. Round all four corners.
   (These sit inside <main>; the nav, top bar, hero and footer are outside it.) */
main section,
main .lg-hero, main .fdr-hero, main .fdr-tl-sec, main .fdr-cta,
main .hp-trust, main .hp-impact, main .hp-portfolio, main .hp-close{
  border-radius: var(--tust-radius);
}

/* Guard: elements that truly span the full viewport width stay square-edged. */
#mainNav, .navbar, footer, section.hh, .fullwidth-wrap{ border-radius: 0 !important; }
