/* =========================================================================
   BuryYourShit.com — cemetery registry stylesheet
   Static build. No framework, no build step, no CDN.
   Concept: municipal cemetery paperwork. Granite ground, engraved bone
   lettering, brass registry accents, deadpan administrative framing.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Ground */
  --granite:    #0a0d12;
  --granite-2:  #10151d;
  --granite-3:  #171e29;
  --granite-4:  #1f2733;

  /* Stone / text */
  --bone:       #ece7db;
  --bone-2:     #b9b4a7;
  --slate:      #7b8496;
  --slate-2:    #565e6d;

  /* Accents */
  --brass:      #c9a227;
  --brass-2:    #e8cd7a;
  --brass-dim:  rgba(201, 162, 39, 0.18);
  --moss:       #5b7a53;
  --rose:       #a8555d;
  --candle:     #ffb347;

  /* Structure */
  --line:       rgba(236, 231, 219, 0.10);
  --line-2:     rgba(236, 231, 219, 0.18);
  --shadow:     0 18px 50px rgba(0, 0, 0, 0.55);

  /* Type */
  --display: Georgia, "Times New Roman", "Nimbus Roman", serif;
  --body:    Georgia, "Times New Roman", serif;
  --ui:      system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Metrics */
  --max:     1180px;
  --max-narrow: 760px;
  --radius:  3px;
  --gap:     clamp(1rem, 3vw, 2rem);
}

/* ---------- 2. Reset ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--granite);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fog over granite. Purely decorative, cheap, no images. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(120, 140, 175, 0.13), transparent 62%),
    radial-gradient(760px 460px at 8% 108%, rgba(91, 122, 83, 0.09), transparent 60%),
    radial-gradient(620px 420px at 96% 42%, rgba(201, 162, 39, 0.05), transparent 60%);
}

img, svg, canvas { max-width: 100%; height: auto; display: block; }

a { color: var(--brass-2); text-decoration-color: var(--brass-dim); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

::selection { background: var(--brass); color: var(--granite); }

:focus-visible {
  outline: 2px solid var(--brass-2);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---------- 3. Utilities ------------------------------------------------- */

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; position: relative; z-index: 1; }
.wrap-narrow { width: min(100% - 2.5rem, var(--max-narrow)); margin-inline: auto; position: relative; z-index: 1; }

.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;
}

.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 200;
  background: var(--brass); color: var(--granite);
  padding: 0.65rem 1.1rem; font-family: var(--ui);
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: top 0.18s;
}
.skip-link:focus { top: 0.75rem; }

.eyebrow {
  font-family: var(--ui);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1rem;
}
.eyebrow--brass { color: var(--brass); }

.rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; z-index: 1; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--raised { background: var(--granite-2); border-block: 1px solid var(--line); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); }
.section-head p { color: var(--bone-2); max-width: 56ch; margin: 0; }

.lead { font-size: clamp(1.08rem, 2.2vw, 1.32rem); color: var(--bone-2); max-width: 62ch; }

/* Engraved lettering — the core visual device. */
.engraved {
  color: var(--bone);
  text-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 3px rgba(0, 0, 0, 0.5);
}

/* ---------- 4. Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1rem 1.9rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--bone);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  min-height: 48px;
}
.btn:hover { border-color: var(--brass); color: var(--brass-2); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #14100a;
  font-weight: 700;
}
.btn--primary:hover { background: var(--brass-2); border-color: var(--brass-2); color: #14100a; }

.btn--ghost { border-color: var(--line-2); color: var(--bone-2); }

.btn--block { width: 100%; }

.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.68rem; min-height: 40px; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ---------- 5. Header ---------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 68px;
}

.brand {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--brass); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }

.nav a {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bone-2);
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brass-2); background: rgba(236, 231, 219, 0.05); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--bone);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-family: var(--ui);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch;
    gap: 0;
    background: var(--granite-2);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
    margin-left: 0;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.95rem 0.4rem; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
  .nav .btn { margin-top: 0.85rem; }
}

/* ---------- 6. Hero ------------------------------------------------------ */

.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); text-align: center; }

