/* maynarddokken.com 1.0.0: "the family tartan and the lilac".
   Type: Alegreya (serif, text and titles) and Alegreya Sans (navigation, captions, small print), self-hosted, SIL OFL.
   Colour: heather white page, loch ink, the shield blue of the MD crest, lilac (the song of the last paragraph).
   Signature: the family's own blue-and-grey tartan behind a white title leaf, and as the selvedge of header and footer. */

@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/assets/fonts/alegreya-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url(/assets/fonts/alegreya-latin-wght-italic.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); }

:root {
  --page: #f8f6f9;        /* heather white */
  --leaf: #ffffff;
  --ink: #232a3d;         /* loch ink */
  --slate: #4e5466;
  --shield: #2f4e85;      /* the crest's blue, deepened for text */
  --shield-deep: #1f3766;
  --lilac: #6e4f82;
  --lilac-mid: #a58db8;
  --lilac-soft: #efeaf2;
  --rule: #dcd6e2;
  --night: #1f2740;
  --night-ink: #e6e1ec;
  --night-soft: #c9c3d4;
  --serif: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Alegreya Sans", "Gill Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --tartan: url(/images/mhd/MHD-Site-Wallpaper.png);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--serif); font-size: 1.1875rem; line-height: 1.62;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal; text-rendering: optimizeLegibility;
}
@media (min-width: 64rem) { body { font-size: 1.25rem; } }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--shield); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--shield-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; }
strong { font-weight: 700; }
.nw { white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 42rem); }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 10; background: var(--leaf); color: var(--ink);
  padding: .6rem 1rem; font-family: var(--sans); }
.skip:focus { left: .75rem; }

/* ------------------------------------------------------------------ header: the selvedge, the crest, three links */
.mast { background: var(--leaf); border-bottom: 1px solid var(--rule); position: relative; }
.mast::before { content: ""; display: block; height: 7px; background: var(--tartan) center / 640px auto; }
.mast-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap;
  padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--shield-deep); }
.brand-logo { width: 44px; height: 44px; flex: none; }
.brand-name { font-size: 1.05rem; line-height: 1.25; font-weight: 500; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.nav a { font-family: var(--sans); font-size: 1.02rem; font-weight: 500; color: var(--slate); text-decoration: none;
  padding-block: .35rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--shield-deep); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lilac-mid); }
@media (max-width: 40rem) {
  .brand-name { font-size: .98rem; }
  .brand-logo { width: 38px; height: 38px; }
  .nav { width: 100%; }
}

/* ------------------------------------------------------------------ the title leaf on the tartan */
.hero { position: relative; padding-block: clamp(2rem, 6vw, 4.5rem); }
.hero--band { padding-block: clamp(2.5rem, 9vw, 6.5rem); overflow: hidden; }
.band { position: absolute; inset: 0; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 39, 64, .06), rgba(31, 39, 64, .14)); }
.hero-wrap { position: relative; }
.crumbs ol { list-style: none; margin: 0 auto 1rem; padding: 0; display: flex; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: .95rem; color: var(--slate); }
.hero--band .crumbs ol { width: fit-content; background: var(--leaf); padding: .2rem .8rem; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--lilac-mid); }
.leaf { position: relative; max-width: 54rem; margin-inline: auto; background: var(--leaf); text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 4rem) clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 1px 2px rgba(31, 39, 64, .10), 0 24px 48px -24px rgba(31, 39, 64, .45); }
.leaf::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--rule); pointer-events: none; }
.crest { width: 84px; height: 84px; margin: 0 auto 1.25rem; }
.title { font-size: clamp(2.05rem, 1.25rem + 3.4vw, 3.6rem); line-height: 1.06; letter-spacing: -.012em; font-weight: 500;
  color: var(--ink); margin-bottom: .55em; }
.title--small { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.standfirst { font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.42rem); line-height: 1.5; color: var(--shield-deep);
  max-width: 34rem; margin: 0 auto 1.1rem; }
.family-line { font-size: 1rem; line-height: 1.6; color: var(--slate); max-width: 35rem; margin: 0 auto; padding-top: 1.1rem;
  border-top: 1px solid var(--lilac-mid); }
.contents { margin-top: 1.6rem; }
.contents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; }
.contents a { font-family: var(--sans); font-size: 1rem; font-weight: 500; text-decoration: none; color: var(--shield);
  border-bottom: 1px solid var(--rule); }
.contents a:hover { border-bottom-color: var(--shield); }

/* ------------------------------------------------------------------ his life: chapters, each with its mounted print */
.life { width: min(100% - 2 * var(--gutter), 68rem); margin: clamp(2.5rem, 6vw, 4.5rem) auto 0; }
.ch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-block: clamp(2rem, 5vw, 3.75rem);
  border-top: 1px solid var(--rule); grid-template-areas: "fig" "text"; }
.ch:first-of-type { border-top: 0; padding-top: 0; }
.ch-text { grid-area: text; max-width: var(--measure); }
.ch .fig { grid-area: fig; }
@media (min-width: 52rem) {
  .ch { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "text fig"; gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center; }
  .ch:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "fig text"; }
}
.ch h2 { font-size: clamp(1.65rem, 1.25rem + 1.3vw, 2.25rem); margin-bottom: .6em; color: var(--ink); }
.ch h2::before { content: ""; display: block; width: 2.25rem; height: 2px; background: var(--lilac-mid); margin-bottom: .8rem; }
.fig { margin: 0; }
.fig--photo { background: var(--leaf); padding: .7rem; justify-self: center; width: fit-content; max-width: 100%;
  box-shadow: 0 1px 2px rgba(31, 39, 64, .08), 0 14px 30px -16px rgba(31, 39, 64, .35); }
