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

/* stops iOS Safari enlarging text after a rotation; Safari only understands the prefixed property */
html {
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  font-kerning: normal;
}

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

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

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

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

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

[id] {
  scroll-margin-top: calc(var(--header-h) + var(--s-2));
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: var(--edge);
  top: 0.75rem;
  z-index: 100;
  background: var(--ink);
  color: var(--porcelain);
  padding: var(--s-1-5) var(--s-2);
  border-radius: var(--radius-pill);
  transform: translateY(-200%);
  transition: transform var(--t-quick) var(--ease-quick);
}

.skip:focus {
  transform: none;
}

/* Shared type roles */
.h2 {
  font-weight: var(--fw-light);
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

.voice {
  font-weight: var(--fw-light);
  font-size: var(--fs-statement);
  line-height: var(--lh-display);
  letter-spacing: var(--track-statement);
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-wrap: pretty;
}

.copy {
  max-width: 34em;
  text-wrap: pretty;
}

.copy p + p {
  margin-top: 1em;
}

.detail {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  line-height: var(--lh-small);
  letter-spacing: var(--track-label);
}

.muted {
  color: var(--ink-2);
}

.caption {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
  margin-top: var(--s-1-5);
}