.hero__title {
  font-size: clamp(3rem, 13vw, 8.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  line-height: 0.92;
}

.hero__sub {
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  color: var(--bone-2);
  max-width: 30ch;
  margin: 0 auto 2.25rem;
  line-height: 1.4;
}

.hero .btn-row { justify-content: center; }

.hero__note {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-top: 1.75rem;
}

/* Cemetery gate silhouette under the hero */
.gate {
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  max-width: 900px;
  opacity: 0.5;
}

/* ---------- 7. Counters -------------------------------------------------- */

.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.counter { background: var(--granite-2); padding: 1.5rem 1rem; text-align: center; }
.counter__value {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  color: var(--bone);
  display: block;
  line-height: 1;
}
.counter__label {
  font-family: var(--ui);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.6rem;
  display: block;
}

/* ---------- 8. Demo-data notice (PRD §29) -------------------------------- */

.demo-flag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ui);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  border: 1px dashed rgba(168, 85, 93, 0.5);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  background: rgba(168, 85, 93, 0.07);
}

.demo-banner {
  background: rgba(168, 85, 93, 0.1);
  border-bottom: 1px solid rgba(168, 85, 93, 0.3);
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #e3b6ba;
  text-align: center;
  padding: 0.7rem 1.25rem;
  position: relative;
  z-index: 95;
}
.demo-banner strong { color: #fff; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.66rem; }

/* ---------- 9. Grave cards ----------------------------------------------- */
/* Tier hierarchy is a hard PRD requirement (§2.6): a €79.99 grave must
   visibly dominate a €1.99 grave while browsing. Each tier gets a distinct
   stone material, footprint and ornament — not just a badge. */

.grave-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.85rem, 2vw, 1.4rem);
  align-items: end;
}

.grave-card {
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
  isolation: isolate;
}
.grave-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.grave-card__stone {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  text-align: center;
  padding: 2rem 1.1rem 1.4rem;
  min-height: 190px;
  border: 1px solid var(--line-2);
  border-bottom: none;
  border-radius: 50% 50% var(--radius) var(--radius) / 22% 22% 0 0;
  background: linear-gradient(178deg, #2b333f 0%, #1b222c 55%, #141a23 100%);
}

.grave-card__ground {
  height: 12px;
  background: linear-gradient(180deg, #2a2f26, #171b16);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.grave-card__title {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
  color: var(--bone);
  text-shadow: 0 -1px 0 rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.12);
  overflow-wrap: anywhere;
}

.grave-card__years {
  font-family: var(--ui);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--slate);
  margin-bottom: 0.7rem;
}

