/* Eturnal Rest -- base layout + component kit. Imported by every page after
   tokens.css. Keep page-specific CSS out of here. */

/* Branded placeholder art (rolling grounds + a dove) for any cemetery image we
   do not have a real photo for. Honest: clearly an illustration, never passed
   off as the real cemetery. Layered over the brand gradient. */
:root {
  --placeholder-art: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20400%20250%27%20preserveAspectRatio%3D%27xMidYMid%20slice%27%3E%3Ccircle%20cx%3D%27328%27%20cy%3D%2752%27%20r%3D%2730%27%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.20%27%2F%3E%3Cpath%20d%3D%27M0%20250%20L0%20162%20Q%20110%20118%20210%20156%20Q%20300%20190%20400%20144%20L400%20250%20Z%27%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.16%27%2F%3E%3Cpath%20d%3D%27M0%20250%20L0%20200%20Q%20120%20158%20250%20194%20Q%20332%20216%20400%20186%20L400%20250%20Z%27%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.30%27%2F%3E%3Cg%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.34%27%3E%3Crect%20x%3D%2782%27%20y%3D%27150%27%20width%3D%277%27%20height%3D%2734%27%20rx%3D%272%27%2F%3E%3Ccircle%20cx%3D%2785.5%27%20cy%3D%27138%27%20r%3D%2720%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Safety net: no element should ever cause sideways scroll on a phone. Any
     genuine wide content (the map app shell, the newest-listings strip) uses its
     own scroll container, so clipping stray overflow here is safe. */
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--green-700);
  text-decoration: none;
}
a:hover {
  color: var(--green-600);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--green-900);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  margin: 0 0 1em;
}
.lede {
  font-size: 1.2rem;
  color: var(--ink-2);
}
.muted {
  color: var(--ink-3);
}
.serif {
  font-family: var(--font-serif);
}

/* ---- layout ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: var(--space-9) 0;
}
.section--tight {
  padding: var(--space-7) 0;
}
.section--stone {
  background: var(--stone);
}
.section--green {
  background: var(--green-800);
  color: var(--green-100);
}
.section--green h2,
.section--green h3 {
  color: var(--white);
}
.center {
  text-align: center;
}
.grid {
  display: grid;
  gap: var(--space-5);
}
.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-700);
  margin-bottom: 0.6em;
}
.stack > * + * {
  margin-top: var(--space-4);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--green-700);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--green-600);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn--gold {
  background: var(--gold);
  color: var(--white);
}
.btn--gold:hover {
  background: var(--gold-700);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn--ghost {
  background: transparent;
  color: var(--green-700);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--green-700);
  color: var(--green-700);
}
.btn--light {
  background: var(--white);
  color: var(--green-800);
}
.btn--light:hover {
  background: var(--cream);
  color: var(--green-800);
}
.btn--lg {
  padding: 17px 32px;
  font-size: 1.08rem;
}
.btn--sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

/* ---- header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--green-900);
}
.brand:hover {
  text-decoration: none;
  color: var(--green-800);
}
.brand__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--green-700);
  text-decoration: none;
}
.nav__cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  /* 44x44 minimum touch target (the 3 bars are only ~24px tall on their own) */
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-900);
  margin: 5px 0;
  transition: 0.2s;
}

/* ---- footer ---- */
.site-footer {
  background: var(--green-900);
  color: var(--green-100);
  padding: var(--space-8) 0 var(--space-6);
}
.site-footer a {
  color: var(--green-100);
}
.site-footer a:hover {
  color: var(--white);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--space-6);
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.4em;
}
.footer__col h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1em;
}
.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__col li {
  margin-bottom: 0.6em;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--green-300);
  flex-wrap: wrap;
}

/* ---- cards ---- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    box-shadow 0.18s var(--ease),
    transform 0.18s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card__body {
  padding: var(--space-5);
}
.card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--green-900);
  margin: 0 0 0.2em;
}
.card__meta {
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* ---- badges / chips ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge--verified {
  background: var(--green-100);
  color: var(--green-800);
}
.badge--listed {
  background: #f4ead3;
  color: var(--gold-700);
}
.badge--scraped {
  background: var(--stone);
  color: var(--ink-3);
}
.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--white);
}
.chip:hover {
  border-color: var(--green-500);
  color: var(--green-700);
  text-decoration: none;
}

/* ---- stat ---- */
.stat {
  text-align: center;
}
.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--green-700);
  font-weight: 600;
  line-height: 1;
}
.stat__label {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-top: 0.4em;
}
.section--green .stat__num {
  color: var(--white);
}
.section--green .stat__label {
  color: var(--green-300);
}

