@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3.woff2") format("woff2");
}

:root {
  --bg: #f7f3ee;
  --bg-deep: #f3ebe4;
  --bg-band: #f0e6dc;
  --bg-raised: #fffdfb;
  --ink: #2a211c;
  --ink-soft: #5c4e46;
  --accent: #7a4f48;
  --accent-deep: #5c3a35;
  --gold: #9a7b4f;
  --gold-line: rgba(154, 123, 79, 0.7);
  --line: rgba(42, 33, 28, 0.12);
  --footer: #2c241f;
  --footer-text: #f6f0ea;
  --heart: #f0c9c0;
  --shadow: 0 18px 40px rgba(42, 33, 28, 0.1);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --header-offset: 7.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: #e6d3c6;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  z-index: 100;
  background: var(--footer);
  color: var(--footer-text);
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 243, 238, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 28px rgba(42, 33, 28, 0.05);
}

.header-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 0.35rem 0;
}

.brand {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 0.45rem 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="true"] {
  color: var(--accent-deep);
}

.hero {
  position: relative;
  min-height: calc(100svh - 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2.75rem, 7vw, 5rem) 1.25rem clamp(4.5rem, 9vw, 6rem);
  background:
    radial-gradient(ellipse 80% 55% at 50% 12%, rgba(214, 186, 170, 0.55), transparent 68%),
    radial-gradient(ellipse 45% 35% at 85% 100%, rgba(166, 132, 86, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 62%);
}

.hero-content {
  width: min(40rem, 100%);
}

.hero-content > * {
  animation: fade-up 0.9s var(--ease) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.16s; }
.hero-content > *:nth-child(3) { animation-delay: 0.28s; }
.hero-content > *:nth-child(4) { animation-delay: 0.38s; }
.hero-content > *:nth-child(5) { animation-delay: 0.48s; }

.portrait {
  width: fit-content;
  margin: 0 auto 1.75rem;
  padding: 0.7rem;
  background: var(--bg-raised);
  box-shadow:
    0 0 0 1px var(--gold-line),
    var(--shadow);
}

.portrait img {
  display: block;
  width: min(24rem, 78vw);
  height: auto;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.95;
  color: var(--ink);
}

.eyebrow {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--accent);
}

.name {
  display: block;
  font-size: clamp(3.3rem, 10vw, 6.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.dates {
  margin: 1.15rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  color: var(--ink-soft);
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.15rem auto 0.9rem;
  color: var(--gold);
}

.flourish span {
  width: 3.25rem;
  height: 1px;
  background: var(--gold-line);
}

.tagline {
  max-width: 28rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent);
  text-decoration: none;
  animation: cue 2.4s ease-in-out infinite;
}

.section {
  padding: clamp(4.25rem, 9vw, 6.75rem) 0;
}

.section-band {
  background: var(--bg-band);
}

.wrap {
  width: min(1120px, calc(100% - 2.25rem));
  margin: 0 auto;
}

.wrap.narrow {
  width: min(44rem, calc(100% - 2.25rem));
}

.section-heading {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.section-heading::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 1rem auto 0;
  background: var(--gold);
}

.prose p,
.lede,
.services p {
  margin: 0 0 1.15rem;
  color: var(--ink);
}

.prose p:first-of-type::first-letter {
  float: left;
  margin: 0.15rem 0.45rem 0 0;
  font-family: var(--serif);
  font-size: 3.35rem;
  font-weight: 500;
  line-height: 0.8;
  color: var(--accent-deep);
}

.signoff {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--accent-deep);
}

.signoff strong {
  font-weight: 500;
}

.lede {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  align-items: start;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-raised);
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(42, 33, 28, 0.06);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(42, 33, 28, 0.12);
}

.gallery-more {
  margin: 2rem 0 0;
  text-align: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.3s ease, color 0.3s ease;
}

.text-link:hover {
  background: var(--accent-deep);
  color: #fffaf7;
}

.memory-list {
  display: grid;
  gap: 1.15rem;
}

.memory {
  margin: 0;
  padding: 1.35rem 1.25rem 1.25rem 1.35rem;
  background: var(--bg-raised);
  border-left: 2px solid var(--gold);
  box-shadow: 0 10px 28px rgba(42, 33, 28, 0.04);
}

.memory h3 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.memory blockquote {
  margin: 0;
}

.memory p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
}

.services {
  text-align: center;
}

.services-logo {
  display: block;
  width: min(240px, 70%);
  height: auto;
  margin: 0 auto 1.5rem;
}

.services p {
  text-align: left;
}

.map-frame {
  margin-top: 1.5rem;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  background: var(--footer);
  color: var(--footer-text);
  text-align: center;
  padding: 2.75rem 1.25rem 3rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 0.85rem;
}

.site-footer strong {
  font-weight: 600;
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--footer-text);
}

.lightbox::backdrop {
  background: rgba(22, 16, 14, 0.94);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(246, 240, 234, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--footer-text);
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(246, 240, 234, 0.1);
}

.lightbox-frame {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transition: opacity 0.25s ease;
}

.lightbox img.is-loading {
  opacity: 0.4;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.lightbox-nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 240, 234, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--footer-text);
  cursor: pointer;
}

.lightbox-count {
  margin: 0;
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.memory-list .memory:nth-child(2) { transition-delay: 0.06s; }
.memory-list .memory:nth-child(3) { transition-delay: 0.12s; }
.memory-list .memory:nth-child(4) { transition-delay: 0.18s; }
.memory-list .memory:nth-child(5) { transition-delay: 0.24s; }

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cue {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

#biography,
#photos,
#memories,
#services {
  scroll-margin-top: var(--header-offset);
}

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

  .memory {
    padding: 1.6rem 1.7rem 1.45rem 1.7rem;
  }
}

@media (min-width: 1040px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .header-inner {
    justify-content: center;
    text-align: center;
    padding-top: 0.55rem;
    padding-bottom: 0.2rem;
  }

  .brand {
    width: 100%;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    width: 100%;
  }

  .site-nav a {
    padding: 0 0.4rem;
    font-size: 0.92rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-cue {
    transform: translateX(-50%);
  }
}

@media print {
  .site-header,
  .scroll-cue,
  .lightbox,
  .text-link,
  .gallery-item {
    box-shadow: none;
  }

  .site-header,
  .scroll-cue,
  .lightbox {
    display: none !important;
  }

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

  .gallery-item {
    cursor: default;
  }

  .section-band,
  .memory,
  .site-footer {
    background: #fff;
    color: #000;
  }
}
