/* ==========================================================================
   Base — reset, typography, layout primitives
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.62;
  color: var(--ink-800);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.018em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--red-600); }

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

ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .35em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

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

strong, b { font-weight: 600; color: var(--ink-900); }

::selection { background: var(--red-100); color: var(--red-800); }

:focus-visible {
  outline: 2px solid var(--red-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: 1440px; }
.container--narrow { max-width: 940px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .62); }
.section--soft { background: var(--bg); }
.section--navy { background: var(--navy-900); color: #D6DFEC; }
.section--navy h2, .section--navy h3 { color: #fff; }

.stack { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 24px; } .gap-6 { gap: 32px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1 1 auto; }

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

/* ---------- Utilities ---------- */
.muted { color: var(--ink-500); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 600; color: var(--ink-900); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }

.clamp-1, .clamp-2, .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--navy-900); color: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); font-size: var(--fs-sm);
  transition: top var(--t);
}
.skip-link:focus { top: 12px; color: #fff; }

.ico { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.85; }
.ico--sm { width: 15px; height: 15px; }
.ico--lg { width: 22px; height: 22px; }

.divider-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-300); flex: 0 0 auto;
}

/* ---------- Boot / first paint ---------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--surface);
  text-align: center;
  padding: 24px;
}
.boot__brand { display: flex; align-items: center; gap: 8px; }
.boot__logo { height: 44px; width: auto; max-width: 210px; object-fit: contain; }
.boot__text { color: var(--ink-500); font-size: var(--fs-sm); margin: 0; }
.boot__bar { width: 168px; height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.boot__bar span { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--red-600); animation: bootSlide 1.1s var(--ease) infinite; }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Responsive grid collapse ---------- */
@media (max-width: 1100px) {
  .grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid { gap: 14px; }
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--collapse-1 { grid-template-columns: 1fr; }
}