.grave-card__epitaph {
  font-size: 0.86rem;
  font-style: italic;
  color: var(--bone-2);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grave-card__cross {
  font-family: var(--display);
  color: var(--slate-2);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.grave-card__meta {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  font-family: var(--ui);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--slate);
  padding: 0.6rem 0.5rem 0;
  margin-top: auto;
}

.grave-card__plot {
  position: absolute; top: 0.55rem; right: 0.7rem;
  font-family: var(--ui);
  font-size: 0.53rem;
  letter-spacing: 0.16em;
  color: var(--slate-2);
}

/* Tier: standard (€1.99) — plain concrete, smallest */
.grave-card[data-tier="standard"] .grave-card__stone {
  background: linear-gradient(178deg, #262b33 0%, #1a1f26 60%, #14181e 100%);
  min-height: 175px;
}

/* Tier: proper (€7.99) — marble with gold lettering */
.grave-card[data-tier="proper"] .grave-card__stone {
  background: linear-gradient(178deg, #3c4350 0%, #262d38 55%, #1a202a 100%);
  border-color: rgba(236, 231, 219, 0.22);
  min-height: 205px;
}
.grave-card[data-tier="proper"] .grave-card__title { color: #f2e4bd; }

/* Tier: luxury (€19.99) — marble + flowers, wider */
.grave-card[data-tier="luxury"] .grave-card__stone {
  background: linear-gradient(178deg, #474f5e 0%, #2c3440 55%, #1d232d 100%);
  border-color: rgba(236, 231, 219, 0.28);
  min-height: 225px;
}
.grave-card[data-tier="luxury"] .grave-card__title { color: #f6ecd2; }
.grave-card[data-tier="luxury"] .grave-card__stone::after {
  content: "❀ ❀ ❀";
  position: absolute; bottom: 0.5rem; left: 0; right: 0;
  font-size: 0.7rem; color: var(--rose); letter-spacing: 0.4em;
}

/* Tier: angel (€39.99) — angel statue, tall, spans 2 columns */
.grave-card[data-tier="angel"] { grid-column: span 2; }
.grave-card[data-tier="angel"] .grave-card__stone {
  background: linear-gradient(178deg, #545d6d 0%, #333c49 50%, #1f2530 100%);
  border-color: rgba(232, 205, 122, 0.4);
  min-height: 275px;
  padding-top: 3.4rem;
}
.grave-card[data-tier="angel"] .grave-card__title { color: #fbf3dd; font-size: 1.2rem; }
.grave-card[data-tier="angel"] .grave-card__cross::before {
  content: "☦";
  position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
  font-size: 1.9rem; color: var(--brass-2); opacity: 0.85;
}

/* Tier: mausoleum (€79.99) — must be visible from far away (§6.5) */
.grave-card[data-tier="mausoleum"] { grid-column: span 2; grid-row: span 2; }
.grave-card[data-tier="mausoleum"] .grave-card__stone {
  background: linear-gradient(178deg, #626c7e 0%, #3a4351 50%, #232a35 100%);
  border: 1px solid rgba(232, 205, 122, 0.55);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  min-height: 330px;
  padding-top: 4rem;
  box-shadow: inset 0 0 60px rgba(232, 205, 122, 0.08);
}
/* Columns + pediment */
.grave-card[data-tier="mausoleum"] .grave-card__stone::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2.4rem;
  background:
    linear-gradient(180deg, rgba(232,205,122,.22), transparent),
    repeating-linear-gradient(90deg, rgba(236,231,219,.16) 0 2px, transparent 2px 14px);
  border-bottom: 1px solid rgba(232, 205, 122, 0.35);
}
.grave-card[data-tier="mausoleum"] .grave-card__title { color: #fff8e6; font-size: 1.45rem; }
.grave-card[data-tier="mausoleum"] .grave-card__ground {
  background: linear-gradient(180deg, #333a2c, #1b1f18);
  height: 16px;
}

.tier-badge {
  position: absolute; top: 0.55rem; left: 0.7rem;
  font-family: var(--ui);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-2);
  border: 1px solid var(--brass-dim);
  border-radius: 2px;
  padding: 0.18rem 0.4rem;
  background: rgba(201, 162, 39, 0.1);
}

/* ---------- 10. Filter bar ----------------------------------------------- */

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding: 1rem 0 1.5rem;
}

.chip {
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-2);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s;
  min-height: 40px;
  display: inline-flex; align-items: center;
}
.chip:hover { border-color: var(--brass); color: var(--brass-2); }
.chip[aria-pressed="true"], .chip[data-active="true"] {
  background: var(--brass); border-color: var(--brass); color: #14100a; font-weight: 700;
}

.filters__spacer { flex: 1 1 auto; }

/* ---------- 11. Search --------------------------------------------------- */

.searchbar { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.searchbar input { flex: 1 1 240px; }

/* ---------- 12. Forms ---------------------------------------------------- */

.field { margin-bottom: 1.5rem; }

.field label, .field__label {
  display: block;
  font-family: var(--ui);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.55rem;
}

.field__hint {
  font-family: var(--ui);
  font-size: 0.72rem;
  color: var(--slate);
  margin-top: 0.45rem;
  line-height: 1.5;
}

input[type="text"], input[type="email"], input[type="search"], textarea, select {
  width: 100%;
  background: var(--granite-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  min-height: 48px;
}
input::placeholder, textarea::placeholder { color: var(--slate-2); }
input:focus, textarea:focus, select:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px var(--brass-dim); }

textarea { resize: vertical; min-height: 110px; line-height: 1.55; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate) 50%), linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.counter-note { font-family: var(--ui); font-size: 0.7rem; color: var(--slate); text-align: right; margin-top: 0.4rem; }
.counter-note[data-over="true"] { color: var(--rose); }

.field-error {
  font-family: var(--ui);
  font-size: 0.75rem;
  color: #e3898f;
  margin-top: 0.5rem;
  display: none;
}
.field-error[data-show="true"] { display: block; }

/* Radio / checkbox as cards */
.choice-list { display: grid; gap: 0.7rem; }

.choice {
  display: flex; gap: 0.9rem; align-items: flex-start;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  background: var(--granite-2);
  transition: border-color 0.16s, background 0.16s;
}
.choice:hover { border-color: var(--brass-dim); }
.choice input { margin-top: 0.25rem; accent-color: var(--brass); width: 18px; height: 18px; flex: none; }
.choice__title { font-family: var(--ui); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone); }
.choice__desc { font-size: 0.88rem; color: var(--slate); margin: 0.3rem 0 0; }
.choice:has(input:checked) { border-color: var(--brass); background: rgba(201, 162, 39, 0.07); }

/* ---------- 13. Tier / pricing cards ------------------------------------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
  align-items: stretch;
}

.tier {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--granite-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}
.tier--featured { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass-dim), var(--shadow); }

.tier__flag {
  position: absolute; top: -0.75rem; left: 50%; transform: translateX(-50%);
  background: var(--brass); color: #14100a;
  font-family: var(--ui); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.32rem 0.8rem; border-radius: 2px; white-space: nowrap;
}

.tier__name {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  margin: 0 0 0.15rem;
}
.tier__price {
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--brass-2);
  margin: 0.4rem 0 0.2rem;
  line-height: 1;
}
.tier__pitch { font-size: 0.95rem; font-style: italic; color: var(--bone-2); min-height: 3.2em; }

.tier__list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; font-family: var(--ui); font-size: 0.82rem; }
.tier__list li { padding: 0.42rem 0 0.42rem 1.35rem; position: relative; color: var(--bone-2); line-height: 1.45; }
.tier__list li::before { content: "†"; position: absolute; left: 0; color: var(--brass); }

.tier .btn { margin-top: auto; }

/* ---------- 14. Steps ---------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1.5rem; counter-reset: step; }
.step { border-top: 1px solid var(--line-2); padding-top: 1.4rem; }
.step__num {
  font-family: var(--display); font-size: 2.6rem; color: var(--brass-dim);
  line-height: 1; display: block; margin-bottom: 0.6rem;
}
.step h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.step p { color: var(--bone-2); font-size: 0.95rem; margin: 0; }

/* ---------- 15. Grave page ----------------------------------------------- */

.monument {
  max-width: 560px; margin: 0 auto;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem) clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line-2);
  border-bottom: none;
  border-radius: 46% 46% var(--radius) var(--radius) / 14% 14% 0 0;
  background: linear-gradient(178deg, #414a58 0%, #262d38 55%, #1a202a 100%);
  position: relative;
}
.monument__cross { font-size: 1.8rem; color: var(--slate); margin-bottom: 1.2rem; }
.monument__title {
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.8rem;
  overflow-wrap: anywhere;
}
.monument__years {
  font-family: var(--ui); font-size: 0.9rem; letter-spacing: 0.3em;
  color: var(--bone-2); margin-bottom: 1.6rem;
}
.monument__epitaph {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-style: italic;
  color: var(--bone);
  line-height: 1.5;
  margin: 0 auto 1.5rem;
  max-width: 34ch;
}
.monument__sender {
  font-family: var(--ui); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass);
}
.monument__ground {
  max-width: 620px; margin: 0 auto;
  height: 18px;
  background: linear-gradient(180deg, #2f3529, #171b13);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.plot-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem;
  font-family: var(--ui); font-size: 0.64rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--slate);
  margin: 1.75rem 0;
}
.plot-strip span { white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.metric-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem;
  margin: 2rem 0;
  font-family: var(--ui);
}
.metric { text-align: center; }
.metric__value { font-family: var(--display); font-size: 1.7rem; display: block; color: var(--bone); }
.metric__label { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--slate); }

/* ---------- 16. Share panel ---------------------------------------------- */

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 0.6rem;
}

.share-btn {
  display: flex; align-items: center; gap: 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--granite-2);
  color: var(--bone);
  font-family: var(--ui); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.9rem 1rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 48px;
  transition: border-color 0.16s, color 0.16s;
}
.share-btn:hover { border-color: var(--brass); color: var(--brass-2); }
.share-btn__icon { flex: none; width: 18px; height: 18px; fill: currentColor; }

.card-preview {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--granite-2);
  padding: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.card-preview figure { margin: 0; }
.card-preview figcaption {
  font-family: var(--ui); font-size: 0.6rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--slate); margin-top: 0.5rem; text-align: center;
}
.card-preview canvas { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: var(--granite); }

