/* Hallmark · base layer: reset, type, canvas, controls. */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 104px;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--tracking-display);
  line-height: 1.04;
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
  color: var(--color-ink);
}

h1 {
  max-width: 20ch;
  font-size: var(--text-display);
}

h2 {
  max-width: 30ch;
  font-size: var(--text-section);
}

h3 {
  max-width: 40ch;
  font-size: var(--text-title);
  line-height: 1.12;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

strong,
b {
  font-weight: 500;
  color: var(--color-ink);
}

small {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: var(--space-md) 0;
  vertical-align: top;
}

th {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  text-wrap: nowrap;
}

hr {
  border: 0;
  border-top: var(--rule-hair) solid var(--color-rule);
  margin: 0;
}

::selection {
  background: color-mix(in oklab, var(--color-accent) 38%, transparent);
  color: var(--color-ink);
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--space-2xs);
}

:where(button):focus:not(:focus-visible) {
  outline: none;
}

html {
  scrollbar-color: var(--color-paper-3) var(--color-paper);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap-columns);
}

.section {
  padding-block: var(--section-gap);
}

.section--tight {
  padding-block: var(--section-gap-s);
}

.section--loose {
  padding-block: var(--section-gap-l);
}

.section--band {
  background: var(--color-paper-2);
  color: var(--color-ink);
  padding-block: var(--section-gap-s);
}

.lead {
  max-width: 44ch;
  font-size: var(--text-lead);
  line-height: 1.45;
  color: var(--color-ink-2);
}

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

.small {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
}

abbr[title] {
  text-decoration: none;
}

.display-s {
  font-size: var(--text-display-s);
  line-height: 1.06;
}

.prose {
  max-width: 65ch;
}

.prose p + p {
  margin-top: var(--space-md);
}

.prose h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
}

.prose ul,
.prose ol {
  margin-block: var(--space-md);
}

.prose li {
  padding-left: 1.2em;
  position: relative;
}

.prose li + li {
  margin-top: var(--space-xs);
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 1px;
  background: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--space-xl);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-ink);
  color: var(--color-paper);
}

.btn--primary:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-strong);
}

.btn--ghost:hover {
  background: var(--color-paper-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.text-link {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--color-accent) 55%, transparent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out);
}

.text-link:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

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

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 500;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-well);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:active {
    transform: none;
  }
}
