/* ============================================================
   Duncan Heights Cemetery — design tokens
   Palette: woodland green, weathered limestone, aged brass,
   muted flag red. Deliberately not the default cream/terracotta.
   Display: Cormorant Garamond (lapidary, inscriptional serif)
   Body:    Source Serif 4 (readable long-form)
   Meta:    Special Elite (typewriter — evokes lost paper records,
            hand-written wills, deed searches, WPA survey cards)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Special+Elite&display=swap');

:root {
  --moss-dark: #232C1D;
  --moss-mid: #47572F;
  --moss-line: #5C6B44;
  --stone: #A79E8C;
  --stone-light: #D9D1BF;
  --paper: #EAE3D1;
  --paper-light: #F3EEE1;
  --ink: #221D14;
  --ink-soft: #453F30;
  --brass: #9C7A3C;
  --flag-red: #7C2B28;
  --flag-red-soft: #9B4440;

  --display: 'Cormorant Garamond', serif;
  --body: 'Source Serif 4', serif;
  --meta: 'Special Elite', monospace;

  --max-w: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--flag-red); text-decoration-color: rgba(124,43,40,0.35); text-underline-offset: 3px; }
a:hover { color: var(--moss-dark); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--moss-dark);
  margin: 0 0 0.5em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.eyebrow {
  font-family: var(--meta);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 0.6em;
}

/* ---------- nav ---------- */
header.site-header {
  background: var(--moss-dark);
  border-bottom: 3px solid var(--brass);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--display);
  color: var(--paper-light);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--stone-light); }
.brand small {
  display: block;
  font-family: var(--meta);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 2px;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  color: var(--stone-light);
  text-decoration: none;
  font-family: var(--body);
  font-size: 0.92rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--paper-light);
  border-bottom-color: var(--brass);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  color: var(--paper-light);
  overflow: hidden;
  background: var(--moss-dark);
}
.hero img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.55;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35,44,29,0.35) 0%, rgba(35,44,29,0.55) 55%, rgba(35,44,29,0.92) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5.5rem 1.75rem 4rem;
}
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.45); }
.hero .lede {
  font-size: 1.2rem;
  max-width: 42em;
  color: var(--stone-light);
}
.hero .eyebrow { color: var(--stone-light); }

.page-hero {
  background: var(--moss-dark);
  color: var(--paper-light);
  padding: 3.4rem 0 2.6rem;
  border-bottom: 3px solid var(--brass);
}
.page-hero .eyebrow { color: var(--stone-light); }
.page-hero h1 { color: #fff; }
.page-hero p { color: var(--stone-light); max-width: 46em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--brass); color: var(--moss-dark); }
.btn-primary:hover { background: #b28e4e; color: var(--moss-dark); transform: translateY(-1px); }
.btn-outline { border-color: var(--paper-light); color: var(--paper-light); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-dark { background: var(--moss-dark); color: var(--paper-light); }
.btn-dark:hover { background: var(--moss-mid); color: #fff; }

/* ---------- sections ---------- */
main { display: block; }

section { padding: 3.4rem 0; }
section.tight { padding: 2.2rem 0; }
section.alt { background: var(--paper-light); border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
section.dark {
  background: var(--moss-dark);
  color: var(--stone-light);
}
section.dark h2, section.dark h3 { color: #fff; }
section.dark a { color: var(--stone-light); text-decoration-color: rgba(217,209,191,0.4); }
section.dark a:hover { color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

figure { margin: 0; }
figcaption {
  font-family: var(--meta);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  line-height: 1.4;
}
section.dark figcaption { color: var(--stone); }

.card {
  background: var(--paper-light);
  border: 1px solid var(--stone);
  padding: 1.6rem;
  border-radius: 2px;
}

.note {
  border-left: 3px solid var(--brass);
  background: var(--paper-light);
  padding: 1.1rem 1.4rem;
  font-size: 0.96rem;
}

/* ---------- timeline (History page) ---------- */
.timeline {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 2.2rem;
  border-left: 2px solid var(--moss-line);
}
.timeline-item { position: relative; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.31rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--paper);
}
.timeline-year {
  font-family: var(--meta);
  color: var(--flag-red);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.3em;
}
.timeline-item h3 { margin-bottom: 0.35em; }
.timeline-item .src {
  font-family: var(--meta);
  font-size: 0.7rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 0.5em;
}

/* ---------- photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}
.gallery figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--stone);
}
.gallery.tall figure img { height: 300px; }

/* ---------- news cards ---------- */
.news-card {
  border: 1px solid var(--stone);
  background: var(--paper-light);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.6rem;
}
.news-card .pub {
  font-family: var(--meta);
  font-size: 0.78rem;
  color: var(--flag-red);
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 0.4em;
}
.news-card h3 { margin-bottom: 0.5em; }
.news-card .dl { margin-top: 0.9em; font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--stone);
  padding: 1.4rem 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item h3 { margin-bottom: 0.5em; color: var(--flag-red-soft); }

/* ---------- footer ---------- */
footer {
  background: var(--moss-dark);
  color: var(--stone);
  padding: 2.6rem 0 2rem;
  font-size: 0.88rem;
  border-top: 3px solid var(--brass);
}
footer a { color: var(--stone-light); }
footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
footer h4 {
  color: var(--paper-light);
  font-family: var(--meta);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 0.5em; }
footer .fineprint {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--moss-mid);
  font-size: 0.78rem;
  color: var(--moss-line);
}
@media (max-width: 700px) {
  footer .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- misc ---------- */
.stat-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.stat { min-width: 120px; }
.stat .num {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brass);
  line-height: 1;
}
.stat .label {
  font-family: var(--meta);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
section.dark .stat .label { color: var(--stone); }

.divider-vine {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--moss-line), var(--moss-line) 6px, transparent 6px, transparent 12px);
  margin: 3rem 0;
  border: none;
}

ul.plain, ol.plain { padding-left: 1.3em; }
ul.plain li, ol.plain li { margin-bottom: 0.5em; }
