* {
  box-sizing: border-box;
}

:root {
  --cream: #f8f1e7;
  --soft: #efe3d2;
  --ink: #2c241f;
  --muted: #6f6259;
  --card: #ffffff;
  --gold: #b08a55;
  --navy: #172d45;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

img {
  display: block;
  width: 100%;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  color: white;
}

.hero-image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.74), rgba(0,0,0,0.24), rgba(0,0,0,0.05));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1000px, 92vw);
  padding: 0 0 80px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  font-family: Arial, sans-serif;
}

.eyebrow.dark {
  color: var(--gold);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  font-weight: 500;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  font-weight: 500;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.dates {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-bottom: 6px;
}

.hero-note {
  font-size: 1.1rem;
  opacity: 0.92;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.button-link {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: white;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.button-link:hover {
  transform: translateY(-2px);
}

.button-secondary {
  background: var(--gold);
  color: white;
}

.full {
  width: 100%;
}

.section {
  padding: 78px 22px;
}

.section.compact {
  padding-top: 28px;
  padding-bottom: 28px;
}

.section-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.narrow {
  width: min(840px, 100%);
  text-align: center;
}

.intro p,
.obituary p {
  font-size: 1.1rem;
}

.soft {
  background: var(--soft);
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.details-card,
.highlight-grid article,
.modal-card,
.success-card {
  background: var(--card);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.details-card p {
  margin-bottom: 12px;
}

.photo-strip,
.photo-pair,
.photo-collage,
.photo-end {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.photo-strip {
  grid-template-columns: repeat(3, 1fr);
}

.photo-pair {
  grid-template-columns: 1fr 1fr;
}

.photo-collage,
.photo-end {
  grid-template-columns: repeat(4, 1fr);
}

.photo-strip img,
.photo-pair img,
.photo-collage img,
.photo-end img {
  height: 360px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 12px 38px rgba(0,0,0,0.12);
}

.photo-pair img {
  height: 430px;
}

.photo-collage img,
.photo-end img {
  height: 310px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.slideshow-section {
  background: #fbf7f0;
  text-align: center;
}

.slideshow {
  position: relative;
  width: min(760px, 100%);
  margin: 24px auto 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd;
}

.slideshow img {
  height: min(72vh, 680px);
  object-fit: cover;
}

.slide-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
}

.prev {
  left: 14px;
}

.next {
  right: 14px;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.slide-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #c9b99f;
  cursor: pointer;
}

.slide-dots button.active {
  background: var(--gold);
}

footer {
  padding: 40px 22px;
  text-align: center;
  background: var(--navy);
  color: white;
}

footer p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 34px;
  cursor: pointer;
  color: var(--muted);
}

.modal-note {
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: var(--ink);
}

input,
textarea {
  width: 100%;
  border: 1px solid #d8cbb8;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  font-family: Arial, sans-serif;
  background: #fffaf3;
}

textarea {
  resize: vertical;
}

.hidden {
  display: none;
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.success-card {
  text-align: center;
  width: min(520px, 100%);
}

@media (max-width: 800px) {
  .hero {
    min-height: 86vh;
  }

  .hero-content {
    padding-bottom: 46px;
  }

  .split,
  .highlight-grid,
  .photo-strip,
  .photo-pair,
  .photo-collage,
  .photo-end {
    grid-template-columns: 1fr;
  }

  .photo-strip img,
  .photo-pair img,
  .photo-collage img,
  .photo-end img {
    height: auto;
    max-height: 560px;
  }

  .section {
    padding: 56px 18px;
  }

  .slideshow img {
    height: 520px;
  }
}


.event-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dfcfb9;
  color: var(--muted);
  font-style: italic;
}

.obituary .narrow {
  text-align: left;
}

.obituary h2,
.obituary .eyebrow {
  text-align: center;
}


.memory-section {
  background: var(--soft);
}

.memory-card form {
  margin: 0;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}
