/* Evening Service palette — see colors.md. The site is always dark. */
:root {
  color-scheme: dark;

  --juniper: #33463C;
  --deep-pine: #243129;
  --harbor: #44688C;
  --tide: #8FB0CC;
  --brass: #B99655;
  --linen: #F1EFE8;
  --stone: #7C8279;
  --soft-juniper: #8FAE9C;
  --faded-stone: #9AA69D;

  --bg: var(--deep-pine);
  --text: var(--linen);
  --text-2: var(--faded-stone);
  --primary: var(--soft-juniper);
  --accent2: var(--tide);
  --card: #2C3A31;
  --line: #3D4E43;
  --mount: #2A382F;

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

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--primary); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* Site chrome */
.site-header {
  text-align: center;
  padding: 1.6rem 1rem 0;
}
.site-header a {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-2);
}
.site-header a:hover { color: var(--brass); }

.site-footer {
  text-align: center;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--text-2);
  padding: 3rem 1rem 2.5rem;
}
.site-footer a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer a:hover { color: var(--brass); border-color: var(--brass); }

main { padding: 0 1.25rem; }
.wrap { max-width: 42rem; margin: 0 auto; }

/* Name-plate hero */
.plate {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}
.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.1rem;
}
.plate h1 {
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1.12;
  color: var(--primary);
  text-wrap: balance;
}
.plate .dates {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent2);
  margin-top: .5rem;
}
.plate .rule {
  width: 4.5rem;
  height: 2px;
  background: var(--brass);
  border: 0;
  margin: 1.7rem auto 0;
}
.plate .lede {
  max-width: 34rem;
  margin: 1.7rem auto 0;
  color: var(--text-2);
  text-wrap: balance;
}

.epigraph {
  text-align: center;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  max-width: 30rem;
  margin: 0 auto;
  text-wrap: balance;
}
.epigraph .who {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: .9rem;
}

/* Link cards (person index, home) */
.cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.6rem 0 1.5rem;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.35rem 1.6rem 1.45rem;
  text-decoration: none;
  transition: border-color .18s ease;
}
.card:hover { border-color: var(--brass); }
.card h2 {
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--primary);
  line-height: 1.25;
}
.card .dates {
  font-style: italic;
  color: var(--accent2);
  margin-top: .1rem;
}
.card p {
  color: var(--text-2);
  font-size: 1rem;
  margin-top: .45rem;
}
.card .go {
  display: block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: .9rem;
}
.card.pending { opacity: .75; }
.card.pending:hover { border-color: var(--line); }

/* Long-form article (obituary) */
article.story { padding-bottom: 1rem; }
article.story p { margin: 0 0 1.15rem; }
article.story ul {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
}
article.story ul ul { margin: .5rem 0 .5rem; }
article.story li { margin-bottom: .7rem; }
article.story blockquote {
  margin: 1.3rem 1.5rem 1.3rem 1.3rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brass);
  font-style: italic;
  color: var(--text-2);
}
article.story blockquote p { margin-bottom: .8rem; }
article.story blockquote p:last-child { margin-bottom: 0; }

.fleuron {
  text-align: center;
  color: var(--brass);
  font-size: 2rem;
  padding: 1.2rem 0 1.8rem;
  user-select: none;
}

.signoff { margin-top: 2.2rem; }
.signoff .name { font-style: italic; }

.footnotes {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  font-style: italic;
  color: var(--text-2);
}
.footnotes p { margin-bottom: .8rem; }

/* Photographs — empty album mounts until scans arrive */
figure.photo { margin: 1.8rem auto 2rem; max-width: 30rem; }
figure.photo .mount {
  aspect-ratio: 4 / 3;
  background: var(--mount);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -8px;
  display: grid;
  place-items: center;
}
figure.photo.portrait .mount { aspect-ratio: 3 / 4; }
figure.photo .mount span {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-2);
}
figure.photo img {
  display: block;
  width: 100%;
  height: auto;
}
figure.photo figcaption {
  font-style: italic;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text-2);
  margin-top: .6rem;
  text-align: center;
}

/* Photo gallery page */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.2rem;
  padding: 1rem 0 2rem;
}
.gallery figure.photo { margin: 0; max-width: none; }

.empty-note {
  text-align: center;
  color: var(--text-2);
  font-style: italic;
  max-width: 30rem;
  margin: 1rem auto 0;
}

/* Family tree */
.tree-scroll { overflow-x: auto; padding: 1rem 0 2rem; }
.tree { min-width: max-content; margin: 0 auto; font-family: var(--sans); }
.tree ul {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
}
.tree ul ul { padding-top: 2rem; }
.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 2rem;
  border-left: 1px solid var(--brass);
}
.tree li {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 2rem .6rem 0;
}
.tree > ul > li { padding-top: 0; }
.tree li::before, .tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 2rem;
  border-top: 1px solid var(--brass);
}
.tree li::after {
  right: auto;
  left: 50%;
  border-left: 1px solid var(--brass);
}
.tree li:only-child::before, .tree li:only-child::after { border-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border-top: 0; }
.tree > ul > li::before, .tree > ul > li::after { display: none; }

.person {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .55rem .9rem .6rem;
  text-align: center;
  line-height: 1.35;
}
.person .p { display: block; white-space: nowrap; }
.person .p a { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--brass); }
.person .p a:hover { color: var(--brass); }
.person .tie {
  display: block;
  color: var(--brass);
  font-size: .72rem;
  letter-spacing: .1em;
  padding: .1rem 0;
}
.person .d {
  display: block;
  font-size: .74rem;
  font-style: italic;
  font-family: var(--serif);
  color: var(--text-2);
}
.person.focus { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }

.tree-note {
  font-style: italic;
  font-size: .95rem;
  color: var(--text-2);
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 1rem;
}

/* Login */
.login-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  max-width: 22rem;
  margin: 2.5rem auto;
  padding: 2rem 1.8rem;
  text-align: center;
}
.login-box p { color: var(--text-2); font-size: 1rem; margin-bottom: 1.3rem; }
.login-box input {
  font: inherit;
  width: 100%;
  padding: .55rem .8rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 3px;
  text-align: center;
  margin-bottom: .8rem;
}
.login-box input:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.login-box button {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  width: 100%;
  padding: .65rem;
  background: var(--juniper);
  color: var(--linen);
  border: 1px solid var(--soft-juniper);
  border-radius: 3px;
  cursor: pointer;
}
.login-box button:hover { background: #3D5548; }
.login-box button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.login-box .error {
  color: #C98A8A;
  font-size: .92rem;
  margin: .8rem 0 0;
  min-height: 1.2em;
}
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 600;
  width: 100%;
  padding: .65rem;
  background: var(--linen);
  color: #26302B;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
}
.google-btn:hover { background: #FFFFFF; }
.google-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.login-box .alt { margin: 1.1rem 0 0; font-size: .92rem; }
.login-box .alt a { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
