/* freemasons.congressionalcemetery.org — public styles */
:root {
  --bg: #e9eae5;            /* matches the header image's bottom edge */
  --paper: #f4f4f0;
  --ink: #1c1c1c;
  --muted: #5c5c57;
  --rule: #c9c9c1;
  --accent: #6b5323;        /* aged brass */
  --link: #23395b;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--accent); }

/* ── Top bar / banner ── */
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 1rem 0; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.topbar-right { display: flex; gap: 1.25rem; }
.site-footer p { margin: .35rem 0; }
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--ink); text-decoration: underline; }
.banner a { display: block; }
.banner img {
  display: block; width: 100%; margin: 0 auto;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.is-home  .banner img { max-width: 760px; }
.is-inner .banner img { max-width: 440px; }

.draft-banner { background: #fff3cd; color: #664d03; text-align: center; padding: .5rem 1rem; font-size: .95rem; border-block: 1px solid #f1d78a; }

/* ── Layout ── */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1rem 3rem; }
.blk { margin: 2.25rem 0; }
.blk-title { font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2rem); letter-spacing: .04em; margin: 0 0 1rem; }
.blk-subtitle { font-weight: 600; font-size: 1.25rem; margin: 0 0 .5rem; }
.is-centered { text-align: center; }
.blk-header.is-centered .lead { max-width: 44rem; margin: 0 auto; }
.muted { color: var(--muted); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose img { border-radius: 2px; }
.prose blockquote { margin: 1.25rem 0; padding-left: 1.25rem; border-left: 3px solid var(--rule); color: var(--muted); font-style: italic; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--rule); padding: .35rem .6rem; vertical-align: top; }
.prose figure { margin: 1.25rem 0; }
.prose figcaption { font-size: .95rem; color: var(--muted); }

/* Home intro text sits in a quiet "paper" box */
.is-home .blk-text { background: var(--paper); border: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2.25rem); }

.blk-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem; }
.blk-callout { background: var(--paper); border-left: 4px solid var(--accent); padding: 1.25rem 1.5rem; }
.callout-title { font-weight: 600; font-size: 1.2rem; margin-bottom: .35rem; }

.blk-photo { text-align: center; }
.blk-photo img { display: block; margin: 0 auto; }
.blk-photo.size-small img { max-width: 320px; }
.blk-photo.size-medium img { max-width: 600px; }
.blk-photo.size-large img { max-width: 860px; }
.blk-photo figcaption { margin-top: .5rem; font-size: .95rem; color: var(--muted); }

.blk-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; align-items: center; }
.blk-map iframe { width: 100%; height: 300px; border: 1px solid var(--rule); }

/* ── Name search ── */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.banner-h1 { margin: 0; font-size: inherit; font-weight: inherit; }
.names-search { max-width: 28rem; margin: 0 auto 1.75rem; text-align: center; }
.names-search input { width: 100%; font: inherit; font-size: 1.1rem; padding: .6rem .9rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink); }
.names-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.names-none { margin: 1rem 0 0; }
.name-entry[hidden], .names-letter[hidden] { display: none; }

/* ── Name columns ── */
.names { column-width: 15rem; column-gap: 2.5rem; column-rule: 1px solid var(--rule); }
.name-entry { display: block; break-inside: avoid; padding: .3rem 0 .45rem; text-decoration: none; color: var(--ink); }
.name-entry .name { display: block; font-size: 1.15rem; line-height: 1.3; }
.name-entry .years { display: block; font-size: .9rem; color: var(--muted); }
.name-entry:hover .name { color: var(--accent); text-decoration: underline; }
.name-entry.is-draft { opacity: .6; }
.draft-tag { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: #fff3cd; color: #664d03; padding: 0 .35rem; }
.names-letter { break-after: avoid; font-size: 1.5rem; color: var(--accent); border-bottom: 1px solid var(--rule); margin: .75rem 0 .25rem; }
.names-letter:first-child { margin-top: 0; }

/* ── Person page ── */
.crumbs { margin: 1.25rem 0 0; font-size: 1rem; }
.crumbs a { text-decoration: none; }
.person-head { text-align: center; margin: 1rem 0 2rem; }
.person-head h1 { font-weight: 500; font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: .03em; margin: 0; line-height: 1.15; }
.person-years { margin: .25rem 0 0; font-size: 1.25rem; color: var(--muted); }
.person-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.5rem; margin: 1rem 0 0; }
.person-facts dt { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.person-facts dd { margin: 0; }

.blk-profile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.blk-profile.no-portrait { grid-template-columns: 1fr; max-width: 46rem; margin-inline: auto; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; border: 8px solid var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.portrait figcaption { margin-top: .5rem; font-size: .95rem; color: var(--muted); text-align: center; }
@media (max-width: 720px) {
  .blk-profile { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; margin: 0 auto; }
}

/* ── Collage ── */
.collage { column-width: 15rem; column-gap: 1rem; }
.collage figure { break-inside: avoid; margin: 0 0 1rem; background: var(--paper); padding: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.collage img { display: block; width: 100%; }
.collage a { display: block; cursor: zoom-in; }
.collage figcaption { font-size: .9rem; color: var(--muted); padding: .35rem .2rem .1rem; line-height: 1.35; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,10,.9); }
.lightbox-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 3.5rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.lightbox p { color: #eee; margin: .9rem 0 0; text-align: center; max-width: 50rem; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; padding: .5rem .75rem; opacity: .8; }
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox .lb-close { top: .5rem; right: .5rem; font-size: 2rem; }
.lightbox .lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }

.site-footer { text-align: center; color: var(--muted); font-size: .9rem; padding: 2rem 1rem 2.5rem; border-top: 1px solid var(--rule); max-width: 1040px; margin: 0 auto; }
