:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-deep: #ffffff;
  --ink: #182b3a;
  --muted: #5f625f;
  --gold: #ad8a47;
  --plum: #6a405f;
  --shadow: 0 20px 55px rgba(24, 43, 58, 0.16);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
}

button { font: inherit; }

.memorial {
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5.5rem) 0 3rem;
}

.memorial-heading {
  margin: 0 auto clamp(1.4rem, 4vw, 2.6rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--plum);
  font: 700 0.78rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(2rem, 5.4vw, 4.25rem);
  font-weight: 400;
  line-height: 1.06;
  text-wrap: balance;
}

.rule {
  display: block;
  width: 5.25rem;
  height: 1px;
  margin: 1.15rem auto 0;
  background: var(--gold);
}

.gallery {
  overflow: hidden;
  border: 1px solid rgba(173, 138, 71, 0.46);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stage {
  position: relative;
  display: grid;
  min-height: clamp(390px, 68vw, 650px);
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: #ffffff;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
  margin: 0;
  place-items: center;
}

.slide.is-active { display: grid; }

.slide img {
  display: block;
  max-width: 100%;
  max-height: clamp(365px, 64vw, 620px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 5px 20px rgba(24, 43, 58, 0.12);
}

.gallery-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 9.5rem;
  border-top: 1px solid rgba(173, 138, 71, 0.34);
}

.gallery-button {
  align-self: stretch;
  min-width: clamp(3.4rem, 8vw, 5.3rem);
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: 400 clamp(2rem, 5vw, 3rem)/1 Georgia, serif;
  transition: color 160ms ease, background 160ms ease;
}

.gallery-button:hover,
.gallery-button:focus-visible {
  color: #fff;
  background: var(--plum);
  outline: 0;
}

.gallery-copy {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 0.6rem;
  padding: 1rem clamp(0.65rem, 3vw, 2.4rem);
  text-align: center;
}

.gallery-caption {
  min-height: 3.2em;
  margin: 0;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.5;
  white-space: pre-line;
}

.gallery-caption:empty { min-height: 0; }

.counter {
  margin: 0;
  color: var(--muted);
  font: 700 0.72rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hint {
  margin: 1rem 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
  font-style: italic;
}

.noscript {
  width: min(100% - 2rem, 760px);
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid var(--gold);
  background: #fff;
  text-align: center;
}

@media (max-width: 560px) {
  .memorial { width: min(100% - 1rem, 980px); }
  .stage { min-height: 430px; padding: 0.5rem; }
  .gallery-panel { min-height: 11.5rem; }
  .gallery-button { min-width: 3.1rem; }
  .gallery-copy { padding: 0.8rem 0.35rem; }
}

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

