/* Heavenly Gates public site. Tokens live in tokens.css.
   Layout idea: calm paper pages, one "night sky" hero with the glowing gate,
   and every pet photo framed in the gate's arch. */

/* ---------- Base ---------- */
:root { --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 13.9 10.1 24 12 13.9 13.9 12 24 10.1 13.9 0 12 10.1 10.1Z'/%3E%3C/svg%3E"); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
p { margin: 0; }
p + p { margin-top: 1em; }
a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--glow); color: var(--midnight); }
.visually-hidden {
  position: absolute !important; 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: 1rem; top: -4rem; z-index: 100;
  background: var(--color-primary); color: var(--color-on-primary);
  font-family: var(--font-ui); font-weight: 500; padding: 0.7rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.measure { max-width: 64ch; }
.lead { font-size: clamp(1.2rem, 1.6vw, 1.35rem); line-height: 1.6; }
.muted { color: var(--color-muted); }
.ui { font-family: var(--font-ui); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.7rem 1.3rem;
  font-family: var(--font-ui); font-size: 1.02rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2;
  border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { border-color: currentColor; color: var(--color-text); background: transparent; }
.btn-outline:hover { background: var(--color-surface-2); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; flex: none; text-decoration: none; margin-right: auto; }
.brand { gap: 0.7rem; color: var(--color-text); }
.brand-mark { width: 43px; height: 48px; flex: none; color: var(--color-text); }
.brand-text { display: grid; gap: 0.32rem; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-family: var(--font-ui); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-accent); white-space: nowrap; padding-left: 0.08em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.site-nav a {
  display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: 1.02rem; font-weight: 500; color: var(--color-text); text-decoration: none;
}
.site-nav a:hover { background: var(--color-surface-2); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.header-call { white-space: nowrap; }
.header-call .short { display: none; }
.nav-toggle {
  display: none; align-items: center; gap: 0.45rem; min-height: 48px; padding: 0.5rem 0.9rem;
  font-family: var(--font-ui); font-size: 1rem; font-weight: 500; color: var(--color-text);
  background: transparent; border: 1.5px solid var(--color-rule); border-radius: 999px; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; min-height: 68px; }
  .site-nav { order: 3; flex-basis: 100%; display: none; padding-bottom: 0.75rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 0.8rem 0.4rem; font-size: 1.1rem; border-bottom: 1px solid var(--color-border); border-radius: 0; }
}
@media (max-width: 560px) {
  .header-call .long { display: none; }
  .header-call .short { display: inline; }
  .header-call, .nav-toggle { padding-inline: 0.85rem; }
}

/* ---------- Hero (night sky) ---------- */
.hero { background: var(--hero-bg); color: var(--hero-fg); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent 5%, var(--hero-horizon) 50%, transparent 95%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding-block: clamp(44px, 7vw, 96px); }
.hero h1 { color: var(--hero-fg); max-width: 14ch; font-size: clamp(2.5rem, 5.2vw, 4.1rem); line-height: 1.06; }
.hero .lead { color: var(--hero-muted); margin-top: 1.25rem; max-width: 44ch; text-wrap: pretty; }
.btn-hero { background: var(--hero-btn-bg); color: var(--hero-btn-fg); }
.btn-hero:hover { background: var(--hero-btn-hover); }
.btn-hero-outline { border-color: var(--hero-outline); color: var(--hero-fg); background: transparent; }
.btn-hero-outline:hover { border-color: var(--hero-fg); background: var(--hero-outline-hover); }
.hero-facts { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; font-family: var(--font-ui); font-size: 1rem; color: var(--hero-muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.hero-facts svg { width: 18px; height: 18px; flex: none; color: var(--hero-accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-gate { justify-self: center; width: min(100%, 380px); }
.gate-art .gate-line { color: var(--gate-line); }
.gate-art .gate-star { color: var(--gate-star); }
.gate-art .gate-pets { color: var(--gate-pets); }
.gate-art .ground-a { stop-color: var(--gate-ground); }
.gate-art .ground-b { stop-color: var(--gate-ground); stop-opacity: 0; }
.gate-art .halo-a { stop-color: var(--gate-halo); stop-opacity: var(--gate-halo-op); }
.gate-art .halo-b { stop-color: var(--gate-halo); stop-opacity: 0; }
.gate-art .light-a { stop-color: var(--gate-light-a); }
.gate-art .light-b { stop-color: var(--gate-light-b); stop-opacity: .92; }
.gate-art .light-c { stop-color: var(--gate-light-c); stop-opacity: var(--gate-light-c-op); }
.hero-gate svg { width: 100%; height: auto; overflow: visible; }
.gate-glow { animation: dawn 3.2s ease-out both; transform-origin: 100px 110px; }
.gate-star { animation: twinkle 3.2s ease-out both; transform-origin: 100px 72px; }
@keyframes dawn { from { opacity: .25; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 40% { opacity: .2; transform: scale(.6); } 100% { opacity: 1; transform: none; } }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-gate { width: min(70%, 260px); order: -1; justify-self: start; margin-bottom: -0.5rem; }
}

/* ---------- Page heading (inner pages) ---------- */
.page-head { background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); position: relative; overflow: hidden; }
.page-head-inner { padding-block: clamp(40px, 6vw, 76px); position: relative; }
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-top: 1rem; max-width: 58ch; color: var(--color-muted); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-alt { background: var(--color-surface-2); border-block: 1px solid var(--color-border); }
.section-head { display: grid; gap: 0.9rem; margin-bottom: clamp(28px, 4vw, 48px); max-width: 62ch; }
.section-head p { color: var(--color-muted); }
.section-foot { margin-top: clamp(28px, 4vw, 44px); display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Three situations: at home / at the vet / planning ahead */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-rule); }
.path { padding: 1.6rem 1.6rem 0.4rem 0; display: grid; gap: 0.7rem; align-content: start; }
.path + .path { padding-left: 1.6rem; border-left: 1px solid var(--color-rule); }
.path h3 { display: flex; align-items: center; gap: 0.6rem; }
.path h3 svg { width: 26px; height: 26px; color: var(--color-accent); flex: none; }
.path .phone { font-family: var(--font-ui); font-weight: 600; white-space: nowrap; }
@media (max-width: 860px) {
  .paths { grid-template-columns: minmax(0, 1fr); }
  .path, .path + .path { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--color-rule); }
}

/* Memorial packages: a quiet menu of three rows */
.packages { border-top: 1px solid var(--color-rule); }
.package {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.75rem clamp(24px, 4vw, 56px); align-items: baseline;
  padding-block: clamp(24px, 3.4vw, 40px); border-bottom: 1px solid var(--color-rule);
}
.package h3 { font-size: clamp(1.75rem, 2.6vw, 2.2rem); font-weight: 500; }
.package .tier { font-family: var(--font-ui); font-weight: 500; font-size: 1rem; color: var(--color-accent); margin-top: 0.35rem; }
.package-desc { color: var(--color-muted); max-width: 34ch; }
.package-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.package-options li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.package-options li::before {
  content: ""; width: 13px; height: 13px; transform: translateY(1px); background: var(--gold);
  -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
}
@media (max-width: 860px) {
  .package { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .package-desc { max-width: none; }
  .package-options { margin-top: 0.4rem; }
}
.packages-note { margin-top: clamp(24px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }
.packages-note p { max-width: 60ch; color: var(--color-muted); }

/* What happens next: a path from the first call to coming home */
.journey { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.journey-intro { display: grid; gap: 1.1rem; justify-items: start; position: sticky; top: 7.5rem; }
.journey-intro p { color: var(--color-muted); max-width: 40ch; }
.journey-intro .btn { margin-top: 0.4rem; }
.journey-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; }
.journey-steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); padding-bottom: clamp(28px, 3.6vw, 44px); position: relative; }
/* Path segment from each marker down to the next; the last one warms to gold as it reaches home */
.journey-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--color-rule);
}
.journey-steps li:nth-last-child(2)::before { background: linear-gradient(to bottom, var(--color-rule), var(--gold)); }
.journey-steps li:last-child { padding-bottom: 0; }
.journey-marker {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--color-surface-2); border: 1.5px solid var(--color-rule);
  font-family: var(--font-display); font-size: 1.55rem; line-height: 1; color: var(--color-accent);
  font-variant-numeric: lining-nums;
}
.journey-text { display: grid; gap: 0.45rem; padding-top: 0.75rem; }
.journey-text h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.005em; }
.journey-text p { color: var(--color-muted); max-width: 52ch; }
.journey-home .journey-marker { width: 64px; height: 64px; margin-left: -4px; background: var(--midnight); border: 2px solid var(--gold); }
.journey-home .badge-icon { width: 46px; height: 46px; transform: translateY(-1px); }
.journey-home .journey-text { padding-top: 1rem; }
@media (max-width: 860px) {
  .journey { grid-template-columns: minmax(0, 1fr); }
  .journey-intro { position: static; }
}
@media (max-width: 480px) {
  .journey-steps li:not(:last-child)::before { left: 21px; top: 44px; }
  .journey-steps li { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .journey-marker { width: 44px; height: 44px; font-size: 1.3rem; }
  .journey-home .journey-marker { width: 52px; height: 52px; margin-left: -4px; }
  .journey-home .badge-icon { width: 36px; height: 36px; }
  .journey-text { padding-top: 0.45rem; }
  .journey-home .journey-text { padding-top: 0.75rem; }
}

/* Vet partners */
.vets-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.vets { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 2rem; }
.vets li { break-inside: avoid; padding: 0.55rem 0; border-bottom: 1px solid var(--color-border); font-size: 1.08rem; }
@media (max-width: 860px) { .vets-wrap { grid-template-columns: minmax(0, 1fr); } }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.review { margin: 0; display: grid; gap: 1.1rem; align-content: start; border-top: 1px solid var(--color-rule); padding-top: 1.4rem; }
.review blockquote { margin: 0; font-size: 1.2rem; line-height: 1.6; position: relative; padding-top: 2.6rem; }
.review blockquote::before { content: "\201C"; position: absolute; top: -0.5rem; left: -0.15rem; font-family: var(--font-display); font-size: 4.8rem; line-height: 1; color: var(--gold); }
.review figcaption { font-family: var(--font-ui); font-weight: 500; font-size: 1rem; color: var(--color-text); }
.review figcaption span { color: var(--color-muted); font-weight: 400; }
@media (max-width: 900px) { .reviews { grid-template-columns: minmax(0, 1fr); max-width: 64ch; } }

/* Arch frame: every pet photo sits in the gate's arch */
.arch { display: block; padding: 5px; border: 1px solid var(--color-rule); border-radius: 999px 999px 10px 10px; background: var(--color-surface); }
.arch img, .arch .arch-fill { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 6px 6px; background: var(--color-surface-2); }
.arch .arch-fill { display: grid; place-items: center; color: var(--color-muted); }
.arch .arch-fill svg { width: 46%; height: auto; opacity: .55; }

.tribute-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: clamp(18px, 2.4vw, 30px) clamp(14px, 2vw, 24px); }
.tribute-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .tribute-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tribute-card {
  display: grid; gap: 0.7rem; width: 100%; padding: 0; margin: 0; text-align: center;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: none; border-radius: 12px;
}
.tribute-card .name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.tribute-card:hover .arch { border-color: var(--gold); }
.tribute-card:hover .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.tribute-card:focus-visible { outline-offset: 6px; }
.skeleton .arch-fill { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* Facebook */
.fb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(28px, 5vw, 64px); align-items: start; }
.fb-frame { width: 100%; max-width: 500px; min-height: 640px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); overflow: hidden; display: grid; place-items: center; justify-self: end; }
.fb-frame iframe { display: block; width: 100%; height: 700px; border: 0; }
.fb-frame:has(iframe) { display: block; }
.fb-after { padding: 0.8rem 1rem; border-top: 1px solid var(--color-border); font-family: var(--font-ui); font-size: 0.98rem; }
.fb-after a { display: inline-flex; align-items: center; gap: 0.4rem; }
.fb-after svg { width: 18px; height: 18px; }
.fb-fallback { padding: 2rem; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.fb-photo { margin: 1.8rem 0 0; border-radius: var(--radius); overflow: hidden; }
.fb-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.fb-photo figcaption { font-size: 0.95rem; color: var(--color-muted); padding-top: 0.6rem; }
@media (max-width: 900px) { .fb-wrap { grid-template-columns: minmax(0, 1fr); } .fb-frame { justify-self: center; } }

/* Visit / contact details */
.visit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.visit h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.visit address { font-style: normal; }
.hours { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1.2rem; }
.hours dt { font-family: var(--font-ui); font-weight: 500; }
.hours dd { margin: 0; }
.big-phone { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.2; text-decoration: none; white-space: nowrap; }
.big-phone:hover { text-decoration: underline; }
@media (max-width: 860px) { .visit { grid-template-columns: minmax(0, 1fr); } }

/* Two-column text + figure */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split figure { margin: 0; }
.split figure img { width: 100%; border-radius: var(--radius); }
.split figcaption { font-size: 0.95rem; color: var(--color-muted); padding-top: 0.6rem; }
.split .arch img { border-radius: 999px 999px 6px 6px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split.reverse > :first-child { order: 0; } }
.prose { display: grid; gap: 1rem; }
.prose h2 { margin-bottom: 0.2rem; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.4rem; }

/* FAQ */
.faq { border-top: 1px solid var(--color-rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--color-rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq .answer { padding: 0 0 1.3rem; max-width: 66ch; display: grid; gap: 0.8rem; }

/* Team */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.team li { display: grid; gap: 0.9rem; align-content: start; }
.team .arch { max-width: 300px; }
.team h3 { font-size: 1.4rem; }
.team .role { font-family: var(--font-ui); font-weight: 500; color: var(--color-accent); font-size: 1rem; margin-top: 0.15rem; }
.team p.bio { font-size: 1.05rem; color: var(--color-muted); }
.team.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .team, .team.small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .team, .team.small { grid-template-columns: minmax(0, 1fr); } }

/* Memorial wall tools */
.wall-tools { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; justify-content: space-between; margin-bottom: clamp(24px, 3vw, 40px); }
.search { display: grid; gap: 0.4rem; flex: 1 1 320px; max-width: 460px; }
.search-row { display: flex; gap: 0.5rem; }
.search-row input { flex: 1; min-width: 0; }
.wall-status { font-family: var(--font-ui); color: var(--color-muted); font-size: 1rem; }
.wall-more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }

/* Forms */
.field { display: grid; gap: 0.4rem; }
.field label, .search label { font-family: var(--font-ui); font-weight: 500; font-size: 1rem; }
.field .hint { font-size: 0.95rem; color: var(--color-muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem;
  font: inherit; font-size: 1.08rem; line-height: 1.4; color: var(--color-text);
  background: var(--color-surface); border: 1.5px solid var(--color-input-border); border-radius: var(--radius-sm);
}
textarea { min-height: 170px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-text); }
[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { color: var(--color-danger); font-family: var(--font-ui); font-size: 0.98rem; font-weight: 500; }
.req { color: var(--color-muted); font-weight: 400; }
.form { display: grid; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-family: var(--font-ui); font-size: 1.02rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); border: 1.5px solid; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--color-success); border-color: var(--color-success); }
.form-status.err { color: var(--color-danger); border-color: var(--color-danger); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-aside { display: grid; gap: 2rem; }
.contact-aside h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.map { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: var(--color-surface-2); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }

/* Events */
.events { display: grid; gap: clamp(40px, 6vw, 72px); }
.event { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--color-rule); }
.event-date { font-family: var(--font-ui); font-weight: 500; color: var(--color-accent); }
.event-body { display: grid; gap: 1rem; min-width: 0; }
.event-body p { max-width: 66ch; }
.event-photos { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.event-photos button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; }
.event-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s ease; }
.event-photos button:hover img { transform: scale(1.04); }
@media (max-width: 760px) { .event { grid-template-columns: minmax(0, 1fr); } }

