/* ==========================================================================
   Base styles and shared components
   Used on every page. Page-specific styling lives in its own file.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

/* --------------------------------------------------------------------------
   Pill (name lock-up)
   -------------------------------------------------------------------------- */

.pill {
  display: inline-block;
  background: var(--color-pill);
  color: var(--color-on-pill);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-pill);
  white-space: nowrap;
  text-decoration: none;
  /* Trims the text box to the cap height so padding matches Figma exactly */
  text-box: trim-both cap alphabetic;
}

.pill--lg {
  padding: 10px 14px;
  font-size: var(--text-pill-lg);
}

.pill--sm {
  padding: 6px 9px;
  font-size: var(--text-pill-sm);
}

/* --------------------------------------------------------------------------
   Nav bar (sticks to the top of the screen on scroll)
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: var(--border-hairline);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: max(var(--gutter), min(var(--nav-inset), 10vw));
}

.nav__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-demibold);
  line-height: var(--leading-heading);
  white-space: nowrap;
}
