/**
 * Design tokens.
 *
 * Values measured from dal.ca and the Dalhousie web style guide. Components
 * should only ever use these custom properties, never raw values, so the
 * system can be re-tuned in one place.
 */
:root {
  /* Brand palette. */
  --dal-black: #242424;
  /* Pure black: only behind the home page banner, as on dal.ca, so its
   * text band fades into the photo without a seam. */
  --dal-black-pure: #000;
  --dal-gray-dark: #575655;
  --dal-gray: #eaebec;
  --dal-gray-mid: #b9b9b9;
  --dal-white: #fff;
  --dal-gold: #ffd400;
  --dal-red: #a72836;

  /* Typography. Fluid sizes as on dal.ca: they grow with the viewport up to
   * 1200px and then stay at 67/53/42/33/26/20px. */
  --font-family-base: "Public Sans", roboto, arial, sans-serif;
  --font-size-display: min(calc(1.5446rem + 3.5351vw), 4.1955rem);
  --font-size-xl: min(calc(1.4554rem + 2.4646vw), 3.3039rem);
  --font-size-l: min(calc(1.3851rem + 1.6217vw), 2.6014rem);
  --font-size-m: min(calc(1.3298rem + 0.9581vw), 2.0484rem);
  --font-size-s: min(calc(1.2863rem + 0.4355vw), 1.6129rem);
  --font-size-xs: min(calc(1.252rem + 0.024vw), 1.27rem);
  --font-size-lead: var(--font-size-xs);
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;
  --font-size-xsmall: 0.7875rem;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  --line-height-tight: 1.2;
  --line-height-snug: 1.4;
  --line-height-base: 1.5;

  /* Spacing scale. */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6rem;

  /* Layout. */
  --page-max-width: 90rem;
  --page-gutter: 1rem;
  --reading-max-width: 52rem;
  --gap-small: var(--space-s);
  --gap-medium: var(--space-l);
  --gap-large: var(--space-xl);

  /* The dalcon: Dalhousie's brand shape (rounded top-left and bottom-right
   * corners with a tail under the bottom-left corner). */
  --dalcon-radius: clamp(3rem, 2.25rem + 2.5vw, 4.5rem);
  --dalcon-tail: calc(var(--dalcon-radius) / 2);

  /* Controls (buttons, accordion bars). */
  --control-padding: 1.125rem;
  --control-min-height: 3rem;

  /* Focus and motion. The focus ring colour comes from the surface
   * (see surface.css) so it always contrasts with the background. */
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
  --duration-fast: 150ms;
  --duration-medium: 250ms;
  --easing-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Elevation. */
  --shadow-overlay: 0 0.5rem 2rem rgb(0 0 0 / 20%);
  --z-header: 100;
  --z-dropdown: 200;
  --z-drawer: 300;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-medium: 0ms;
  }
}