/* ---- forms ---- */
.input,
.select {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px var(--green-100);
}
.field {
  margin-bottom: var(--space-4);
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink-2);
}

/* ---- utilities ---- */
.hidden {
  display: none !important;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-6 {
  margin-top: 32px;
}
.mb-0 {
  margin-bottom: 0;
}
.wrap {
  flex-wrap: wrap;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--green-100);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .nav__links,
  .nav__cta .btn--ghost {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
  .nav.is-open .nav__links {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .section {
    padding: var(--space-7) 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   REAL-BRAND CHROME + MOTION + PHOTO CARDS + NATIVE FORMS
   (appended 2026-06-02 overhaul; overrides win by source order)
   ============================================================ */

/* selection + scrollbar polish */
::selection {
  background: var(--blue-200);
  color: var(--blue-900);
}
html {
  scrollbar-color: var(--blue-300) var(--sand);
}

/* header: real logo, cream glass, scroll elevation */
.site-header {
  background: rgba(249, 248, 244, 0.82);
  border-bottom: 1px solid var(--line-cool);
  transition:
    box-shadow var(--dur-2) var(--ease),
    background var(--dur-2) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(249, 248, 244, 0.95);
  box-shadow: 0 6px 24px rgba(29, 55, 68, 0.08);
}
.brand {
  gap: 0;
  font-size: 0;
}
.brand__logo {
  height: 40px;
  width: auto;
  display: block;
}
@media (max-width: 720px) {
  .brand__logo {
    height: 34px;
  }
}

/* primary button: brand-blue depth */
.btn--primary {
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 2px 8px rgba(70, 124, 153, 0.28);
}
.btn--primary:hover {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
  box-shadow: var(--shadow-blue);
}
.btn {
  transition:
    transform var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease),
    background var(--dur-1) var(--ease);
}
.btn--ghost {
  border-color: var(--line-cool);
}
.btn--accent {
  background: linear-gradient(180deg, var(--accent), var(--accent-700));
  color: #fff;
}
.btn--accent:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 26px rgba(217, 140, 90, 0.3);
  color: #fff;
}

/* footer logo (force white on dark) */
.footer__logo {
  height: 46px;
  width: auto;
  opacity: 0.95;
  margin-bottom: 14px;
}
.footer__tag {
  color: var(--blue-200);
  max-width: 34ch;
  font-size: 0.95rem;
}
.site-footer {
  background: linear-gradient(180deg, var(--blue-800), var(--blue-900));
}
.footer__bottom {
  color: var(--blue-300);
}

/* badges */
.badge--verified {
  background: var(--verified-bg);
  color: var(--verified);
}
.badge--listed {
  background: var(--accent-100);
  color: var(--accent-700);
}
.chip--avail {
  background: var(--blue-50);
  border-color: var(--blue-200);
  color: var(--blue-700);
  font-weight: 600;
}

/* card refinement */
.card {
  transition:
    box-shadow var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card__title {
  color: var(--blue-900);
}

/* photo cards: real cemetery image with branded placeholder fallback */
.cem-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* equal-height cards across the grid (client review: "line it up") */
}
.cem-card .card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
/* the badge + "N plots available" row: fixed min-height so titles align even
   when a card has no chip or no badge */
.cem-card__tags {
  min-height: 28px;
  margin-bottom: 2px;
}
.cem-card .card__title {
  margin: 0;
}
.cem-card .card__meta {
  margin-top: auto; /* pin the location line to the bottom so every card matches */
}
.cem-card__photo {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--blue-50);
  overflow: hidden;
}
.cem-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}
.cem-card:hover .cem-card__photo img {
  transform: scale(1.05);
}
.cem-card__photo.is-placeholder {
  display: grid;
  place-items: center;
  background:
    var(--placeholder-art) center / cover no-repeat,
    linear-gradient(135deg, var(--blue-500), var(--blue-700));
}
.cem-card__photo.is-placeholder span {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
  will-change: opacity, transform;
}
/* No-JS / scripting-disabled escape hatch: never permanently hide content. */
@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 {
  transition-delay: 0.06s;
}
.reveal-delay-2 {
  transition-delay: 0.12s;
}
.reveal-delay-3 {
  transition-delay: 0.18s;
}