/* Dialogs (tribute, photo viewer) */
dialog.sheet {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); color: var(--color-text);
  box-shadow: 0 30px 80px rgba(10, 16, 30, .35);
}
dialog.sheet::backdrop { background: rgba(14, 20, 36, .62); }
.sheet-inner { padding: clamp(20px, 4vw, 40px); display: grid; gap: 1.2rem; overflow: auto; max-height: calc(100dvh - 34px); }
.sheet-close {
  position: sticky; top: 0; justify-self: end; margin-bottom: -3rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0.4rem 0.9rem;
  font-family: var(--font-ui); font-size: 1rem; font-weight: 500; color: var(--color-text);
  background: var(--color-surface); border: 1.5px solid var(--color-rule); border-radius: 999px; cursor: pointer;
}
.tribute-detail { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.tribute-detail h2 { font-size: clamp(2rem, 4vw, 2.6rem); padding-right: 5rem; }
.tribute-detail .verse { font-style: italic; font-size: 1.15rem; line-height: 1.6; border-left: 2px solid var(--gold); padding-left: 1rem; white-space: pre-line; }
.tribute-detail .message { white-space: pre-line; }
@media (max-width: 620px) { .tribute-detail { grid-template-columns: minmax(0, 1fr); } .tribute-detail .arch { max-width: 220px; } }
.viewer img { width: 100%; max-height: 72dvh; object-fit: contain; border-radius: var(--radius-sm); background: var(--color-surface-2); }
.viewer-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-ui); }