.fig--photo img { max-height: 26rem; width: auto; }
.fig--emblem { background: var(--leaf); padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--rule);
  justify-self: center; width: fit-content; max-width: min(100%, 26rem); }
.fig--emblem img { max-height: 16rem; width: auto; }
figcaption { font-family: var(--sans); font-size: .98rem; line-height: 1.4; color: var(--slate); text-align: center; padding: .7rem .25rem .1rem; }

/* ------------------------------------------------------------------ the family album */
.album { background: var(--lilac-soft); margin-top: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(2.5rem, 6vw, 4.25rem);
  border-block: 1px solid var(--rule); }
.album h2 { text-align: center; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.album-row { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  align-items: start; }
.album .fig--photo { width: 100%; }
.album .fig--photo img { width: 100%; max-height: none; }
.album figcaption { font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--ink); }
.figlink { display: block; }
.figlink:hover img { filter: brightness(1.04); }

/* ------------------------------------------------------------------ letters: the son's letter, the daughter's words */
.letters { width: min(100% - 2 * var(--gutter), 46rem); margin: clamp(2.5rem, 7vw, 5rem) auto 0; display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.sheet { background: var(--leaf); padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.75rem);
  box-shadow: 0 1px 2px rgba(31, 39, 64, .08), 0 18px 40px -26px rgba(31, 39, 64, .4); border-top: 3px solid var(--shield); }
.sheet h2 { font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.2rem); margin-bottom: 1.1rem; color: var(--shield-deep); }
.sheet h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); margin: 2.25rem 0 1rem; padding-top: 1.75rem; border-top: 1px solid var(--rule);
  color: var(--shield-deep); }
.signoff { font-style: italic; text-align: right; color: var(--lilac); margin-top: 1.4rem; }
.remember { color: var(--ink); }
.lyric { font-style: italic; font-size: 1.12em; line-height: 1.7; color: var(--lilac); text-align: center; max-width: 31rem;
  margin: 2rem auto 0; padding: 1.4rem 0 .25rem; border-top: 1px solid var(--lilac-mid); }

/* ------------------------------------------------------------------ invitation to the messages */
.invite { text-align: center; padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 5vw, 3rem); }
.invite h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); margin-bottom: .7rem; }
.invite p { color: var(--slate); }
.invite-link a { display: inline-block; font-family: var(--sans); font-weight: 500; font-size: 1.08rem; color: var(--leaf);
  background: var(--shield); padding: .7rem 1.4rem; text-decoration: none; border-radius: 2px; }
.invite-link a:hover { background: var(--shield-deep); color: var(--leaf); }

/* ------------------------------------------------------------------ Family & Friends: a book of messages */
.book { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
@media (min-width: 60rem) {
  .book { grid-template-columns: 14.5rem minmax(0, 40rem); justify-content: center; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
  .names { position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow: auto; }
}
.names-h { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: .5rem; }
.names-list { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.35; }
.names-list li { padding: .2rem 0; }
.names-list a { color: var(--slate); text-decoration: none; }
.names-list a:hover { color: var(--shield-deep); text-decoration: underline; }
@media (max-width: 59.99rem) {
  .names { border-bottom: 1px solid var(--rule); padding-bottom: 1.25rem; }
  .names-list { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
}
.entry { padding-block: 2rem 1.25rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry-name { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.85rem); color: var(--shield-deep); margin-bottom: .8rem; }
.entry-name::before { content: ""; display: block; width: 1.75rem; height: 2px; background: var(--lilac-mid); margin-bottom: .7rem; }
.entry:target .entry-name { color: var(--lilac); }
.entry:target .entry-name::before { width: 3.5rem; background: var(--lilac); }

/* ------------------------------------------------------------------ privacy notice */
.notice { padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; }
.notice h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin: 2rem 0 .7rem; color: var(--shield-deep); }
.notice-date { font-family: var(--sans); color: var(--slate); }

/* ------------------------------------------------------------------ further reading, about this page */
.further-reading, .about-page, .references { padding-block: 1.75rem; }
.further-reading h2, .about-page h2, .references h2 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; color: var(--ink); }
.further-reading ul, .references ol { margin: 0; padding-left: 1.2rem; font-size: 1rem; line-height: 1.55; }
.further-reading li, .references li { margin-bottom: .5rem; }
.ref-intro, .about-page p { font-size: 1rem; line-height: 1.55; color: var(--slate); }
.ref-site, .ref-note { color: var(--slate); }
.about-page { border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.addr { font-family: var(--sans); }
main > .about-page:last-child, main > .further-reading:last-child { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.nf-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
  font-family: var(--sans); font-weight: 500; }

/* ------------------------------------------------------------------ footer */
.foot { background: var(--night); color: var(--night-ink); }
.foot::before { content: ""; display: block; height: 7px; background: var(--tartan) center / 640px auto; }
.foot-row { display: grid; gap: 1rem 2rem; padding-block: 2.25rem 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .foot-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.foot-brand { display: flex; align-items: center; gap: .8rem; color: var(--night-ink); text-decoration: none; font-size: 1.1rem; }
.foot-brand:hover { color: #fff; }
.foot-logo { width: 40px; height: 40px; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot-nav a { color: var(--night-ink); font-family: var(--sans); font-weight: 500; }
.foot-nav a:hover { color: #fff; }
.foot-copy { grid-column: 1 / -1; margin: 0; font-family: var(--sans); font-size: .95rem; color: var(--night-soft); }
.foot :focus-visible { outline-color: var(--lilac-mid); }

@media print {
  .mast::before, .foot::before, .band, .contents, .names { display: none; }
  .leaf, .sheet, .fig--photo { box-shadow: none; }
  body { background: #fff; }
}
