:root {
  --ink: #33302a;
  --ink-soft: #5c574d;
  --paper: #faf7f1;
  --paper-deep: #f1eadd;
  --card: #fffdf8;
  --gold: #a5824a;
  --gold-soft: #c9b18a;
  --line: #e3dac8;
  --shadow: 0 2px 14px rgba(70, 58, 35, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1.06rem;
  line-height: 1.65;
}

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

/* ---------- Sticky slim header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.site-header-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
.site-header .brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header .brand .brand-orn { color: var(--gold); margin-right: 0.45rem; }
.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}
.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.site-header nav a:hover { color: var(--gold); text-decoration: underline; }

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  padding: 4.2rem 1.25rem 3rem;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #f4ecdb 0%, rgba(244,236,219,0) 70%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead-inner { max-width: 44rem; margin: 0 auto; }
.masthead-rule { color: var(--gold); font-size: 1.3rem; margin: 0 0 1rem; }
.masthead h1 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 8.5vw, 4rem);
  line-height: 1.08;
  margin: 0;
  letter-spacing: 0.01em;
}
.masthead-sub {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: var(--gold);
  margin: 0.7rem 0 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
}
.masthead-lede {
  max-width: 32rem;
  margin: 1.4rem auto 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* ---------- Layout ---------- */
main { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 3rem; }
section { margin-top: 3.2rem; }
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.9rem;
  text-align: center;
  margin: 0 0 1.2rem;
}
h2::after {
  content: "";
  display: block;
  width: 3.2rem; height: 1px;
  background: var(--gold-soft);
  margin: 0.6rem auto 0;
}

/* ---------- About ---------- */
.portrait-frame {
  margin: 0 auto 2rem;
  max-width: 22rem;
  border: 1px solid var(--gold-soft);
  outline: 1px solid var(--line);
  outline-offset: 5px;
  background: linear-gradient(160deg, #f7f1e3, #efe6d2);
  padding: 0.6rem;
}
.portrait-frame img {
  width: 100%; height: auto; display: block;
  cursor: zoom-in;
}
.portrait-caption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-style: italic;
  margin: 0.55rem 0 0.25rem;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem 1.1rem;
}
.about-card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem; font-weight: 600;
  margin: 0 0 0.5rem; color: var(--ink);
}
.about-card p { margin: 0 0 0.8rem; }
.about-note { text-align: center; color: var(--ink-soft); font-style: italic; margin-top: 1.6rem; }

/* ---------- Share ---------- */
.share {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 2rem 1.6rem 1.6rem;
}
.share p { margin: 0 0 1rem; }
.share-steps { margin: 0 0 1rem; padding-left: 1.4rem; }
.share-steps li { margin-bottom: 0.55rem; }
.share a { color: var(--gold); }
.share-cta { text-align: center; margin-top: 1.4rem !important; }
.button {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem; font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff !important;
  background: var(--gold);
  padding: 0.65rem 1.7rem;
  border-radius: 999px;
  text-decoration: none;
}
.button:active { transform: translateY(1px); }

/* ---------- Story wall ---------- */
.wall-empty {
  text-align: center;
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  padding: 2.2rem 1rem;
  border: 1px dashed var(--gold-soft);
  border-radius: 4px;
}
.story {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 1.6rem 1.6rem 1.2rem;
  margin-bottom: 1.5rem;
}
.story h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem; font-weight: 600; margin: 0 0 0.3rem;
}
.story .byline { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 1rem; }
.story .byline a { color: var(--gold); }
.story p { margin: 0 0 0.9rem; }
.story figure { margin: 1rem 0; }
.story img {
  width: 100%; height: auto; display: block;
  border-radius: 3px; border: 1px solid var(--line);
  cursor: zoom-in;
}

/* ---------- Family links ---------- */
.family {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.6rem;
  text-align: center;
}
.family p { margin: 0 0 0.8rem; }
.family .family-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem; font-weight: 600;
}
.family a { color: var(--gold); }

/* ---------- Photo lightbox ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 13, 9, 0.95);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  min-width: 44px; min-height: 44px;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  border: none; border-radius: 999px;
  color: #f5eedd;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close {
  top: 0.75rem; right: 0.75rem;
  font-size: 1.15rem; line-height: 1;
}
.lightbox-nav {
  top: 50%; transform: translateY(-50%);
  font-size: 2rem; line-height: 1;
}
.lightbox-prev { left: 0.6rem; }
.lightbox-next { right: 0.6rem; }
.lightbox-count {
  position: absolute;
  bottom: 1rem; left: 50%; transform: translateX(-50%);
  margin: 0;
  color: #f5eedd;
  font-size: 0.95rem; letter-spacing: 0.08em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 2.2rem 1.25rem 2.6rem;
  color: var(--ink-soft);
}
.site-footer p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic; font-size: 1.15rem; margin: 0 0 0.5rem;
}
.site-footer .footer-small { font-family: inherit; font-style: normal; font-size: 0.88rem; }
