/* Panoply Forge: ink on paper, like the stationery. */

@font-face {
  font-family: "Marcellus";
  src: url("/fonts/marcellus.woff2") format("woff2");
  font-display: swap;
}
/* Cinzel is subset to digits and phone punctuation: Marcellus's zero is its O. */
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 18%, var(--paper));

  --display: "Marcellus", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --measure: 40rem;
  --gap: clamp(3.5rem, 9vw, 6.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f0eb;
    --paper: #0b0b0b;
  }
}

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

html {
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

main, footer, .hero {
  max-width: var(--measure);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Contact links are what a phone visitor taps: give each a 44px touch target. */
.contact a, footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.num { font-family: "Cinzel", var(--text); font-variant-numeric: lining-nums; }

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

/* Hero */

.hero {
  padding-block: clamp(3.5rem, 12vw, 7rem) var(--gap);
  text-align: center;
}

.hallmark {
  width: clamp(11rem, 42vw, 15.5rem);
  aspect-ratio: 1;
  margin: 0 auto clamp(2rem, 6vw, 2.75rem);
  background-color: currentColor;
  -webkit-mask: url("/marks/hallmark-worn.svg") center / contain no-repeat;
  mask: url("/marks/hallmark-worn.svg") center / contain no-repeat;
}

h1 { margin: 0; line-height: 0; }

.wordmark {
  display: block;
  width: min(100%, 22rem);
  height: auto;
  margin-inline: auto;
}

.descriptor {
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: 0.8125rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.promise {
  margin: clamp(2.25rem, 6vw, 4rem) 0 0;
  font-family: var(--display);
  font-size: clamp(1.375rem, 1.1rem + 1.3vw, 1.875rem);
  line-height: 1.35;
}

.promise-attribution {
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: clamp(0.9rem, 0.65rem + 1vw, 1.6rem);
  font-style: italic;
  color: var(--muted);
  line-height: 0.975;
}

/* Sections */

main > section {
  padding-block: var(--gap);
  border-top: 1px solid var(--rule);
}

h2, h3, dt {
  font-family: var(--display);
  font-weight: 400;
}

h2 {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  line-height: 1.25;
}

p, dd, li { margin: 0; text-wrap: pretty; }
h2, h3, .promise { text-wrap: balance; }

/* Intro: the lead paragraph under the hero */

.intro p {
  max-width: 34rem;
  margin-inline: auto;
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem);
  line-height: 1.55;
  text-align: center;
}

/* How it works */

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.75rem;
}

.ordinal {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* The work */

.work dl { margin: 0; display: grid; gap: 1.75rem; }
.work dt { font-size: 1.1875rem; margin-bottom: 0.25rem; }
.work dd { color: var(--muted); }

/* No strings */

.terms ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
/* Marcellus has one weight, so the lead-in sits on its own line like the work list, not in bold. */
.terms li { color: var(--muted); }
.terms strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.1875rem;
  color: var(--ink);
}

/* Contact */

.contact { text-align: center; }
.contact h2 {
  font-size: clamp(1.375rem, 1.1rem + 1.3vw, 1.875rem);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 1rem;
}
.contact p { font-size: 1.1875rem; }

/* Footer */

footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--muted);
}
footer p + p { margin-top: 0; }
footer .who { color: var(--ink); }
footer .legal {
  margin-top: 1.25rem;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
footer a, footer .legal span { white-space: nowrap; }

@media (max-width: 26rem) {
  footer span[aria-hidden] { display: block; height: 0; overflow: hidden; }
}
