
:root {
  --bg: #07110d;
  --bg-soft: #0e1a15;
  --panel: rgba(18,33,26,0.78);
  --panel-2: rgba(23,41,33,0.88);
  --line: rgba(176,211,192,0.11);
  --text: #ebf4ef;
  --muted: #adc2b5;
  --accent: #dcebdc;
  --glow: rgba(164, 209, 177, 0.22);
  --shadow: 0 16px 40px rgba(0,0,0,.4);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(93,129,107,.18), transparent 24%),
    linear-gradient(180deg, #0b1510 0%, #07110d 40%, #050b08 100%);
  font-family: Inter, system-ui, sans-serif; min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.stars { position: fixed; inset: 0; pointer-events: none; opacity: .18; background-image:
  radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1px 1px at 70% 16%, rgba(255,255,255,.28), transparent 60%),
  radial-gradient(1px 1px at 82% 79%, rgba(255,255,255,.25), transparent 60%);
}
.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.page-shell { padding: 120px 0 48px; }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: linear-gradient(180deg, rgba(10,18,14,.86), rgba(10,18,14,.72)); border-bottom: 1px solid rgba(176,211,192,.08); }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; min-height: 74px; }
.brand { font-family: 'Playfair Display', serif; font-size: 1.38rem; letter-spacing: .02em; }
.footer-brand { font-size: 1.7rem; }
.nav-links { display: flex; gap: 18px; color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.hero { padding: 48px 0 24px; text-align: center; }
.hero-garden { position: relative; }
.hero-garden::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -6px; width: min(860px, 100%); height: 70px; background: radial-gradient(circle at center, rgba(110,150,124,.12), transparent 68%); pointer-events: none; }
.eyebrow { color: #b9d9bf; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; margin: 0 0 6px; }
.hero h1, .page-intro h1, .section-head h2 { font-family: 'Playfair Display', serif; font-weight: 600; letter-spacing: -.02em; }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4.2rem); max-width: 900px; margin: 0 auto 10px; line-height: 1.04; }
.hero-copy, .page-intro p, .section-copy { color: var(--muted); line-height: 1.72; max-width: 760px; }
.hero-copy { margin: 0 auto; }
.hero-actions, .form-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; justify-content: center; }
.hero-note { margin-top: 16px; display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: .95rem; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); }
.hero-note-garden { background: rgba(120,166,136,.08); }
.glow-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbe7d0; box-shadow: 0 0 18px var(--glow); }
.button { border-radius: 999px; padding: 14px 20px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; transition: .2s ease; cursor: pointer; }
.button.primary { background: linear-gradient(180deg, #d8eadc, #b9d5bf); color: #0e1a14; border: none; font-weight: 700; }
.button.primary:hover { transform: translateY(-1px); }
.button.ghost { background: rgba(255,255,255,.03); color: var(--text); }
.button.ghost:hover { background: rgba(255,255,255,.06); }
.section { padding: 28px 0; }
.section-head { display: flex; gap: 18px; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.section-head h2, .page-intro h1 { margin: 0 0 6px; font-size: clamp(2rem, 4vw, 3rem); }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.grave-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 14px; }
.grave-grid.compact { margin-top: 22px; }
.cemetery-garden { position: relative; }
.cemetery-garden::before { content: ""; position: absolute; inset: 88px 0 auto; height: 100px; background: linear-gradient(180deg, rgba(102,143,111,.06), transparent); border-radius: 40px; pointer-events: none; }
.cemetery-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { color: var(--muted); font-size: .92rem; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 999px; padding: 8px 12px; }
.grave-card, .featured-card, .form-card {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19,34,27,.84), rgba(12,22,18,.94));
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.grave-card { min-height: 186px; padding: 18px 14px 16px; text-align: center; cursor: pointer; }
.grave-card::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 38%; background: radial-gradient(circle at center, rgba(101,144,114,.2), transparent 70%); opacity: .9; }
.grave-card:hover, .featured-card:hover { transform: translateY(-2px); border-color: rgba(203,231,208,.2); }
.grave-icon { font-size: 2.2rem; margin-bottom: 8px; filter: drop-shadow(0 0 18px rgba(177,215,188,.08)); }
.grave-name { font-family: 'Playfair Display', serif; font-size: 1rem; line-height: 1.25; margin: 0 0 5px; }
.grave-years { color: var(--muted); font-size: .87rem; margin-bottom: 10px; }
.grave-tribute { color: #d7e5db; font-size: .85rem; line-height: 1.45; margin: 0 auto; max-width: 18ch; }
.grave-placement { margin-top: 10px; display: inline-flex; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #cbe7d0; border: 1px solid rgba(203,231,208,.2); padding: 6px 8px; border-radius: 999px; }
.featured-card {
  min-height: 198px;
  padding: 16px 14px 16px;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(47,39,18,.96), rgba(26,21,10,.98));
  border: 1px solid rgba(201,167,71,.34);
  box-shadow: 0 18px 44px rgba(0,0,0,.45), 0 0 0 1px rgba(201,167,71,.08) inset;
}
.featured-card::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 42%;
  background: radial-gradient(circle at center, rgba(201,167,71,.26), transparent 70%);
  opacity: .95;
}
.featured-card:hover {
  border-color: rgba(224,196,116,.48);
  box-shadow: 0 20px 48px rgba(0,0,0,.5), 0 0 18px rgba(201,167,71,.12);
}
.featured-card .grave-icon {
  font-size: 2.35rem;
  filter: drop-shadow(0 0 14px rgba(224,196,116,.16));
}
.featured-card .grave-name { font-size: 1.02rem; }
.featured-card .grave-years { color: #e7d8a2; }
.featured-card .grave-tribute { max-width: 16ch; color: #f4ecd0; }
.featured-card .grave-placement {
  color: #f0e1a8;
  border-color: rgba(224,196,116,.3);
  background: rgba(224,196,116,.06);
}
.featured-rank { color: #f0d98f; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 10px; display: block; opacity: .98; }
.page-intro { padding-top: 8px; margin-bottom: 22px; }
.form-card { padding: 24px; }
.memorial-form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 8px; color: var(--muted); }
input, textarea, select { width: 100%; border-radius: 14px; border: 1px solid var(--line); padding: 14px 16px; background: rgba(255,255,255,.03); color: var(--text); outline: none; }
input:focus, textarea:focus, select:focus { border-color: rgba(185,213,191, .55); }
.checkbox-row { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
.checkbox-row input { width: auto; }
.form-status { min-height: 24px; color: var(--muted); }
.form-status.success { color: #cbe7d0; }
.form-status.error { color: #efb7b7; }
.search-bar input { font-size: 1rem; }
.empty-state { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 20px; }
.hidden { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: min(640px, 100%); border-radius: 24px; background: #0f1a14; border: 1px solid var(--line); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.modal-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; font-size: 1.4rem; }
.modal-media-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.modal-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
.modal-stone-fallback { width: 140px; height: 140px; border-radius: 18px; display: grid; place-items: center; font-size: 4rem; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.modal-placement { color: #cbe7d0; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; margin: 0 0 8px; }
.modal-card h3 { margin: 0 0 6px; font-family: 'Playfair Display', serif; font-size: 2rem; }
.modal-years, .modal-meta { color: var(--muted); }
.modal-tribute { font-size: 1.1rem; line-height: 1.7; margin-top: 16px; }
.modal-story { color: #dcebe0; line-height: 1.75; margin-top: 12px; white-space: pre-wrap; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: .95rem; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .9fr); gap: 28px; align-items: start; margin-top: 36px; padding: 28px 28px 34px; color: var(--muted); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, rgba(16,29,23,.94), rgba(10,18,14,.98)); box-shadow: var(--shadow); }
.footer-brand { color: var(--text); margin-bottom: 10px; }
.site-footer p { margin: 0; max-width: 560px; line-height: 1.7; }
.footer-links { display: grid; gap: 12px; justify-items: start; }
.footer-links a { color: var(--text); opacity: .92; }
.footer-links a:hover { opacity: 1; color: #d8eadc; }
@media (max-width: 760px) {
  .nav-wrap, .section-head, .site-footer { display: grid; gap: 14px; }
  .hero h1 { white-space: normal; }
  .form-grid.two-up { grid-template-columns: 1fr; }
  .grave-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .grave-card { min-height: 170px; }
  .site-footer { grid-template-columns: 1fr; padding: 22px 20px 28px; }
}


.page-shell-tight { padding-top: 88px; }
.page-intro-tight { padding-top: 0; margin-bottom: 18px; }
.page-intro-tight h1 { margin-top: 0; margin-bottom: 8px; }
.compact-footer { margin-bottom: 28px; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.info-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19,34,27,.84), rgba(12,22,18,.94));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.info-card h2 {
  margin: 0 0 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}
.info-card p { margin: 0; color: var(--muted); line-height: 1.75; }
body[data-page="submit"] .page-shell,
body[data-page="search"] .page-shell,
body[data-page="about"] .page-shell { padding-top: 88px; }
body[data-page="submit"] .page-intro,
body[data-page="search"] .page-intro,
body[data-page="about"] .page-intro { padding-top: 0; margin-bottom: 18px; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}
