:root {
  --bg: #fdf6ec;
  --ink: #2b2420;
  --muted: #6b5d52;
  --accent: #c2410c;
  --eyebrow: #b07a52;
  --rule: #e7dccb;
  --rule-soft: #cbbca9;
  --max-width: 42rem;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --display: Georgia, "Times New Roman", serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #f3d8c2;
}

article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ---------- Header ---------- */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.875rem;
  margin-bottom: 2.25rem;
}

header img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
  margin-bottom: 1.375rem;
}

footer {
  display: flex;
  justify-content: center;
  & img {
    margin-top: 1.375rem;
    height: 200px;
    object-fit: cover;
  }
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.625rem, 6.4vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  margin: 0;
}

h1 span {
  color: var(--accent);
}

.contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 1rem;
}

.contact .dot {
  color: var(--rule-soft);
}

/* ---------- Letter body ---------- */
.dateline {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a7a6a;
  margin: 0 0 2rem;
}

.salutation {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0 0 1.5rem;
}

p {
  margin: 0 0 1.125rem;
  hyphens: auto;
}

h2 {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin: 2.125rem 0 0.625rem;
}

/* ---------- Sign-off ---------- */
.signoff {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.signoff-label {
  font-size: 1rem;
  color: var(--muted);
}

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  article {
    padding: 2.5rem 1.25rem 3.5rem;
  }
  .salutation {
    font-size: 1.25rem;
  }
  p {
    font-size: 1.0625rem;
  }
}
