@import "tailwindcss";

:root {
  --ink: #203028;
  --forest: #173f32;
  --forest-2: #245947;
  --sage: #859d8b;
  --moss: #6b765c;
  --gold: #b98a4b;
  --cream: #f7f3e9;
  --paper: #fffdf8;
  --line: #dcd7c8;
  --muted: #657069;
  --shadow: 0 18px 50px rgba(24, 48, 38, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, textarea { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.eyebrow {
  margin: 0 0 14px; color: var(--gold); font-size: .73rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }

.site-header {
  position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; padding: 12px clamp(24px, 6vw, 96px); background: var(--forest);
  border-bottom: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--gold);
  border-radius: 50%; background: var(--paper); color: var(--forest); font-family: Georgia, serif; font-size: 1.45rem;
}
.brand strong { display: block; color: #fff; font-family: Georgia, serif; font-size: 1.08rem; }
.brand small { display: block; margin-top: 3px; color: #d9c39e; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 42px); }
.site-header nav a { color: #f5f1e7; font-size: .86rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: #e0bd82; }

.hero {
  position: relative; padding: 48px 24px 52px; overflow: hidden;
  background: linear-gradient(180deg, #fffdf8 0%, #f3efe4 100%); color: var(--ink);
}
.hero-inner { width: min(920px, 100%); margin: 0 auto; text-align: center; }
.hero-copy { margin: 0 auto; }
.hero-kicker { margin: 0 0 11px; color: var(--gold); font-size: .7rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; color: var(--forest); font-size: clamp(3rem, 7vw, 5.5rem); line-height: .98; letter-spacing: -.045em; }
.hero-tagline { margin: 14px 0 0; color: #435a4d; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.hero-lead { max-width: 690px; margin: 15px auto 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 25px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 0 20px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px;
  font-size: .84rem; font-weight: 800; text-decoration: none; transition: .2s ease;
}
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.button.primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.button.secondary { background: var(--paper); color: var(--forest); border-color: #9ca99f; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.hero-stats { display: flex; justify-content: center; gap: 42px; margin: 30px 0 0; }
.hero-stats div { min-width: 125px; padding: 0 20px; border-left: 1px solid var(--line); }
.hero-stats div:last-child { border-right: 1px solid var(--line); }
.hero-stats dt { color: var(--forest); font-family: Georgia, serif; font-size: 1.45rem; }
.hero-stats dd { margin: 3px 0 0; color: var(--muted); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-image { position: relative; width: min(440px, 90%); margin: 25px auto 0; overflow: hidden; background: #e6e2d7; border: 7px solid #fff; box-shadow: 0 12px 30px rgba(24,48,38,.14); }
.hero-image img { width: 100%; height: auto; max-height: 270px; object-fit: contain; image-rendering: auto; }
.hero-image figcaption {
  padding: 9px 12px; background: var(--paper); color: var(--muted); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
}

.notice {
  position: relative; z-index: 3; display: grid; grid-template-columns: 38px 1fr; gap: 20px;
  max-width: 1120px; margin: 0 auto; padding: 26px 32px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.notice-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e7eee8; color: var(--forest); font-family: Georgia, serif; font-size: 1.1rem; }
.notice h2 { margin: 0 0 7px; font-size: 1.15rem; }
.notice p { margin: 0; color: #5d675f; font-size: .88rem; line-height: 1.7; }

.quick-documents { max-width: 1120px; margin: 12px auto 0; padding: 13px 16px 16px; background: rgba(255,253,248,.68); border: 1px solid var(--line); }
.quick-documents-label { margin: 0 0 9px; color: var(--gold); font-size: .63rem; font-weight: 900; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.quick-document-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quick-document-grid a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 64px; padding: 9px 11px; background: var(--paper); border: 1px solid #ded9cc; color: inherit; text-decoration: none; transition: .2s ease; }
.quick-document-grid a:hover { border-color: var(--forest-2); box-shadow: 0 6px 15px rgba(26,52,40,.08); }
.quick-document-type { display: grid; place-items: center; width: 34px; height: 38px; background: #e5ebe4; color: var(--forest); font-size: .56rem; font-weight: 900; }
.quick-document-grid strong, .quick-document-grid small { display: block; }
.quick-document-grid strong { color: var(--forest); font-family: Georgia, serif; font-size: .78rem; line-height: 1.2; }
.quick-document-grid small { margin-top: 3px; color: var(--muted); font-size: .65rem; line-height: 1.25; }
.quick-document-grid b { color: var(--gold); font-size: 1rem; }

.records-section { max-width: 1460px; margin: 0 auto; padding: 118px clamp(20px, 5vw, 72px) 110px; }
.section-heading { max-width: 760px; margin: 0 auto; text-align: center; }
.section-heading h2, .about-section h2 { margin: 0; color: var(--forest); font-size: clamp(2.3rem, 4vw, 3.7rem); letter-spacing: -.03em; }
.section-heading > p:last-child { margin: 18px auto 0; color: var(--muted); line-height: 1.7; }
.search-panel {
  display: flex; align-items: center; max-width: 820px; height: 66px; margin: 42px auto 0; padding: 0 18px;
  background: var(--paper); border: 1px solid #cfcbbb; border-radius: 4px; box-shadow: 0 8px 24px rgba(38,57,47,.07);
}
.search-panel:focus-within { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36,89,71,.12); }
.search-panel svg { flex: 0 0 auto; width: 23px; fill: none; stroke: var(--forest-2); stroke-width: 1.7; }
.search-panel input { flex: 1; min-width: 0; height: 100%; padding: 0 15px; background: transparent; border: 0; color: var(--ink); outline: 0; font-size: 1rem; }
.search-panel input::placeholder { color: #929991; }
.search-panel button { padding: 7px 10px; background: transparent; border: 0; color: var(--forest-2); cursor: pointer; font-weight: 700; }
.result-summary { display: flex; justify-content: space-between; max-width: 1280px; margin: 50px auto 16px; color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.record-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1280px; margin: 0 auto; }
.record-card {
  overflow: hidden; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 3px;
  color: inherit; cursor: pointer; text-align: left; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.record-card:hover, .record-card:focus-visible { transform: translateY(-4px); border-color: #abb7ac; box-shadow: 0 14px 30px rgba(28,49,38,.12); outline: none; }
.record-image-wrap { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8e5db; }
.record-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.record-card:hover img { transform: scale(1.025); }
.image-missing { display: grid; place-items: center; width: 100%; height: 100%; padding: 20px; color: #7a817b; text-align: center; }
.story-badge { position: absolute; right: 9px; bottom: 9px; padding: 6px 9px; background: rgba(23,63,50,.92); color: #fff; border-radius: 2px; font-size: .62rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.record-copy { display: flex; flex-direction: column; min-height: 172px; padding: 20px; }
.record-copy strong { margin-bottom: 10px; color: var(--forest); font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.25; }
.record-copy > span { color: var(--muted); font-size: .8rem; line-height: 1.55; }
.record-copy > .age-line { margin-top: 5px; color: var(--forest); font-weight: 800; }
.record-copy em { display: flex; justify-content: space-between; margin-top: auto; padding-top: 18px; color: var(--forest-2); border-top: 1px solid #e8e3d8; font-size: .74rem; font-style: normal; font-weight: 800; }
.empty-state { max-width: 700px; margin: 20px auto; padding: 70px 30px; background: var(--paper); border: 1px solid var(--line); text-align: center; }
.empty-state h3 { margin: 0; color: var(--forest); font-size: 1.8rem; }
.empty-state p { color: var(--muted); }
.empty-state button { padding: 10px 15px; background: var(--forest); border: 0; color: #fff; cursor: pointer; }

.about-section {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(50px, 9vw, 130px);
  padding: 100px clamp(30px, 9vw, 150px); background: #e7e6da;
}
.about-copy { max-width: 760px; }
.about-copy p { margin: 0 0 22px; color: #56625a; font-family: Georgia, serif; font-size: 1.1rem; line-height: 1.85; }
.about-copy a { display: inline-flex; gap: 25px; margin-top: 12px; padding-bottom: 7px; color: var(--forest); border-bottom: 1px solid var(--gold); font-size: .83rem; font-weight: 800; text-decoration: none; }
.contact-section { display:grid;grid-template-columns:.9fr 1.1fr;gap:clamp(44px,8vw,110px);padding:100px clamp(30px,9vw,150px);background:var(--forest);color:#fff; }
.contact-intro{max-width:560px}.contact-intro h2{margin:0;color:#fff;font-size:clamp(2.2rem,4vw,3.5rem);line-height:1.08;letter-spacing:-.03em}.contact-intro>p:not(.eyebrow){margin:22px 0 0;color:#d4e1d9;font-family:Georgia,serif;font-size:1.05rem;line-height:1.8}.contact-notice{margin-top:30px;padding:20px 22px;border-left:3px solid var(--gold);background:rgba(255,255,255,.07)}.contact-notice strong{color:#fff;font-size:.8rem;letter-spacing:.09em;text-transform:uppercase}.contact-notice p{margin:7px 0 0;color:#c7d5cd;font-size:.83rem;line-height:1.6}
.contact-form{position:relative;display:grid;padding:clamp(24px,4vw,42px);background:var(--paper);color:var(--ink);box-shadow:0 18px 45px rgba(0,0,0,.2)}.contact-form label{margin:0 0 7px;color:var(--forest);font-size:.78rem;font-weight:800}.contact-form label:not(:first-of-type){margin-top:18px}.contact-form input:not([type="hidden"]):not([type="checkbox"]),.contact-form textarea{width:100%;padding:13px 14px;background:#fff;border:1px solid #cfcbbb;border-radius:2px;color:var(--ink);outline:none}.contact-form textarea{min-height:150px;resize:vertical}.contact-form input:focus,.contact-form textarea:focus{border-color:var(--forest-2);box-shadow:0 0 0 3px rgba(36,89,71,.12)}.contact-form button{min-height:50px;margin-top:24px;padding:0 22px;background:var(--gold);border:0;border-radius:2px;color:#122d24;cursor:pointer;font-weight:900}.contact-form button:hover{background:#c99a5c}.contact-botcheck{position:absolute;left:-9999px}.form-help{margin:10px 0 0;color:var(--muted);font-size:.7rem}
.thank-you-page{display:grid;min-height:100vh;place-items:center;padding:24px;background:linear-gradient(180deg,#fffdf8,#e7e6da)}.thank-you-page section{width:min(700px,100%);padding:clamp(38px,7vw,72px);background:var(--paper);border:1px solid var(--line);box-shadow:var(--shadow);text-align:center}.thank-you-page h1{margin:0;color:var(--forest);font-size:clamp(2.3rem,6vw,4rem);line-height:1.05}.thank-you-page p:not(.eyebrow){margin:22px auto 30px;color:var(--muted);line-height:1.7}
.documents-section { padding: 105px clamp(24px, 8vw, 130px); background: var(--paper); }
.document-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 900px; margin: 45px auto 0; }
.document-grid a { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 17px; min-height: 110px; padding: 22px; border: 1px solid var(--line); text-decoration: none; transition: .2s ease; }
.document-grid a:hover { border-color: var(--forest-2); box-shadow: 0 10px 24px rgba(26,52,40,.09); }
.document-type { display: grid; place-items: center; width: 46px; height: 54px; background: #e5ebe4; color: var(--forest); font-size: .65rem; font-weight: 900; }
.document-grid strong, .document-grid small { display: block; }
.document-grid strong { color: var(--forest); font-family: Georgia, serif; font-size: .95rem; }
.document-grid small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.document-grid b { color: var(--gold); font-size: 1.2rem; }

footer { display: flex; justify-content: space-between; gap: 40px; padding: 58px clamp(30px, 8vw, 130px); background: #102f25; color: #d4e1d9; }
footer strong { color: #fff; font-family: Georgia, serif; font-size: 1.15rem; }
footer p { margin: 9px 0 0; color: #acc1b5; font-size: .76rem; line-height: 1.7; }
footer > p { margin: 0; text-align: right; }
.footer-directions { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; color: #fff; font-size: .75rem; font-weight: 800; text-decoration: none; }
.extreme-tracker { position: fixed; z-index: 50; right: 9px; bottom: 8px; width: 9px; height: 9px; padding: 2px; background: rgba(255,255,255,.75); border-radius: 2px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(11,28,21,.82); backdrop-filter: blur(5px); }
.memorial-modal { position: relative; width: min(980px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--paper); box-shadow: 0 25px 90px rgba(0,0,0,.4); }
.modal-close { position: sticky; z-index: 5; top: 14px; float: right; width: 40px; height: 40px; margin: 14px 14px -54px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; color: var(--forest); cursor: pointer; font-size: 1.5rem; }
.modal-memorial { display: grid; grid-template-columns: minmax(280px, 44%) 1fr; min-height: 380px; background: #e7e6da; }
.modal-memorial > img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; background: #d7d4c8; }
.modal-memorial > div { align-self: center; padding: 55px; }
.modal-memorial h2 { margin: 0; color: var(--forest); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; }
.modal-dates { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; color: var(--muted); }
.modal-dates .age-line { margin-top: 5px; color: var(--forest); font-weight: 800; }
.additional-headstones { padding: 38px clamp(28px, 6vw, 72px) 8px; border-top: 1px solid var(--line); }
.additional-headstones .family-gallery { grid-template-columns: minmax(220px, 420px); margin-top: 16px; }
.additional-headstones .family-gallery a { aspect-ratio: auto; max-height: 420px; }
.additional-headstones .family-gallery img { object-fit: contain; }
.biography { padding: 54px clamp(28px, 6vw, 72px) 70px; }
.biography-heading { margin-bottom: 32px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.biography-heading span { color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.biography-heading h3 { margin: 7px 0 0; color: var(--forest); font-size: 2rem; text-transform: capitalize; }
.biography-copy { columns: 2; column-gap: 48px; }
.biography-copy p { break-inside: avoid; margin: 0 0 22px; color: #4f5a53; line-height: 1.78; white-space: pre-line; }
.family-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 40px; }
.family-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e5e2d8; }
.family-gallery img { width: 100%; height: 100%; object-fit: cover; transition: .25s ease; }
.family-gallery a:hover img { transform: scale(1.03); }
.biography.unavailable { text-align: center; }
.biography.unavailable h3 { margin: 0; color: var(--forest); font-size: 1.8rem; }
.biography.unavailable p { max-width: 640px; margin: 15px auto; color: var(--muted); line-height: 1.7; }
.biography.unavailable a { color: var(--forest-2); font-weight: 800; text-decoration: none; }

@media (max-width: 1100px) {
  .record-grid { grid-template-columns: repeat(3, 1fr); }
  .document-grid { grid-template-columns: 1fr; max-width: 760px; }
}
@media (max-width: 800px) {
  .site-header { min-height: 74px; }
  .site-header nav { display: none; }
  .hero { padding: 42px 20px; }
  .hero-stats { gap: 18px; }
  .hero-stats div { min-width: 0; padding: 0 10px; }
  .hero-stats dt { font-size: 1.35rem; }
  .notice { border-width: 0 0 1px; box-shadow: none; }
  .quick-documents { margin-top: 0; border-width: 0 0 1px; }
  .quick-document-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .records-section { padding-top: 85px; }
  .record-grid { grid-template-columns: repeat(2, 1fr); }
  .about-section { grid-template-columns: 1fr; gap: 32px; padding-block: 75px; }
  .contact-section { grid-template-columns: 1fr; gap: 36px; padding-block: 75px; }
  .modal-memorial { grid-template-columns: 1fr; }
  .modal-memorial > img { max-height: 440px; }
  .modal-memorial > div { padding: 35px; }
  .biography-copy { columns: 1; }
  footer { display: block; }
  footer > p { margin-top: 28px; text-align: left; }
}
@media (max-width: 520px) {
  .brand small { display: none; }
  .hero h1 { font-size: 3.05rem; }
  .hero-tagline { font-size: 1.3rem; }
  .hero-actions { display: grid; }
  .hero-stats { justify-content: space-between; gap: 8px; }
  .hero-stats dd { font-size: .56rem; }
  .notice { grid-template-columns: 1fr; padding: 26px 22px; }
  .record-grid { grid-template-columns: 1fr; }
  .record-card { display: grid; grid-template-columns: 42% 1fr; }
  .record-image-wrap { height: 100%; aspect-ratio: auto; }
  .record-copy { min-height: 190px; padding: 17px; }
  .result-summary { align-items: flex-end; gap: 10px; }
  .document-grid a { grid-template-columns: 42px 1fr auto; padding: 18px; }
  .modal-backdrop { padding: 0; }
  .memorial-modal { width: 100%; max-height: 100vh; min-height: 100vh; }
  .family-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