/* count-up numbers hold layout */
.stat__num[data-count] {
  font-variant-numeric: tabular-nums;
}

/* native forms (replace mailto): form card, grid, states */
.form-card {
  background: var(--white);
  border: 1px solid var(--line-cool);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-6);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-grid .field--full {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
textarea.input {
  min-height: 120px;
  resize: vertical;
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-3);
}
.form-status {
  margin-top: var(--space-4);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: none;
}
.form-status.is-ok {
  display: block;
  background: var(--verified-bg);
  color: var(--verified);
}
.form-status.is-err {
  display: block;
  background: #fae9e5;
  color: var(--danger);
}

/* "near me" pill */
.near-me {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* nicer mobile menu */
@media (max-width: 720px) {
  .nav.is-open .nav__links {
    background: var(--cream);
    border-bottom: 1px solid var(--line-cool);
  }
}

/* ============================================================
   DESIGN SYSTEM v2 (2026-06-03) -- nav, buttons, focus rings,
   section bands, cards, typography, robust reveal. Appended last
   so source order wins over every block above. See DESIGN-SPEC-v2.md.
   ============================================================ */

/* ---------- TYPOGRAPHY: real Merriweather weight (700), tracking ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 700; /* 600 is not a real Merriweather weight -> rendered blurry */
}
h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.015em;
}
h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
body {
  line-height: var(--lh-body);
}
.lede {
  line-height: 1.55;
  max-width: 56ch;
}
.eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-800); /* AA-safe terracotta, replaces muddy gold-700 */
}
.section--green .eyebrow {
  color: var(--accent);
}

/* ---------- SECTION BANDS: layered rhythm, no flat greige ---------- */
.section--stone {
  background: var(
    --surface-2
  ); /* cool calm band (auto via retargeted --stone) */
}
.section--feature {
  background: var(--grad-band);
  border-top: 1px solid var(--blue-100);
  border-bottom: 1px solid var(--blue-100);
}
.section--paper {
  background: var(--paper);
}
.section--green {
  background: var(--grad-deep);
  color: var(--ink-on-blue);
  position: relative;
}
.section--green::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: radial-gradient(
    60% 100% at 50% 0,
    rgba(255, 255, 255, 0.06),
    transparent 70%
  );
  pointer-events: none;
}
.section--green .lede {
  color: var(--ink-on-blue-2);
}

/* ---------- BUTTONS: two-layer fill, inset sheen, press, focus rings ---------- */
.btn {
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) var(--ease),
    background var(--dur-1) var(--ease),
    filter var(--dur-1) var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.btn:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.05s;
}
.btn:focus-visible {
  outline: none;
}

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(70, 124, 153, 0.28),
    var(--shadow-inset-top);
}
.btn--primary:hover {
  background: var(--grad-brand-hover);
  box-shadow: var(--shadow-blue), var(--shadow-inset-top);
  color: #fff;
}
.btn--primary:focus-visible {
  box-shadow: var(--shadow-blue), var(--ring);
}

/* Leaflet ships `.leaflet-container a { color:#0078A8 }`, which outranks the
   .btn color rules (higher specificity) and left the map popup CTA blue-on-blue
   until hover. Restore each button's intended text color for any .btn rendered
   inside the map, so the contrast holds in the default state too. */
.leaflet-container a.btn--primary,
.leaflet-container a.btn--accent,
.leaflet-container a.btn--gold {
  color: #fff;
}
.leaflet-container a.btn--ghost {
  color: var(--ink-2);
}
.leaflet-container a.btn--light {
  color: var(--blue-800);
}
.leaflet-container a.btn--soft {
  color: var(--blue-700);
}

.btn--accent {
  background: var(--grad-accent);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(217, 140, 90, 0.28),
    var(--shadow-inset-top);
}
.btn--accent:hover {
  filter: brightness(1.04);
  box-shadow: var(--shadow-accent), var(--shadow-inset-top);
  color: #fff;
}
.btn--accent:focus-visible {
  box-shadow: var(--shadow-accent), var(--ring-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--blue-400);
  color: var(--blue-700);
  background: var(--blue-25);
}
.btn--ghost:focus-visible {
  box-shadow: var(--ring);
}

.btn--light {
  background: var(--white);
  color: var(--blue-800);
  box-shadow: var(--shadow-sm);
}
.btn--light:hover {
  background: var(--cream);
  color: var(--blue-900);
  box-shadow: var(--shadow);
}
.btn--light:focus-visible {
  box-shadow: var(--ring);
}

