/*
 * DearFamily Archive — the public site at dearfamilyarchive.com.
 *
 * Palette and type are the product's own (D95), copied here rather than imported so the site has no
 * build step and no dependency on the app: a Cloudflare Pages drop of plain files.
 */
:root {
  color-scheme: light;

  --paper: #faf9f6;
  --surface: #f1efe8;
  --line: #dedad0;
  --ink: #262521;
  --ink-soft: #5f5e5a;
  --plum: #7c4c63;
  --plum-deep: #5e3a4b;
  --plum-wash: #f4ecf0;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

img, svg { max-width: 100%; }
a { color: var(--plum-deep); }

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap; padding-block: 1rem;
}
.site-head img { height: 2.25rem; width: auto; display: block; }
nav.main { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; font-size: 0.95rem; }
nav.main a { color: var(--ink-soft); text-decoration: none; }
nav.main a:hover { color: var(--plum-deep); }
nav.main a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/*
 * `nav.main a` (0-0-1-2) outranks `.pill` (0-0-1-0), so inside the header the nav's soft-ink colour
 * was winning and the pill's label came out washed out on plum; the hover rule made it plum on plum,
 * i.e. invisible. Restate both at matching specificity rather than reaching for !important.
 */
nav.main a.pill, nav.main a.pill:hover { color: #fff; }

/* One filled control on the page, and it is never Sign in. */
.pill {
  display: inline-block; border-radius: 999px; background: var(--plum);
  color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.65rem 1.25rem; transition: background-color .15s;
}
.pill:hover { background: var(--plum-deep); }
.pill.big { font-size: 1.05rem; padding: 0.9rem 1.9rem; }

/* ---------- bands ---------- */
section { border-bottom: 1px solid var(--line); }
section.surface { background: var(--surface); }
section.wash { background: var(--plum-wash); }
section.plum { background: var(--plum); border-bottom: 0; }
section .wrap { padding-block: 4.5rem; }

/*
 * The hero sits tighter than the other bands, and tighter below than above. Its padding was sized
 * around a call-to-action button that has since been removed, which left a wide empty cream margin
 * under the last line — generous above the headline reads as composed, the same gap under it reads
 * as something missing.
 */
section.hero .wrap { padding-block: 3.75rem 2.75rem; }

/*
 * A long headline needs a smaller size and a wider measure, or it stacks into a column of five
 * lines and a director on a wide monitor sees a question and nothing else before the fold. The
 * home page's headline is eight words and can afford the full size; this one is sixteen.
 */
h1.long { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
@media (max-width: 640px) { section.hero .wrap { padding-block: 2.5rem 2rem; } }
@media (max-width: 640px) { section .wrap { padding-block: 3rem; } }

.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--plum-deep); margin: 0;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }

.center { text-align: center; }
.center .lede, .center h1 { margin-left: auto; margin-right: auto; }
.center .lede { max-width: 42rem; }
.stack > * + * { margin-top: 1.5rem; }

.cols { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .cols { grid-template-columns: 5fr 7fr; } }

/* ---------- figures ---------- */
.figs { display: grid; grid-template-columns: 1fr; }
@media (min-width: 720px) { .figs { grid-template-columns: repeat(3, 1fr); } }
.fig { padding: 1.25rem 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .fig { padding: 0 1.5rem; border-top: 0; border-left: 1px solid var(--line); }
  .fig:first-child { padding-left: 0; border-left: 0; }
}
.fig b {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.4rem, 7vw, 5.5rem); line-height: 1; color: var(--plum);
  font-variant-numeric: tabular-nums lining-nums;
}
.fig span {
  display: block; margin-top: 0.6rem; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- numbered steps ---------- */
ol.steps { list-style: none; margin: 0; padding: 0; }
ol.steps li {
  display: grid; grid-template-columns: 3rem 1fr; gap: 1.25rem;
  padding: 1.75rem 0; border-top: 1px solid var(--line);
}
ol.steps li:first-child { border-top: 0; padding-top: 0; }
ol.steps .n { font-family: var(--serif); font-size: 1.5rem; color: var(--plum); font-variant-numeric: tabular-nums; }
ol.steps p { margin-top: 0.5rem; color: var(--ink-soft); }

/* ---------- lists ---------- */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { position: relative; padding-left: 1.2rem; }
ul.plain li + li { margin-top: 0.9rem; }
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--plum);
}
strong { font-weight: 600; color: var(--ink); }

/* ---------- plum band ---------- */
section.plum h2 { color: #fff; }
section.plum ul.plain li { color: rgba(255, 255, 255, 0.92); }
section.plum ul.plain li::before { background: rgba(255, 255, 255, 0.55); }

/* ---------- quote ---------- */
blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.35; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem;
  align-items: center; justify-content: space-between;
  padding-block: 1.75rem; font-size: 0.9rem; color: var(--ink-soft);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--plum-deep); }
.site-foot .tagline { font-family: var(--serif); font-size: 1rem; }

:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; border-radius: 2px; }
