:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --soft: #f4efe7;
  --text: #2c2b29;
  --muted: #706a63;
  --gold: #b99a5b;
  --line: #e8dfd2;
  --shadow: 0 22px 60px rgba(42, 36, 28, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: inherit; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(18px, 4vw, 60px);
  background: rgba(251,250,247,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; font-size: 22px; letter-spacing: .04em; }
.nav { display: flex; gap: 24px; font-family: Arial, sans-serif; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; }
.hero {
  min-height: 78vh;
  display: grid; place-items: center;
  position: relative;
  padding: 80px 20px;
  background: radial-gradient(circle at top, #fff 0%, #f0e8dc 48%, #e6dccd 100%);
  overflow: hidden;
}
.hero:before {
  content: '';
  position: absolute; inset: 9%;
  border: 1px solid rgba(185,154,91,.35);
  border-radius: 28px;
}
.hero__content { position: relative; max-width: 920px; text-align: center; }
.eyebrow { font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .22em; color: var(--gold); font-size: 12px; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 18px; }
h1 { font-size: clamp(38px, 6vw, 78px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 24px; }
.hero__text { max-width: 680px; margin: 0 auto 30px; color: var(--muted); font-size: 20px; }
.hero__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn { border: 1px solid var(--gold); border-radius: 999px; padding: 13px 22px; cursor: pointer; text-decoration: none; font-family: Arial, sans-serif; font-size: 14px; transition: .25s ease; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.section { padding: 86px clamp(18px, 6vw, 86px); }
.section-soft { background: var(--soft); }
.section-heading { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.person-grid, .feature-grid, .gallery-grid, .memory-grid, .document-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px; max-width: 1100px; margin: 0 auto; }
.feature-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.person-card, .feature, .story-card, .memory, .document-card, .timeline-item, .media-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden;
}
.person-card img { width: 100%; height: 380px; object-fit: cover; display: block; background: #eee; }
.person-card__body, .feature, .memory, .document-card, .timeline-item, .media-card { padding: 28px; }
.person-card span, .muted { color: var(--muted); }
.text-link { font-family: Arial, sans-serif; color: var(--gold); text-decoration: none; border-bottom: 1px solid currentColor; }
.story-card { max-width: 900px; margin: 0 auto; padding: 34px; font-size: 20px; color: var(--muted); }
.person-hero { padding: 70px clamp(18px,6vw,86px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.person-portrait { width: 100%; border-radius: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); background: #eee; }
.dates { color: var(--gold); font-family: Arial, sans-serif; letter-spacing: .08em; }
.quote { font-size: 26px; color: var(--muted); border-left: 2px solid var(--gold); padding-left: 22px; }
.timeline { max-width: 900px; margin: 0 auto; display: grid; gap: 18px; }
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 18px; }
.timeline-year { color: var(--gold); font-family: Arial, sans-serif; }
.gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.gallery-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 22px; cursor: zoom-in; border: 1px solid var(--line); background: #eee; }
.memory-grid, .document-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
a.document-card { text-decoration: none; }
.audio-player, video { width: 100%; }
.share { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.footer { padding: 32px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.candle { position: fixed; right: 28px; bottom: 28px; width: 54px; height: 90px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.candle.active { opacity: 1; }
.flame { width: 22px; height: 34px; background: #f4b84f; border-radius: 60% 60% 45% 45%; margin: 0 auto; animation: flicker 1.4s infinite alternate; box-shadow: 0 0 32px #f4b84f; }
.wick { width: 4px; height: 12px; background: #3a2a1c; margin: -2px auto 0; }
.wax { width: 40px; height: 48px; background: #fff7e9; border-radius: 10px 10px 6px 6px; margin: 0 auto; box-shadow: var(--shadow); }
body.candle-mode { background: #fbf4e8; }
@keyframes flicker { from { transform: scale(.94) rotate(-2deg); opacity: .85; } to { transform: scale(1.08) rotate(2deg); opacity: 1; } }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display:none; place-items:center; z-index:100; padding:20px; }
.lightbox.active { display:grid; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 18px; }
@media (max-width: 860px) {
  .nav { display:none; }
  .person-grid, .feature-grid, .gallery-grid, .memory-grid, .document-grid, .person-hero { grid-template-columns: 1fr; }
  .feature-grid { max-width: 640px; }
  .timeline-item { grid-template-columns: 1fr; }
  .person-card img { height: 300px; }
}
