/* ============================================================================
   SYSTEM — reusable primitives built on tokens.css. No page layout in here.
   Components: type, wrap, kicker, pills, arrow-links, circle buttons, chips,
   rails + dots, stats, fillets, entrance reveals.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; }
img { display: block; max-width: 100%; }

body {
  font-family: var(--sans);
  background: var(--white); color: var(--black);
  font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* headings: Medium 500, tight tracking -0.05em */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.05em; line-height: 1.02; }
.display-xl { font-size: var(--fs-xxxl); line-height: 0.9; }
.display-lg { font-size: var(--fs-xxl); line-height: 0.9; }
.display-md { font-size: var(--fs-lg); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1600px; margin-inline: auto; padding-inline: var(--pad); }

/* entrance reveals — fade/slide-up on scroll into view */
.reveal { opacity: 0; translate: 0 24px; transition: opacity 0.5s var(--ease-tw), translate 0.5s var(--ease-tw); }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* kicker: ● LABEL — mono micro-label */
.kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 14px; font-weight: 400; letter-spacing: normal; line-height: 1.5; text-transform: uppercase; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kicker.blue-dot::before { background: var(--blue); }

/* pills — the button recipe: fs-sm/500/+0.025em, 16×32 pad, invert over .5s */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 32px; border-radius: 9999px; border: 1px solid transparent; font-weight: 500; font-size: var(--fs-sm); letter-spacing: 0.025em; line-height: 1.5; cursor: pointer; text-align: center; transition: all 0.5s ease; }
.pill-white { background: var(--white); border-color: var(--white); color: var(--black); }
.pill-white:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.pill-dark { background: var(--black-1); color: var(--white); line-height: 1.75; }
.pill-dark:hover { background: var(--black-2); color: var(--white); }
.pill-gray { background: var(--off); color: var(--black); line-height: 1.75; }
.pill-gray:hover { background: var(--white-2); }
/* compact variant for dense contexts (cards, dashboards) — the ONLY sanctioned
   size deviation besides page.css's nav pill; never override pills inline */
.pill-sm { padding: 12px 24px; font-size: 14px; }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: currentColor; opacity: 0.6; font-size: 16px; transition: opacity 0.5s ease; }
.arrow-link:hover { opacity: 1; }
.arrow-link svg { transition: translate 0.5s ease; }
.arrow-link:hover svg { translate: 4px 0; }

.circle-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white-1); display: grid; place-items: center; cursor: pointer; transition: background-color 0.5s ease; }
.circle-btn:hover { background: var(--white-2); }

/* filter chips */
.chipf { border: 1px solid var(--white-2); background: transparent; border-radius: 9999px; padding: 8px 20px; font-weight: 500; font-size: 16px; line-height: 1.5; transition: all 0.5s ease; }
.chipf.on { background: var(--white-1); color: var(--black); border-color: transparent; }
.chipf:hover:not(.on) { background: var(--off); }

/* inert controls: hover states yes, pointer cursor no */
a[href="#"] { cursor: default; }

/* rails: drag/momentum mechanics live in JS; no scroll-snap */
.rail-head { display: flex; align-items: center; gap: 20px; padding-bottom: 26px; }
.rail-head h2 { font-size: 30px; line-height: 1.2; }
.rail-nav { margin-left: auto; display: flex; gap: 8px; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; user-select: none; -webkit-user-select: none; }
.rail::-webkit-scrollbar { display: none; }
.dots { display: flex; gap: 8px; justify-content: center; padding: 13px 0 0; position: relative; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: #444; }
.dots span.on { background: #ddd; }

/* stat pairs */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-block: 20px; }
.stat .n { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.stat .l { font-weight: 500; line-height: 1.25; margin-top: 4px; font-size: var(--fs-base); text-wrap: balance; }

/* concave fillets: an 80×80 color square centered on a shared card corner,
   carved by two bg-colored circles offset ±40px — no SVG masks needed */
.fillet { position: absolute; width: 80px; height: 80px; pointer-events: none; z-index: 0; }
.fillet.round { border-radius: 50%; }
