/* Complete Farewell Services
   Layout: single calm reading column (max ~68ch), navy header, gold used only for
   the main action and small rules. Fixed Call / WhatsApp bar on phones. */

:root {
  --navy: #14254a;
  --navy-soft: #2a3d66;
  --gold: #b08a2e;
  --gold-soft: #f3ecdb;
  --ink: #1c2230;
  --muted: #4c5568;
  --line: #d9dde6;
  --paper: #ffffff;
  --mist: #f4f6fa;
  --focus: #1f6feb;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;

  --text: 1.125rem;      /* 18px base for older readers */
  --small: 1rem;
  --h3: 1.3rem;
  --h2: 1.65rem;
  --h1: clamp(1.9rem, 5vw, 2.6rem);

  --radius: 10px;
  --gutter: 1rem;
  --measure: 68ch;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text);
  line-height: 1.65;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); /* room for phone bar */
}

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

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

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

h1, h2, h3 { color: var(--navy); line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-family: var(--font-display); font-size: var(--h1); font-weight: 600; letter-spacing: 0.01em; }
h2 { font-family: var(--font-display); font-size: var(--h2); font-weight: 600; }
h3 { font-size: var(--h3); font-weight: 700; }
p { margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.brand img { width: 48px; height: 48px; border-radius: 6px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name strong { font-family: var(--font-display); color: var(--navy); font-size: 1.1rem; letter-spacing: 0.04em; }
.brand-name span { font-size: 0.8rem; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  font: inherit; font-size: var(--small); font-weight: 600;
  background: var(--paper); color: var(--navy);
  border: 2px solid var(--navy); border-radius: var(--radius);
  padding: 0.45rem 0.9rem; min-height: 44px; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: var(--small); padding: 0.5rem 0; display: inline-block; }
.site-nav a[aria-current="page"] { color: var(--gold); border-bottom: 2px solid var(--gold); }
.site-nav .nav-urgent a { color: #fff; background: var(--navy); padding: 0.5rem 0.9rem; border-radius: var(--radius); }
.site-nav .nav-urgent a:hover { background: var(--navy-soft); color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0; padding-block: 0.5rem; }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.85rem 0; }
  .site-nav .nav-urgent a { margin-block: 0.6rem; text-align: center; }
}

/* Sections */
main { display: block; }
.section { padding-block: 3rem; }
.section-mist { background: var(--mist); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.75rem; }
.lede { font-size: 1.25rem; color: var(--muted); max-width: var(--measure); }
.eyebrow { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.rule { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 0; }

/* Hero */
.hero { padding-block: 2.5rem 3rem; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-logo { max-width: 320px; justify-self: center; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: var(--text);
  min-height: 52px; padding: 0.7rem 1.4rem;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #95741f; color: #fff; }
.btn-outline { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--mist); color: var(--navy); }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Urgent panel */
.urgent {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 1.75rem; display: grid; gap: 1rem;
}
.urgent h2 { color: #fff; }
.urgent p { color: #dfe5f2; }

/* Service list */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service-grid > * { min-width: 0; }
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }
.service {
  border-top: 3px solid var(--gold);
  background: var(--paper);
  padding: 1.1rem 0.1rem 0.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.service p { color: var(--muted); font-size: var(--small); }

/* Steps (real sequence, so numbered) */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: start;
}
.steps > li::before {
  content: counter(step);
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: var(--navy);
  border: 2px solid var(--gold); background: var(--gold-soft);
}
.steps > li > div { min-width: 0; padding-top: 0.2rem; }
.steps strong { color: var(--navy); }

/* Notes */
.note {
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.note-title { font-weight: 700; color: var(--navy); margin-bottom: 0.25rem; }
.note ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }

.plain-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }

/* Question flow */
.flow {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; background: var(--paper);
}
.flow fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.flow legend { font-size: var(--h3); font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; padding: 0; }
.choice {
  display: flex; align-items: center; gap: 0.8rem;
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 1rem; min-height: 56px; cursor: pointer;
}
.choice:hover { border-color: var(--navy-soft); }
.choice input { width: 1.4rem; height: 1.4rem; accent-color: var(--navy); flex: none; }
.choice:has(input:checked) { border-color: var(--navy); background: var(--mist); }
.flow-progress { font-size: var(--small); color: var(--muted); margin-bottom: 0.75rem; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.result-tag {
  display: inline-block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy); background: var(--gold-soft);
  padding: 0.25rem 0.6rem; border-radius: 999px;
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.contact-grid > * { min-width: 0; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 0.5rem; }
.contact-value { font-size: 1.35rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; word-break: break-word; }

/* Footer */
.site-footer { background: var(--navy); color: #dfe5f2; padding-block: 2.5rem; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
.footer-grid > * { min-width: 0; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.footer-small { font-size: 0.9rem; color: #b9c3da; margin-top: 1.5rem; border-top: 1px solid #2f4170; padding-top: 1rem; }

/* Fixed phone bar */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: none; gap: 0.5rem;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
}
.call-bar .btn { flex: 1; min-height: 52px; padding-inline: 0.5rem; }
@media (max-width: 860px) { .call-bar { display: flex; } }
@media (min-width: 861px) { body { padding-bottom: 0; } }

.placeholder { background: #fff3c4; outline: 1px dashed #b08a2e; padding: 0 0.2rem; }

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

/* Death type guides */
.death-type { scroll-margin-top: 90px; border-top: 1px solid var(--line); padding-top: 2rem; }
.death-type.is-match { border-top: 4px solid var(--gold); }
.death-type.is-match .type-label::after { content: " · Your situation"; color: var(--gold); }
.type-label { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.toc a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem; text-decoration: none; font-size: var(--small); min-height: 44px; line-height: 1.6; }
.toc a:hover { border-color: var(--navy); }
