:root {
  --paper: #f6f1e8;
  --paper-deep: #efe7db;
  --ink: #2a241e;
  --ink-soft: #4a4036;
  --muted: #74685b;
  --line: #e0d6c8;
  --bronze: #8a6e4f;
  --ember: #c06a30;
  --mat: #fbf8f3;
  --photo: #f3efe9;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  border-inline: 1px solid rgb(138 110 79 / 0.38);
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgb(255 252 247 / 0.9), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; }

a { color: inherit; }

a:hover,
a:focus-visible {
  text-decoration-color: var(--ember);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

::selection { background: rgb(192 106 48 / 0.2); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  z-index: 5;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(68rem, calc(100% - 2.2rem));
  margin-inline: auto;
}

.cover {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.4rem 1.1rem 2.8rem;
}

.eyebrow,
.by,
.colophon {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}

.cover h1 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 11vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.aka {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--ink-soft);
}

.cover-frame {
  margin: 1.35rem 0 0;
  width: fit-content;
  max-width: min(100%, 34rem);
  background: var(--mat);
  padding: 0.65rem 0.65rem 0.85rem;
  box-shadow: 0 22px 50px rgb(58 42 22 / 0.12);
}

.cover-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(32dvh, 19rem);
  margin-inline: auto;
  object-fit: contain;
}

.cover-frame figcaption {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

blockquote {
  margin: 0;
  border-left: 3px solid var(--ember);
  padding-left: 1rem;
  text-align: left;
}

.epigraph {
  width: min(100%, 28rem);
  margin: 1.5rem 0 0;
}

.epigraph p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  line-height: 1.25;
}

.epigraph cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}

.enter {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--bronze);
  text-decoration: none;
  text-underline-offset: 0.22em;
}

.enter:hover,
.enter:focus-visible {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.dedication {
  padding: 1rem 0 3.5rem;
}

.dedication h2 {
  margin: 0 0 1.2rem;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.prose {
  width: min(100%, 38rem);
  margin-inline: auto;
  font-family: var(--serif);
  font-size: clamp(1.28rem, 2.4vw, 1.48rem);
  line-height: 1.65;
  color: var(--ink-soft);
}

.prose p { margin: 0 0 1.15rem; }

.kept { padding: 1rem 0 3rem; }

.kept h2,
.who h2,
.close h2 {
  margin: 0 0 0.4rem;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3rem);
}

.lede {
  margin: 0 auto 1.6rem;
  max-width: 28rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
}

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 0.75rem;
}

.mosaic figure { margin: 0; }

.mosaic a {
  display: block;
  background-color: var(--photo);
  border-radius: 7px;
  overflow: hidden;
}

.mosaic img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mosaic a:hover img { transform: scale(1.03); }

.mosaic figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.45rem;
}

.mosaic .cap {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.25;
}

.who { padding: 1.5rem 0 2rem; }

.who ol {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0 2.5rem;
}

.who a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  text-decoration: none;
}

.who a:hover .person,
.who a:focus-visible .person {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.who .person {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
}

.tribute {
  padding: 2.8rem 0 2.4rem;
}

.tribute + .tribute::before {
  content: "";
  display: block;
  width: min(18.75rem, 68%);
  height: 1px;
  margin: 0.2rem auto 2.6rem;
  background: linear-gradient(to right, transparent, rgb(0 0 0 / 0.12), transparent);
}

.tribute-head { text-align: center; margin-bottom: 1.4rem; }

.tribute .rel,
.who .rel {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ember);
}

.tribute .rel { font-size: 1.08rem; }

.who .person { flex: 1 1 auto; }

.who .rel {
  flex: 0 1 11.5rem;
  max-width: 11.5rem;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: right;
}

.tribute h2 {
  margin: 0.25rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 6vw, 3.5rem);
  line-height: 1;
}

.letter {
  width: min(100%, 40rem);
  margin: 0 auto 1.6rem;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.3vw, 1.42rem);
  line-height: 1.68;
  color: var(--ink-soft);
}

.letter p { margin: 0 0 1rem; }

.note {
  width: min(100%, 34rem);
  margin: 0.4rem auto 1.6rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.3;
}

.quiet {
  width: min(100%, 34rem);
  margin: 0.2rem auto 1.4rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.gallery button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background-color: var(--photo);
  cursor: zoom-in;
  overflow: hidden;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery.count-1 {
  grid-template-columns: 1fr;
  max-width: 40rem;
  margin-inline: auto;
}

.shared {
  text-align: center;
  margin: 1.35rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

.return {
  margin: 0.85rem 0 0;
  text-align: center;
}

.return a {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 0.22em;
}

.return a:hover,
.return a:focus-visible {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.close {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.close h2 {
  font-style: italic;
  font-weight: 500;
}

.benediction {
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.3;
}

.colophon {
  margin: 2rem auto 0;
  max-width: 28rem;
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-transform: none;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--muted);
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 3.2rem 0.4rem 1rem;
}

.lightbox::backdrop { background: rgb(22 18 14 / 0.94); }

.lightbox figure {
  margin: 0;
  min-width: 0;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 7.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox figcaption {
  margin-top: 0.7rem;
  color: #f3eadf;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}

.lightbox button {
  font-family: var(--sans);
  font-size: 1rem;
  color: #f3eadf;
  background: transparent;
  border: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
}

@media (min-width: 800px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1rem; }
  .who ol { grid-template-columns: 1fr 1fr; }
  .gallery.count-many { grid-template-columns: repeat(3, 1fr); }
  .lightbox[open] { padding-inline: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mosaic img { transition: none; }
}

@media print {
  body { background: white; }
  .cover { min-height: auto; page-break-after: always; }
  .enter, .lightbox, .return { display: none; }
  .tribute { page-break-before: always; }
  .mosaic img, .gallery img { break-inside: avoid; }
  a { text-decoration: none; }
}
