/* ---------- Base ---------- */
:root {
  --bg:        #f7f4ee;   /* warm off-white */
  --panel:     #fffdf9;   /* card / panel */
  --ink:       #2c2a26;   /* near-black text */
  --muted:     #6f6a60;   /* soft gray-brown */
  --accent:    #7a6a52;   /* muted taupe/gold */
  --rule:      #ddd6c8;   /* hairline divider */
  --shadow:    0 14px 40px rgba(40, 35, 25, 0.12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle vignette so the page feels softer at the edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.5), transparent 60%);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.1rem, 4vw, 2rem) 3rem;
}

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.eyebrow {
  font-family: "EB Garamond", serif;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.masthead h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.dates {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: var(--muted);
  margin: 0.7rem 0 0;
}

/* decorative rule under the masthead */
.masthead::after {
  content: "";
  display: block;
  width: 70px;
  height: 1px;
  margin: 1.6rem auto 0;
  background: var(--accent);
  opacity: 0.6;
}

/* ---------- Video ---------- */
.video { margin: 0 auto clamp(1.4rem, 4vw, 2rem); }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 16 / 9) {
  .video-frame { height: 0; padding-bottom: 56.25%; }
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Buttons ---------- */
.actions {
  text-align: center;
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

.button {
  display: inline-block;
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--panel);
  background: var(--accent);
  text-decoration: none;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(122, 106, 82, 0.28);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.button:hover,
.button:focus-visible {
  background: #6a5b45;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(122, 106, 82, 0.34);
  outline: none;
}

/* ---------- Obituary ---------- */
.obituary {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: clamp(1.4rem, 5vw, 3rem);
  box-shadow: 0 8px 28px rgba(40, 35, 25, 0.06);
}

.obituary p { margin: 0 0 1.2rem; }
.obituary p:last-child { margin-bottom: 0; }

/* graceful first line */
.obituary p:first-child::first-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.4em;
  font-weight: 600;
  float: left;
  line-height: 0.8;
  padding: 0.05em 0.1em 0 0;
  color: var(--accent);
}

/* ---------- Service ---------- */
.service {
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
}

.service h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 0.6rem;
}

.service p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  margin-top: clamp(2.4rem, 6vw, 3.6rem);
  color: var(--muted);
}

.footer .ornament {
  color: var(--accent);
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.footer p:last-child {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  margin: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  body { font-size: 18px; }
  .obituary p:first-child::first-letter { font-size: 3em; }
}
