/* Reset + base typography. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  /* Subtle "falling snow" dots */
  background-image:
    radial-gradient(rgb(217 164 65 / 0.22) 1.2px, transparent 1.6px),
    radial-gradient(rgb(179 38 58 / 0.07) 1.2px, transparent 1.6px);
  background-size: 34px 34px, 34px 34px;
  background-position: 0 0, 17px 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: inherit;
}

h1 { font-size: clamp(2rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

/* Heading size helpers, independent of the element */
.h3 { font-size: 1.5rem; }
.h4 { font-size: 1.3rem; }
.h5 { font-size: 1.15rem; }
.h6 { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.display {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  line-height: 1.05;
}

.display-sm {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.1;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
}

p, ul, ol, dl {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--cranberry);
  text-decoration: none;
}

a:hover {
  color: var(--cranberry-dark);
}

img, svg {
  vertical-align: middle;
}

hr {
  margin: var(--space-4) 0;
  border: 0;
  border-top: 1px solid var(--line);
}

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

button {
  cursor: pointer;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

:focus-visible {
  outline: 3px solid rgb(179 38 58 / 0.35);
  outline-offset: 2px;
}

::selection {
  background: rgb(217 164 65 / 0.45);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
