/* ================================================================
   BASE — reset, root typography, element defaults
   ================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Default heading type — display font, chunky */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(var(--fs-3xl), 7vw, var(--fs-5xl)); }
h2 { font-size: clamp(var(--fs-2xl), 5.5vw, var(--fs-4xl)); }
h3 { font-size: clamp(var(--fs-xl), 3.2vw, var(--fs-3xl)); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); letter-spacing: var(--tracking-wide); text-transform: uppercase; }

p {
  margin: 0 0 var(--space-4);
  max-width: 62ch;
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color var(--d-fast) var(--ease-out);
}
a:hover { color: var(--red); }

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--space-4); }
li { margin-bottom: var(--space-2); }

hr {
  border: 0;
  border-top: var(--stroke-thin) solid var(--ink);
  margin: var(--space-6) 0;
}

/* ---------- Utility display classes ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 var(--space-3);
  display: inline-block;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(var(--fs-4xl), 10vw, var(--fs-6xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.slab {
  font-family: var(--font-slab);
  font-weight: 400;
  letter-spacing: var(--tracking-normal);
}

.stamp-x {
  /* A red X-mark, echoing the Mills logo dot. Purely decorative. */
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4l16 16M20 4L4 20' stroke='black' stroke-width='5' stroke-linecap='square' fill='none'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4l16 16M20 4L4 20' stroke='black' stroke-width='5' stroke-linecap='square' fill='none'/></svg>") center/contain no-repeat;
  vertical-align: -0.1em;
}

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

/* ---------- Focus ring ---------- */

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Selection ---------- */

::selection { background: var(--red); color: var(--white); }

/* ---------- Reduced motion ---------- */

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