:root {
  --bg: #faf7f1;
  --panel: #ffffff;
  --ink: #33302c;
  --muted: #6f6a62;
  --accent: #9c5b3f;
  --accent-dark: #7d4631;
  --line: #e6ddcf;
  --maxtext: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* ---------- header / nav ---------- */
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
}
.brand-name {
  display: flex;
  flex-direction: column;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
}
.brand-name small {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.98rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,30,45,0.25), rgba(20,30,45,0.45));
}
.hero-inner { position: relative; z-index: 1; color: #fff; padding: 2rem; }
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.8rem;
  margin: 0 0 0.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0;
  font-weight: 700;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.hero-dates { margin: 0.6rem 0 0; font-size: 1.1rem; letter-spacing: 0.05em; }

/* ---------- content ---------- */
.content {
  max-width: var(--maxtext);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
}
.content h2 {
  font-size: 1.7rem;
  margin: 2.6rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
}
.content h3 { font-size: 1.2rem; margin: 0 0 0.4rem; color: var(--accent-dark); }
.content p { margin: 0 0 1.1rem; }
.byline, .signoff { color: var(--muted); font-style: italic; }
.page-intro { color: var(--muted); font-size: 1.05rem; }

.verse {
  font-style: italic;
  color: #4a463f;
  padding-left: 1.25rem;
  border-left: 3px solid var(--line);
  margin: 1.2rem 0 1.4rem;
}

.portrait {
  margin: 0 auto 2rem;
  max-width: 420px;
}
.portrait img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.epigraph {
  margin: 2.5rem 0 1rem;
  text-align: center;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent-dark);
}
.epigraph cite { display: block; margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.3rem;
  border-radius: 4px;
  font-size: 0.98rem;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.donate-buttons { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.4rem 0 0.5rem; }

.memory {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin: 0 0 1.2rem;
}
.memory p:last-child { margin-bottom: 0; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 1rem 0 2rem;
}
.thumb {
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.thumb:hover img { transform: scale(1.06); }

.videos { display: grid; gap: 1.2rem; margin: 1rem 0 2rem; }
.video { position: relative; padding-bottom: 56.25%; height: 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6px; }

/* ---------- footer ---------- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

/* ---------- lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 88vh; border-radius: 4px; box-shadow: 0 0 40px rgba(0,0,0,0.6); }
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 18px; right: 18px; font-size: 1.8rem; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.25rem;
    padding-top: 0.5rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.5rem 0; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
