/* ==============================================
   BASE.CSS — Shuttle Theme
   Reset, typography, containers, utility.
   Loads after tokens.css, before legacy.css.
   ============================================== */

/* ── Box Model Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Body Defaults ── */
body {
  margin: 0;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: var(--text-base, 14px);
  line-height: 1.5;
  color: var(--color-text, #111827);
  background-color: var(--body-bg, #fff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-3, 12px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text, #111827);
}
h1 { font-size: var(--text-2xl, 28px); }
h2 { font-size: var(--text-xl, 22px); }
h3 { font-size: var(--text-lg, 18px); }
h4 { font-size: var(--text-md, 16px); }
h5 { font-size: var(--text-base, 14px); }
h6 { font-size: var(--text-sm, 13px); }

p { margin-top: 0; margin-bottom: var(--space-3, 12px); }

a {
  color: var(--color-primary, #ff6000);
  text-decoration: none;
  transition: var(--ease-default, .15s ease);
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Focus Visible (A11y) ── */
:focus-visible {
  outline: 2px solid var(--color-primary, #ff6000);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background: var(--color-primary, #ff6000);
  color: #fff;
}

/* ── Container ── */
.container-fluid { width: 100%; padding-left: var(--space-4, 16px); padding-right: var(--space-4, 16px); }

/* ── Utility: Display ── */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Utility: Spacing ── */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.p-0 { padding: 0; }

/* ── Utility: Text ── */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted, #6b7280); }
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Utility: Flex ── */
.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2, 8px); }
.gap-3 { gap: var(--space-3, 12px); }
.gap-4 { gap: var(--space-4, 16px); }
.flex-wrap { flex-wrap: wrap; }

/* ── Utility: Grid column (from shadow S10) ── */
.col-xl-custom-5 {
  flex: 0 0 20%;
  max-width: 20%;
}

/* ── Smooth Scroll ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
