:root {
  color-scheme: dark;
  --bg: #11110f;
  --panel: #1a1b18;
  --panel-2: #22231f;
  --text: #f5f1e8;
  --muted: #b7b0a4;
  --soft: #837c70;
  --line: #35352f;
  --accent: #a7f06f;
  --accent-2: #d8b4fe;
  --danger: #ff8a65;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 280px),
    radial-gradient(circle at 85% 12%, rgba(167, 240, 111, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 17, 15, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  min-height: 480px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 58px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 20px;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 0.97;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.lede {
  max-width: 660px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.primary-button,
.ghost-button,
.filter-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(167, 240, 111, 0.45);
  background: var(--accent);
  color: #10140c;
  font-weight: 800;
}

.ghost-button,
.filter-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.filter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.primary-button:disabled,
.ghost-button:disabled,
.filter-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.filter-button.active {
  border-color: rgba(216, 180, 254, 0.55);
  background: rgba(216, 180, 254, 0.13);
}

.featured-tombstone,
.tombstone-card,
.grave-detail,
.burial-form,
.resurrection-panel,
.share-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.featured-tombstone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-height: 440px;
  padding: 30px;
  border-radius: 8px 8px 46px 46px;
}

.featured-tombstone::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto 18px;
  height: 1px;
  background: var(--line);
}

.stone-label {
  color: var(--soft);
  font-family: Georgia, serif;
  font-style: italic;
}

.featured-tombstone h2 {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 54px);
}

.featured-tombstone p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.stone-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill,
.stone-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 54px;
}

.stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 30px;
}

.stats span {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tombstone-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px 8px 34px 34px;
  padding: 22px;
}

.tombstone-card h3 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1.05;
}

.tombstone-card p {
  color: var(--muted);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 28px;
  align-items: start;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.78fr);
  gap: 24px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.form-intro {
  position: sticky;
  top: 96px;
}

.form-intro h1 {
  font-size: clamp(42px, 6vw, 70px);
}

.form-intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.burial-form {
  display: grid;
  gap: 18px;
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10110f;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(167, 240, 111, 0.7);
}

textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.grave-detail {
  border-radius: 8px 8px 58px 58px;
  padding: clamp(24px, 4vw, 44px);
}

.share-card {
  margin-bottom: 34px;
  border-radius: 8px 8px 42px 42px;
  padding: clamp(18px, 4vw, 30px);
  background:
    linear-gradient(180deg, rgba(167, 240, 111, 0.08), rgba(216, 180, 254, 0.035)),
    #151611;
}

.share-card h2 {
  margin: 8px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 46px);
}

.share-card p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.grave-detail h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5vw, 64px);
}

.detail-kicker {
  color: var(--soft);
  font-family: Georgia, serif;
  font-style: italic;
}

.epitaph {
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
}

.detail-block {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-block h2 {
  font-size: 18px;
}

.detail-block p {
  color: var(--muted);
  line-height: 1.65;
}

.resurrection-panel {
  border-radius: 8px;
  padding: 22px;
}

.resurrection-panel h2 {
  font-size: 24px;
}

.resurrection-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.resurrection-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.resurrection-item strong {
  display: block;
  margin-bottom: 4px;
}

.resurrection-item p {
  color: var(--muted);
  line-height: 1.5;
}

.not-found {
  max-width: 640px;
  padding: 72px 0;
}

@media (max-width: 880px) {
  .hero,
  .form-shell,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .form-intro {
    position: static;
  }

  .idea-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 28px;
  }

  h1 {
    font-size: 42px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .featured-tombstone {
    min-height: 360px;
  }
}
