/* ============================================================
   CFL — shared reset + layout primitives
   ZERO colour lives in this file. Every colour comes from a
   direction's tokens.css, which is what makes the five
   directions comparable.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
}
button { cursor: pointer; }
textarea { resize: vertical; }

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: inherit; }

hr { border: 0; margin: 0; }

address { font-style: normal; }

/* ---------- layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw, 1280px);
  margin-inline: auto;
  padding-inline: var(--gutter, 24px);
}
.wrap--narrow { max-width: var(--maxw-narrow, 820px); }
.wrap--wide   { max-width: var(--maxw-wide, 1600px); }

.section { padding-block: var(--section-y, 96px); }
.section--tight { padding-block: var(--section-y-tight, 64px); }

.stack > * + * { margin-top: var(--stack, 16px); }

.grid { display: grid; gap: var(--gap, 24px); }
.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)); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 16px);
}
.between { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* Anything wide scrolls inside itself, never the page. */
.scroller {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.flow-x { min-width: max-content; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- logo lockup ---------- */

.brand { display: inline-flex; align-items: center; gap: var(--brand-gap, 0.6em); }
.brand-mark { display: inline-flex; align-items: center; }
.brand-mark .cfl-mark { height: var(--mark-h, 1em); width: auto; }
.brand-word { display: inline-block; white-space: nowrap; }
/* the wordmark and, where a header shows one, the descriptor under it */
.brand-text { display: grid; }
.brand-desc { display: block; white-space: nowrap; }

/* ---------- utility ---------- */

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }
