/* ITCSS layer 2 — elements: reset and unclassed HTML elements */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* room for the fixed age-notice bar */
  padding-bottom: 3.25rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

p {
  max-width: 70ch;
}

p + p {
  margin-top: var(--s-3);
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: var(--s-2);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* links: animated underline that slides in on hover */
a {
  color: var(--blue);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.25s ease;
  padding-bottom: 1px;
}

a:hover,
a:focus-visible {
  background-size: 100% 2px;
}

a:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  vertical-align: top;
}

th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--blue-deep);
}

tbody tr:nth-child(odd) {
  background: var(--tint);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

input,
textarea {
  font: inherit;
  border: 0;
  background: var(--tint);
  padding: var(--s-2) var(--s-3);
  width: 100%;
  color: var(--ink);
  border-radius: 4px;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--blue);
}

figure {
  margin: 0;
}

figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: var(--s-2);
}

blockquote {
  border-left: 4px solid var(--magenta);
  padding-left: var(--s-3);
  color: var(--ink-soft);
}

hr {
  border: 0;
  height: 1px;
  background: var(--tint-deep);
  margin: var(--s-5) 0;
}

::selection {
  background: var(--magenta);
  color: #fff;
}
