@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/playfair-display-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/merriweather-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/merriweather-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("/fonts/merriweather-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4efe6;
  --bg-soft: #ebe4d6;
  --paper: #fbf8f2;
  --ink: #2c2924;
  --muted: #5e584e;
  --rule: #c4b496;
  --accent: #4f5b4a;
  --link: #3f4a3b;
  --shadow: 0 8px 28px rgba(44, 41, 36, 0.08);
  --serif: "Playfair Display", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --text: "Merriweather", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.05rem;
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--paper);
  padding: 0.4rem 0.8rem;
  z-index: 20;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(46rem, calc(100% - 2rem));
  margin: 0 auto;
}

.wide {
  width: min(58rem, calc(100% - 2rem));
}

.site-header,
.page-header {
  text-align: center;
  padding: 2.75rem 0 1.75rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-family: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header h1,
.person-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.rule {
  width: 4.5rem;
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 1.25rem auto;
}

.intro,
.more-note {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 36rem;
}

.memorial-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.person-card {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.1rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid #e2dacb;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  border-radius: 4px;
}

.person-card img {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 3px;
}

.person-card h2 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.25;
}

.person-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.person-card:hover,
.person-card:focus-visible {
  border-color: var(--rule);
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 3rem 0 2.25rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.back-link:hover {
  border-bottom-color: currentColor;
}

.hero {
  text-align: center;
  padding-bottom: 0.5rem;
}

.portrait {
  width: min(18rem, 78vw);
  margin: 0 auto 1.5rem;
  border-radius: 4px;
  box-shadow: var(--shadow);
  background: #fff;
}

.dates {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.place {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.section-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-nav a:hover {
  color: var(--ink);
}

.section {
  padding: 2.4rem 0 0.4rem;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.85rem;
  text-align: center;
  margin: 0 0 0.35rem;
}

.section h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 1.8rem 0 0.6rem;
}

.section p {
  margin: 0 0 1rem;
}

.obit-lede {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.placeholder {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin: 0.5rem 0 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.7rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  background: var(--bg-soft);
  border-radius: 3px;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery a:hover img,
.gallery a:focus-visible img {
  opacity: 0.92;
}

.video-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.video-card h3 {
  text-align: center;
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1b1a17;
  border-radius: 3px;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.92);
  display: none;
  z-index: 40;
  padding: 1rem;
}

.lightbox.is-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: calc(100vh - 6rem);
  object-fit: contain;
}

.lightbox-caption {
  color: #ece6da;
  text-align: center;
  margin: 0.75rem 0 0;
  max-width: 40rem;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: transparent;
  border: 0;
  color: #f4efe6;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
}

.lightbox-close {
  top: 0.6rem;
  right: 0.6rem;
}

.lightbox-prev {
  left: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.not-found {
  text-align: center;
  padding: 5rem 0 3rem;
}

.not-found h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.2rem;
  margin: 0 0 1rem;
}

@media (max-width: 32rem) {
  .person-card {
    grid-template-columns: 5.6rem 1fr;
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .person-card img {
    width: 5.6rem;
    height: 5.6rem;
  }

  .person-card h2 {
    font-size: 1.25rem;
  }

  body {
    font-size: 1rem;
  }
}

@media (min-width: 40rem) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media print {
  .section-nav,
  .lightbox,
  .back-link,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
