:root {
  --ink: #273027;
  --muted: #697066;
  --paper: #f3efe6;
  --paper-deep: #e8e1d3;
  --forest: #334b3a;
  --white: #fffdf8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.75; }
img { display: block; max-width: 100%; }
.hero { min-height: 92vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--forest); color: var(--white); }
.hero-photo { min-height: 700px; background: linear-gradient(90deg, transparent 72%, rgba(51,75,58,.18)), url('assets/images/portrait.jpg') center 32%/cover no-repeat; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 7vw, 8rem); }
.eyebrow { margin: 0 0 1rem; font-size: .72rem; line-height: 1.2; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: .95; margin: 0; }
h1 { font-size: clamp(4.2rem, 7vw, 8rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2.8rem, 5vw, 5.4rem); letter-spacing: -.025em; }
.lede { max-width: 27rem; margin: 2.2rem 0 3rem; font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.8rem); font-style: italic; line-height: 1.35; color: #e4e8df; }
.down { color: inherit; text-decoration: none; width: fit-content; padding-bottom: .2rem; border-bottom: 1px solid rgba(255,255,255,.5); font-size: .82rem; letter-spacing: .06em; }
.section { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: clamp(5rem, 10vw, 10rem) 0; }
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 9rem); align-items: start; }
.section-heading { position: sticky; top: 4rem; }
.section-heading h2 { max-width: 9ch; }
.prose { max-width: 43rem; font-size: 1.05rem; }
.prose p { margin: 0 0 2rem; }
.prose .opening { font-family: var(--serif); font-size: clamp(1.65rem, 2.4vw, 2.2rem); line-height: 1.35; }
.feature-photo { margin: 0; }
.feature-photo img { width: 100%; max-height: 80vh; object-fit: cover; object-position: center 42%; }
.continuation { padding-top: clamp(5rem, 8vw, 8rem); }
.continuation .prose { grid-column: 2; }
.gallery-section { width: min(1380px, calc(100% - 2rem)); }
.section-heading.compact { position: static; margin: 0 auto 4rem; width: min(1180px, calc(100% - 1rem)); }
.section-heading.compact h2 { max-width: none; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: .8rem; grid-auto-flow: dense; }
.photo { grid-column: span 4; height: 440px; border: 0; padding: 0; background: #ddd5c6; cursor: zoom-in; overflow: hidden; }
.photo.tall { grid-row: span 2; height: 895px; }
.photo.wide-photo { grid-column: span 8; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.photo:hover img { transform: scale(1.018); }
.family { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 9rem); }
.tribute { background: var(--forest); color: var(--white); text-align: center; padding: clamp(6rem, 12vw, 11rem) 1.5rem; }
.tribute-inner { max-width: 650px; margin: auto; }
.tribute h2 { margin-bottom: 2rem; }
.tribute p:last-child { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.45; color: #e4e8df; }
.tree { width: 70px; margin: 0 auto 2.5rem; fill: none; stroke: #d8d2be; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.5rem, 5vw, 5rem); background: #253329; color: #cbd1c9; font-size: .78rem; letter-spacing: .04em; }
footer p { margin: 0; }
footer .small { opacity: .65; }
dialog { width: min(92vw, 1100px); height: min(90vh, 900px); border: 0; padding: 0; background: transparent; overflow: visible; }
dialog::backdrop { background: rgba(18,22,18,.92); }
dialog img { width: 100%; height: 100%; object-fit: contain; }
.close { position: absolute; right: 0; top: -2.8rem; border: 0; background: none; color: white; font-size: 2.2rem; cursor: pointer; }
@media (max-width: 820px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-photo { min-height: 62vh; background-position: center 28%; }
  .hero-copy { padding: 4rem 1.5rem 5rem; }
  h1 { font-size: clamp(3.7rem, 18vw, 6rem); }
  .story, .family { grid-template-columns: 1fr; gap: 3rem; }
  .section-heading { position: static; }
  .continuation .prose { grid-column: 1; }
  .photo, .photo.wide-photo { grid-column: span 6; height: 330px; }
  .photo.tall { grid-row: span 1; height: 330px; }
  footer { flex-direction: column; gap: .3rem; }
}
@media (max-width: 520px) {
  .section { width: min(100% - 2rem, 1180px); }
  .gallery-section { width: calc(100% - 1rem); }
  .gallery { gap: .5rem; }
  .photo, .photo.wide-photo, .photo.tall { grid-column: span 12; height: 72vh; max-height: 560px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .photo img { transition: none; } }