/* Notices */
.notice { padding: 1rem 1.2rem; border: 1px solid var(--color-rule); border-radius: var(--radius); background: var(--color-surface); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-2); color: var(--on-night-muted); padding-block: clamp(48px, 7vw, 80px) 28px; }
.site-footer a { color: var(--on-night); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); }
.footer-brand p { margin-top: 1.1rem; max-width: 34ch; font-size: 1.05rem; }
.brand-footer { margin: 0; gap: 0.85rem; color: var(--on-night); text-decoration: none; justify-self: start; display: inline-flex; }
.brand-footer .brand-mark { width: 54px; height: 60px; }
.brand-footer .brand-name { font-size: 1.85rem; color: var(--on-night); }
.brand-footer .brand-sub { font-size: 0.8rem; color: var(--night-accent); }
.site-footer h2 { font-family: var(--font-ui); font-size: 1rem; font-weight: 500; color: var(--night-accent); margin-bottom: 0.8rem; letter-spacing: .01em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer address { font-style: normal; }
.footer-legal { margin-top: clamp(36px, 5vw, 56px); padding-top: 20px; border-top: 1px solid rgba(243, 235, 221, .16); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-family: var(--font-ui); font-size: 0.95rem; }
.site-footer :focus-visible { outline-color: var(--glow); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle, .hero-gate, .fb-wrap, .skip-link { display: none !important; }
  .hero { background: none; color: #000; }
  .hero h1, .hero .lead, .hero-facts { color: #000; }
}
.header-call .num { font-weight: 400; opacity: .9; margin-left: .2em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.team-subhead { margin: clamp(48px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); font-size: 1.6rem; }
@media (min-width: 1021px) {
  .site-nav { order: 1; }
  .header-call { order: 2; margin-left: 0.5rem; }
}
address { font-style: normal; }
.contact-form-col { display: grid; gap: 0.6rem; align-content: start; }
.contact-form-col .form { margin-top: 1rem; }
@media (max-width: 480px) {
  .header-inner { gap: 0.5rem; }
  .nav-toggle { padding: 0; width: 48px; justify-content: center; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero-gate { width: min(46%, 180px); }
}
@media (max-width: 360px) {
  .header-call { padding-inline: 0.7rem; font-size: 0.95rem; }
  .header-call svg { display: none; }
}

/* Events grouped into coming up / past */
.event-groups { display: grid; gap: clamp(56px, 8vw, 96px); }
.event-group { display: grid; gap: clamp(20px, 3vw, 32px); }
.event-group-title { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.event h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.event.is-upcoming .event-date { color: var(--color-text); font-size: 1.08rem; }
.event.is-upcoming { border-top-color: var(--gold); }

/* Home: next events beside the Facebook feed */
.upcoming { margin-top: 1.8rem; padding: 1.2rem 1.4rem; border: 1px solid var(--color-rule); border-radius: var(--radius); display: grid; gap: 0.8rem; }
.upcoming h3 { font-size: 1.3rem; }
.upcoming ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.upcoming li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.upcoming .when { font-family: var(--font-ui); font-weight: 500; color: var(--color-accent); }
.upcoming > a { font-family: var(--font-ui); font-weight: 500; justify-self: start; }
@media (max-width: 420px) { .upcoming li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }

/* Grid containers space their own children; drop the default paragraph margin inside them */
:is(.prose, .event-body, .section-head, .answer, .journey-intro, .journey-text, .contact-form-col, .path, .upcoming) > p + p { margin-top: 0; }

/* Situations: action link pinned to the bottom of each column */
.path { grid-template-rows: auto 1fr auto; }
.path-action { font-family: var(--font-ui); font-weight: 500; font-size: 1.02rem; display: inline-flex; align-items: center; gap: 0.45rem; justify-self: start; margin-top: 0.3rem; }
.path-action svg { width: 18px; height: 18px; }

/* Loading placeholders: a faint star in each gate so empty frames don't read as headstones */
.skeleton .arch-fill { position: relative; }
.skeleton .arch-fill::after {
  content: ""; position: absolute; left: 50%; top: 32%; width: 22px; height: 22px; margin-left: -11px;
  background: var(--color-rule); -webkit-mask: var(--sparkle) center / contain no-repeat; mask: var(--sparkle) center / contain no-repeat;
}
.field { align-content: start; }
.vets .town { display: block; font-family: var(--font-ui); font-size: 0.9rem; color: var(--color-muted); margin-top: 0.1rem; }

/* ---------- Light / dark switch ---------- */
.nav-theme { display: flex; align-items: center; }
.nav-theme[hidden] { display: none; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0 0.35rem;
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--font-ui); font-size: 1.02rem; font-weight: 500; color: var(--color-text);
}
.theme-switch {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between;
  width: 62px; height: 32px; padding: 0 7px; border-radius: 999px;
  background: var(--color-surface-2); border: 1.5px solid var(--color-input-border);
}
.theme-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--color-primary); transition: transform .2s ease;
}
.theme-toggle[aria-pressed="true"] .theme-switch::before { transform: translateX(30px); }
.theme-switch svg { position: relative; z-index: 1; width: 15px; height: 15px; color: var(--color-muted); transition: color .2s ease; }
.theme-toggle[aria-pressed="false"] .theme-switch svg:first-child,
.theme-toggle[aria-pressed="true"] .theme-switch svg:last-child { color: var(--color-on-primary); }
@media (min-width: 1021px) {
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-theme { margin-left: 0.4rem; }
}
@media (max-width: 1020px) {
  .nav-theme button { width: 100%; justify-content: space-between; padding: 0.8rem 0.4rem; border-radius: 0; font-size: 1.1rem; }
}
/* Tight desktop widths: drop the number from the call button so the header stays on one row */
@media (min-width: 1021px) and (max-width: 1180px) { .header-call .num { display: none; } }

/* Header brand at smaller widths: keep "Pet Cremation" readable (never below ~10px) */
@media (max-width: 1020px) {
  .brand-mark { width: 39px; height: 44px; }
  .brand-name { font-size: 1.45rem; }
}
@media (max-width: 480px) {
  .brand { gap: 0.5rem; }
  .brand-mark { width: 32px; height: 36px; }
  .brand-name { font-size: 1.2rem; }
  .brand-sub { font-size: 0.64rem; letter-spacing: 0.18em; }
  .header-call .short { font-size: 0.98rem; }
}
@media (max-width: 374px) {
  .brand-name { font-size: 1.08rem; }
  .brand-sub { font-size: 0.6rem; letter-spacing: 0.14em; }
}

@media (max-width: 340px) {
  .header-inner { gap: 0.3rem; }
  .brand { gap: 0.4rem; }
  .brand-mark { width: 28px; height: 32px; }
  .brand-name { font-size: 1rem; }
  .header-call { padding-inline: 0.55rem; }
  .nav-toggle { width: 44px; }
}
