/* ==========================================================================
   CBC — Base stylesheet
   ========================================================================== */

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

html {
  /* Wide-screen proportional scale.
     The shell caps at --content-wide (1600px), so the content column stops
     growing once the viewport hits 1600 + 2 * 48px gutter = 1696px. Between
     1440px (where the gutter itself has already maxed out, so content = vw
     - 96) and 1696px the column widens from 1344px to 1504px -- a factor of
     1.119. This ramps the root font-size over exactly that range by the same
     factor, so type, every rem spacing token, and every em-based text measure
     grow in lockstep with the column and the design holds its proportions.
     At or below 1440px this resolves to 16px and nothing changes. */
  font-size: clamp(16px, 5.2px + 0.75vw, 17.92px);

  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-8));
}

body {
  min-height: 100dvh;
  line-height: var(--lh-relaxed);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* `hidden` here would turn the body into a scroll container, which silently
     kills `position: sticky` for everything inside it (the careers jump
     ribbon). `clip` gives the same protection against a stray horizontal
     scrollbar without creating a scrollport. The `hidden` line stays first as
     the fallback for engines that do not know `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: var(--lh-tight);
  font-weight: var(--weight-regular);
}

p,
li,
figcaption {
  text-wrap: pretty;
}

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

::selection {
  background: var(--color-primary-tint);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

a,
button,
[role='button'],
[role='link'],
input,
textarea,
select,
summary {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
