:root {
  --bg-cream: #f5efe3;
  --bg-clay: #d8c0a3;
  --paper: #fcf8f2;
  --panel: #f6eee3;
  --ink: #2d2017;
  --ink-soft: #5c4634;
  --line: #ccb59c;
  --line-strong: #a7805c;
  --shadow: 0 26px 46px rgba(44, 30, 19, 0.18);
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Charter", "Baskerville", "Garamond", serif;
  background-color: var(--bg-cream);
  background-image: radial-gradient(circle at 6% -8%, #fffaf0 0%, transparent 36%),
    radial-gradient(circle at 95% 0%, #d7b899 0%, transparent 42%),
    linear-gradient(165deg, var(--bg-cream), var(--bg-clay));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 22px,
    rgba(128, 90, 55, 0.12) 22px,
    rgba(128, 90, 55, 0.12) 24px
  );
}

.page {
  position: relative;
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 3.7rem 0 4.2rem;
}

.hero {
  position: relative;
  text-align: center;
  margin-bottom: 2.4rem;
  animation: lift-in 0.85s ease both;
}

.hero::after {
  content: "";
  display: block;
  width: min(230px, 40vw);
  height: 1px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.kicker {
  margin: 0;
  letter-spacing: 0.21em;
  text-transform: uppercase;
  font-family: "Optima", "Candara", sans-serif;
  font-size: 0.74rem;
  color: #70482a;
}

h1 {
  margin: 0.45rem 0 0.3rem;
  font-family: "Didot", "Bodoni MT", "Times New Roman", serif;
  font-size: clamp(2.2rem, 5.4vw, 3.9rem);
  letter-spacing: 0.02em;
  line-height: 1.06;
  font-weight: 500;
}

.dates {
  margin: 0;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-cta {
  margin: 1rem 0 0;
}

.condolence-button {
  display: inline-block;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  border: 1px solid #7b5232;
  background: linear-gradient(180deg, #8b603e, #6f472d);
  color: #fff7ef;
  font-family: "Optima", "Candara", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(61, 38, 23, 0.24);
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.condolence-button:hover,
.condolence-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(61, 38, 23, 0.28);
  background: linear-gradient(180deg, #9a6b45, #73492f);
}

.tribute-grid {
  display: grid;
  grid-template-columns: minmax(280px, 350px) 1fr;
  gap: 1.4rem;
  align-items: start;
}

.memory-panel {
  position: sticky;
  top: 1rem;
  background: linear-gradient(165deg, var(--panel), #f3e8da);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
  animation: lift-in 0.95s ease 0.12s both;
}

.portrait-wrap {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 26px rgba(47, 31, 17, 0.2);
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
}

.details {
  margin: 0.9rem 0;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(167, 128, 92, 0.34);
  border-bottom: 1px solid rgba(167, 128, 92, 0.34);
}

.details div + div {
  margin-top: 0.55rem;
}

.details dt {
  font-family: "Optima", "Candara", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #714d30;
}

.details dd {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  color: var(--ink);
}

.verse {
  margin: 0;
  padding: 0.8rem 0.85rem;
  border-left: 3px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.44);
}

.verse p {
  margin: 0;
  font-style: italic;
  line-height: 1.55;
  color: #4a3526;
}

.obituary-card {
  background: var(--paper);
  border: 1px solid rgba(204, 181, 156, 0.78);
  border-radius: 18px;
  padding: clamp(1.2rem, 2.4vw, 2.3rem);
  box-shadow: var(--shadow);
  animation: lift-in 1.05s ease 0.2s both;
}

.obituary-card h2 {
  margin: 0 0 0.9rem;
  font-family: "Didot", "Bodoni MT", "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
}

.obituary-card p {
  margin: 0 0 1rem;
  font-size: clamp(1.04rem, 1.3vw, 1.15rem);
  line-height: 1.76;
}

.motto {
  font-style: italic;
  color: #563a26;
}

.obituary-card a {
  color: #7a3f16;
  text-underline-offset: 0.2em;
  font-weight: 600;
}

.obituary-card a:hover,
.obituary-card a:focus-visible {
  color: #562a10;
}

@media (max-width: 920px) {
  .page {
    width: min(960px, 94vw);
    padding: 2.4rem 0 3rem;
  }

  .tribute-grid {
    grid-template-columns: 1fr;
  }

  .memory-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .kicker {
    letter-spacing: 0.16em;
  }

  .hero-cta {
    margin-top: 0.8rem;
  }

  .obituary-card p {
    line-height: 1.67;
  }
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