.btn--soft {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: transparent;
}
.btn--soft:hover {
  background: var(--blue-100);
}
.btn--soft:focus-visible {
  box-shadow: var(--ring);
}

/* gold alias retained for legacy markup -> routes to the accent visual */
.btn--gold {
  background: var(--grad-accent);
  color: #fff;
}
.btn--gold:hover {
  filter: brightness(1.04);
  color: #fff;
}

.btn--lg {
  padding: 16px 30px;
  font-size: 1.06rem;
}
.btn--sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

/* ---------- CARDS: warm lift on cream, white on a band, inset sheen on hover ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line-cool);
  box-shadow: var(--shadow-sm);
}
.section--stone .card,
.section--feature .card,
.section--paper .card,
.map-rail .card {
  background: var(--surface-0);
}
.card:hover {
  box-shadow: var(--shadow-md), var(--shadow-inset-top);
  transform: translateY(-3px);
  border-color: var(--blue-200);
}

/* ---------- NAV: crafted sticky bar, compacts + gains depth on scroll ---------- */
.site-header {
  background: rgba(249, 248, 244, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(249, 248, 244, 0.92);
  border-bottom-color: var(--line-cool);
  box-shadow:
    0 1px 0 rgba(199, 164, 104, 0.2),
    0 8px 24px rgba(29, 55, 68, 0.06);
}
.nav {
  height: 72px;
  transition: height var(--dur-2) var(--ease);
}
.site-header.is-scrolled .nav {
  height: 64px;
}

.brand__logo {
  height: 64px;
  filter: saturate(1.05);
  transition:
    height var(--dur-2) var(--ease),
    opacity var(--dur-1) var(--ease);
}
.site-header.is-scrolled .brand__logo {
  height: 54px;
}
.brand:hover .brand__logo {
  opacity: 0.85;
}
@media (max-width: 720px) {
  .brand__logo {
    height: 52px;
  }
  .site-header.is-scrolled .brand__logo {
    height: 48px;
  }
}

.nav__links {
  gap: 4px;
}
.nav__links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  transition:
    background var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-soft);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav__links a:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  text-decoration: none;
}
.nav__links a:hover::after {
  transform: scaleX(0.55);
}
.nav__links a.is-active {
  color: var(--blue-700);
  background: transparent;
}
.nav__links a.is-active::after {
  transform: scaleX(1);
}
.nav__links a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.nav__cta .btn--primary {
  box-shadow:
    0 2px 8px rgba(70, 124, 153, 0.28),
    var(--shadow-inset-top);
  font-weight: 700;
}
.nav__cta .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue), var(--shadow-inset-top);
}

@media (max-width: 720px) {
  .nav.is-open .nav__links {
    top: 72px; /* sit flush under the 72px mobile bar */
    align-items: stretch; /* full-width rows, not centered text */
    background: var(--cream);
    border-top: 1px solid var(--line-cool);
    border-bottom: 1px solid var(--line-cool);
    box-shadow: var(--shadow-md);
    padding: 12px;
    gap: 2px;
  }
  .nav.is-open .nav__links a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 1.02rem;
  }
  .nav.is-open .nav__links a:hover,
  .nav.is-open .nav__links a.is-active {
    background: var(--blue-50);
  }
  .nav.is-open .nav__links a::after {
    display: none;
  }
}

/* ---------- FORMS: focus ring consistency ---------- */
.input:focus,
.select:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: var(--ring);
}

