/* Avanza Methods, base layer.
   Self hosted faces, reset, document defaults, focus. */

/* Proza Libre, headings and display. Weights 400, 500, 600. */
@font-face {
  font-family: "Proza Libre";
  src: url("../fonts/ProzaLibre-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Proza Libre";
  src: url("../fonts/ProzaLibre-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Proza Libre";
  src: url("../fonts/ProzaLibre-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Noto Sans, body and interface. One variable file covers 400 through 600.
   The width axis is pinned to normal, so only weight varies. */
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-400-600.woff2") format("woff2-variations"),
       url("../fonts/NotoSans-400-600.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class], ol[class] { list-style: none; padding: 0; }

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

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

/* Document */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Headings. Proza Libre, never below 18px, never heavier than 600. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-display);
  color: inherit;
  text-wrap: balance;
}

/* step-4, not step-5. The approved headlines run 60 to 95 characters, and at
   step-5 the Home headline sets seven lines on desktop and far more at 320px.
   step-5 stays available for a short headline if one ever appears. */
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: var(--lh-tight); }
h4 { font-size: var(--step-0); font-weight: 500; }

p { text-wrap: pretty; }

strong, b { font-weight: 600; }

/* No italic face ships, so emphasis is carried by weight instead of a browser
   synthesised slant. The markup stays semantic. */
em, i {
  font-style: normal;
  font-weight: 600;
}

/* Links in running copy */
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--dur-fast) var(--ease);
}

/* Focus. Dark Sea ring on light surfaces, Golden Rod on dark ones.
   Sections that invert reset --focus-ring in the layout layer. */
:root { --focus-ring: var(--ink); }

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

/* Skip link, first focusable element on every page */
.skip-link {
  position: absolute;
  left: var(--space-16);
  top: var(--space-16);
  z-index: 100;
  padding: var(--space-12) var(--space-16);
  background: var(--ink);
  color: var(--text-on-ink);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-control);
  transform: translateY(calc(-100% - var(--space-32)));
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

::selection {
  background: var(--ink);
  color: var(--text-on-ink);
}

/* Screen reader only, for labels that must exist without being seen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