/* ---------- 17. Certificate ---------------------------------------------- */

.certificate {
  background: #f4efe2;
  color: #1d1a14;
  border: 1px solid #cbc0a6;
  border-radius: 2px;
  padding: clamp(1.75rem, 5vw, 3.25rem);
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  font-family: var(--display);
}
.certificate::before {
  content: "";
  position: absolute; inset: 10px;
  border: 2px double #b8a982;
  pointer-events: none;
}
.certificate__title {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: #1d1a14;
}
.certificate__sub {
  font-family: var(--ui); font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: #7a6f56; margin-bottom: 1.75rem;
}
.certificate__name {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  text-transform: uppercase;
  margin: 0.6rem 0;
  overflow-wrap: anywhere;
}
.certificate__epitaph { font-style: italic; font-size: 1.05rem; margin: 0.75rem auto 1.5rem; max-width: 32ch; }
.certificate__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.9rem; font-family: var(--ui); font-size: 0.66rem;
  border-top: 1px solid #cbc0a6; border-bottom: 1px solid #cbc0a6;
  padding: 1rem 0; margin-bottom: 1.25rem; text-align: left;
}
.certificate__meta dt { letter-spacing: 0.16em; text-transform: uppercase; color: #8a7d61; font-size: 0.56rem; }
.certificate__meta dd { margin: 0.25rem 0 0; font-weight: 700; }
.certificate__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.certificate__qr { width: 92px; height: 92px; background: #fff; padding: 5px; border: 1px solid #cbc0a6; }
.certificate__seal {
  width: 88px; height: 88px; border-radius: 50%;
  border: 2px solid var(--brass); color: #8a6f14;
  display: grid; place-content: center; text-align: center;
  font-family: var(--ui); font-size: 0.48rem; letter-spacing: 0.14em;
  text-transform: uppercase; line-height: 1.5;
}
.certificate__disclaimer {
  font-family: var(--ui); font-size: 0.62rem; line-height: 1.6;
  color: #6d6350; margin: 1.5rem 0 0; text-align: left;
}

/* ---------- 18. Ceremony overlay (§21) ----------------------------------- */

.ceremony {
  position: fixed; inset: 0; z-index: 300;
  background: #05070a;
  display: none;
  place-content: center;
  text-align: center;
  padding: 2rem;
}
.ceremony[data-open="true"] { display: grid; }

.ceremony__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(120,140,175,.16), transparent 60%),
    radial-gradient(300px 200px at 78% 16%, rgba(236,231,219,.14), transparent 70%);
}

