/* Base: fonts, design tokens, reset and accessibility defaults (mobile first). */

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/open-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/open-sans-latin-wght-italic.woff2') format('woff2');
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Palette from the legacy site (docs/legacy-survey, section 2). Light greys used for
     text were darkened just enough to reach WCAG AA contrast on white. */
  --color-text: #696969;
  --color-text-strong: #4a4a4a;
  --color-text-muted: #757575;
  --color-border: #eeeeee;
  --color-border-strong: #dddddd;
  --color-shadow: #cccccc;
  --color-accent: #c8b392;
  --color-strip: rgb(85 85 85 / 0.82);
  --color-band-fallback: #5a5a5a;
  --color-background: #ffffff;
  --color-focus: #4a4a4a;

  --font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-small: 0.8125rem;                                    /* 13 px */
  --text-menu: 0.75rem;                                       /* 12 px */
  /* Body text close to the legacy 13.5 px / 24 px line: 14 px up to 1919 px wide, 16 px on
     large screens (see the media query below). */
  --text-body: 0.875rem;                                      /* 14 px */
  --line-body: 1.7143;                                        /* 24 px at 14 px */
  --text-title: 0.9375rem;                                    /* 15 px, legacy section titles */
  --text-caption: clamp(0.875rem, 0.78rem + 0.45vw, 1.25rem); /* 14 to 20 px */
  --text-heading: clamp(1.125rem, 1rem + 0.6vw, 1.625rem);

  --header-height: 80px;
  --gutter: 8%;
  --measure: 72ch;
}

@media (min-width: 120rem) {
  :root {
    --text-body: 1rem;                                        /* 16 px */
    --line-body: 1.65;
    --text-title: 1.0625rem;                                  /* 17 px */
  }
}

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

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--text-body);
  line-height: var(--line-body);
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

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

a:hover {
  color: var(--color-text-strong);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 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;
  }
}
