/* Reset, typography and links. Nothing component-specific. */

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

/* Past 1440px everything grows a little, up to 19px base at 1920px, so a
   wide desktop screen is used rather than left empty at the sides. Spacing,
   the page width and the header all follow, since they are set in rem. */
html {
  font-size: clamp(1rem, 0.625vw + 0.4375rem, 1.1875rem);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.625rem, 3.4vw, 2.375rem); }
h3 { font-size: 1.125rem; letter-spacing: 0.04em; }

p { max-width: var(--measure); }

.lead {
  font-size: 1.1875rem;
  color: var(--text);
}

.muted { color: var(--text-muted); }

/* Small monospace label. The sector convention: technical data and section
   markers in mono, headlines in the display face. */
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Links are off-white and underlined, so they need no colour of their own;
   orange appears only while the pointer is on them. */
a {
  color: var(--text);
  text-decoration-color: var(--text-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: var(--navy); }

/* The page must be complete and legible with every transition disabled. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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