.ceremony__stage { position: relative; z-index: 2; }

.ceremony__plot {
  width: min(340px, 78vw);
  height: 200px;
  margin: 0 auto;
  position: relative;
  border-bottom: 2px solid rgba(236,231,219,.14);
}

.ceremony__stone {
  position: absolute; bottom: 0; left: 50%;
  width: 62%;
  transform: translate(-50%, 100%);
  background: linear-gradient(178deg, #414a58, #1a202a);
  border: 1px solid var(--line-2);
  border-radius: 46% 46% 2px 2px / 16% 16% 0 0;
  padding: 1.5rem 1rem 1.2rem;
  opacity: 0;
}
.ceremony[data-step="rise"] .ceremony__stone,
.ceremony[data-step="title"] .ceremony__stone,
.ceremony[data-step="epitaph"] .ceremony__stone {
  animation: stone-rise 1.5s cubic-bezier(.16,.84,.44,1) forwards;
}
@keyframes stone-rise {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}

.ceremony__title, .ceremony__epitaph { opacity: 0; }
.ceremony[data-step="title"] .ceremony__title,
.ceremony[data-step="epitaph"] .ceremony__title { animation: fade-up .7s forwards; }
.ceremony[data-step="epitaph"] .ceremony__epitaph { animation: fade-up .7s .15s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ceremony__skip {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3;
}

.ceremony__caption {
  font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 2.5rem;
}

/* ---------- 19. Reveal (§22) --------------------------------------------- */

.reveal-stage { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }
.reveal-stage__kicker {
  font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 1.5rem;
}
.reveal-stage h1 { font-size: clamp(2rem, 7vw, 4rem); margin-bottom: 1rem; }

.gate-doors { display: flex; justify-content: center; gap: 4px; margin: 2.5rem auto; max-width: 320px; }
.gate-door {
  flex: 1; height: 190px;
  background: linear-gradient(180deg, #2b3340, #161c25);
  border: 1px solid var(--line-2);
  border-radius: 50% 50% 2px 2px / 20% 20% 0 0;
  transition: transform 1s cubic-bezier(.6,0,.2,1), opacity 1s;
}
[data-revealed="true"] .gate-door:first-child { transform: translateX(-120%) rotateY(35deg); opacity: 0; }
[data-revealed="true"] .gate-door:last-child  { transform: translateX(120%) rotateY(-35deg); opacity: 0; }

.private-message {
  border-left: 2px solid var(--brass);
  background: var(--granite-2);
  padding: 1.25rem 1.5rem;
  font-style: italic;
  color: var(--bone-2);
  margin: 2rem auto;
  max-width: 46ch;
  text-align: left;
}

/* ---------- 20. Modal ---------------------------------------------------- */

.modal {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(5, 7, 10, 0.82);
  display: none;
  place-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.modal[data-open="true"] { display: grid; }
.modal__box {
  background: var(--granite-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 520px; width: 100%;
  box-shadow: var(--shadow);
  margin: auto;
}
.modal__box h2 { font-size: 1.5rem; }
.modal__close {
  float: right; background: transparent; border: 0; color: var(--slate);
  font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0.25rem 0.5rem;
  min-height: 44px; min-width: 44px;
}
.modal__close:hover { color: var(--bone); }

/* ---------- 21. Toast ---------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%);
  background: var(--brass); color: #14100a;
  font-family: var(--ui); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.9rem 1.5rem; border-radius: var(--radius);
  z-index: 400; transition: transform 0.3s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: var(--shadow); max-width: calc(100vw - 3rem); text-align: center;
}
.toast[data-show="true"] { transform: translate(-50%, 0); }

/* ---------- 22. Prose ---------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-top: 2.5rem; }
.prose h3 { font-size: 1.2rem; margin-top: 2rem; color: var(--brass-2); }
.prose ul, .prose ol { padding-left: 1.3rem; color: var(--bone-2); }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  border-left: 2px solid var(--brass);
  margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.25rem;
  font-style: italic; color: var(--bone);
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.15rem 0; list-style: none;
  font-family: var(--display); font-size: 1.1rem;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 1.4rem; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1.25rem; color: var(--bone-2); }

/* ---------- 23. Footer --------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--granite-2);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  margin-top: clamp(3rem, 8vw, 6rem);
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 2rem; margin-bottom: 2.5rem;
}
.footer-col h3 {
  font-family: var(--ui); font-size: 0.62rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--bone-2); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--brass-2); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--ui); font-size: 0.72rem; color: var(--slate-2);
}

/* ---------- 24. Cookie banner (§59/§60, GDPR) ---------------------------- */

.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 180;
  background: var(--granite-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 460px;
  box-shadow: var(--shadow);
  display: none;
  font-family: var(--ui);
  font-size: 0.82rem;
  line-height: 1.55;
}
.cookie[data-open="true"] { display: block; }
.cookie p { color: var(--bone-2); margin-bottom: 1rem; }
.cookie .btn-row { gap: 0.5rem; }

/* ---------- 25. Print ---------------------------------------------------- */

@media print {
  body::before, .site-header, .site-footer, .cookie, .demo-banner,
  .actions, .share-grid, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .certificate { box-shadow: none; border-color: #999; max-width: 100%; }
}