/* ---------- REVEAL: visible by default, motion is an enhancement ---------- */
/* DEFAULT fully visible -- never gate content on JS/motion. */
.reveal {
  opacity: 1;
  transform: none;
}
/* Armed only when JS proves it can drive the animation (.js-reveal-ready on <html>). */
.js-reveal-ready .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-4) var(--ease-out),
    transform var(--dur-4) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 {
  transition-delay: 0.08s;
}
.reveal-delay-2 {
  transition-delay: 0.14s;
}
.reveal-delay-3 {
  transition-delay: 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .reveal:not(.is-in) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- SOLD listings: kept as activity proof, visually de-emphasized ---------- */
.badge--sold {
  background: var(--surface-2, var(--stone));
  color: var(--ink-3);
  border: 1px solid var(--line-cool, var(--line));
}
.listing--sold {
  opacity: 0.74;
}
.listing--sold .listing__title {
  color: var(--ink-2);
}
.listing--sold .listing__price {
  text-decoration: line-through;
  color: var(--ink-3);
}
.listing__sold-note {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ---------- Cemetery-name autocomplete (shared: sell + advertise forms) ---------- */
.cem-typeahead {
  position: relative;
}
.cem-typeahead__hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}
.cem-typeahead__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  margin-top: 4px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line-cool, var(--line));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg, var(--shadow));
  padding: 6px;
}
.cem-typeahead__list[hidden] {
  display: none;
}
.cem-typeahead__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.3;
}
.cem-typeahead__item:hover,
.cem-typeahead__item:focus {
  background: var(--blue-50, var(--green-100));
  outline: none;
}
.cem-typeahead__item b {
  font-weight: 700;
  color: var(--blue-900, var(--green-900));
}
.cem-typeahead__item span {
  color: var(--ink-3);
}
.cem-typeahead__empty {
  padding: 12px;
  font-size: 0.86rem;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- File upload inputs (sell photos, cemetery spreadsheets) ---------- */
.file-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-2);
  background: var(--white);
  border: 1.5px dashed var(--line-strong, var(--line));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
}
.file-input::file-selector-button {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--grad-brand, var(--blue-600));
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  margin-right: 12px;
  cursor: pointer;
}
.file-input:hover {
  border-color: var(--blue-400, var(--blue-500));
}
.file-input:focus-visible {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: var(--ring, 0 0 0 3px var(--blue-100));
}

/* Home hero search suggestions drop UP (the search sits at the map's bottom) */
.hero__map-search .cem-typeahead__list {
  bottom: calc(100% + 8px);
  top: auto;
}

/* YouTube channel embed (home + about): responsive 16:9, framed like a card */
.yt-embed {
  position: relative;
  max-width: 860px;
  margin: var(--space-7) auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 10px 30px rgba(20, 40, 70, 0.18));
  background: var(--blue-900);
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Timed guide popup (ported from the old site's OptiMonk campaign) */
.gpop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.gpop.is-in {
  opacity: 1;
}
.gpop__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 50, 0.55);
}
.gpop__card {
  position: relative;
  width: min(380px, 92vw);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(10, 25, 45, 0.35);
  padding: 28px 26px 26px;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.25s ease-out;
}
.gpop.is-in .gpop__card {
  transform: none;
}
.gpop__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}
.gpop__close:hover {
  color: var(--blue-900);
}
.gpop__logo {
  width: 50px;
  height: auto;
  margin-bottom: 8px;
}
.gpop__title {
  font-family: var(--font-serif);
  color: var(--blue-900);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 8px;
}
.gpop__sub {
  color: var(--ink-2, var(--ink-3));
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 16px;
}
.gpop__form .input {
  width: 100%;
  margin-bottom: 10px;
}
.gpop__roles {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 4px 0 14px;
  font-size: 0.95rem;
  color: var(--blue-900);
}
.gpop__roles label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.gpop__cta {
  width: 100%;
  justify-content: center;
}
.gpop__status {
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--accent, #b4582c);
}
@media (prefers-reduced-motion: reduce) {
  .gpop,
  .gpop__card {
    transition: none;
  }
}

/* Honeypot field: components.js renders forms (guide popup) on pages that do
   not load a page-level form stylesheet, so the rule lives here too. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Billing toggle (Monthly/Yearly) + live price calculator ---------------
   Shared by sell.html (#plan card) and advertise.html (pricing calculator).
   Lives in base.css because both pages load it. */
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 auto var(--space-4);
  background: var(--blue-50, #eef2f6);
  border: 1px solid var(--blue-100, #d9e2ec);
  border-radius: 999px;
}
.billing-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  color: var(--ink-2, #43505c);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.billing-toggle__btn.is-active {
  background: var(--blue-700, #33536e);
  color: #fff;
}
.billing-toggle__btn:focus-visible {
  outline: 2px solid var(--gold, #b98a2e);
  outline-offset: 2px;
}

/* Advertise-page calculator card */
.price-calc {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.price-calc__plots {
  max-width: 220px;
  margin: 0 auto var(--space-3);
  text-align: center;
}
.price-calc__price {
  font-family: var(--font-serif, serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--blue-900, #1f3345);
  margin: var(--space-2) 0 0;
}
.price-calc__per {
  display: block;
  font-family: var(--font-sans, sans-serif);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink-2, #43505c);
  margin-top: 2px;
}
.price-calc__note {
  margin-top: var(--space-3);
  color: var(--ink-2, #43505c);
  font-size: 0.95rem;
}
