/* One Last Thing — site styles
   Plain CSS, mobile first. Colours and sizes are set once below as custom properties. */

/* ---------- Fonts (self-hosted, see assets/fonts) ---------- */
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-latin-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #FAF7F2;          /* warm off-white */
  --surface: #FFFFFF;
  --tint: #EDF2EE;        /* pale sage panel */
  --text: #2E2B28;        /* warm charcoal */
  --muted: #5F5A54;
  --sage: #5C7765;        /* accent, large text and decoration */
  --sage-deep: #4A6354;   /* links and buttons (AA on bg and tint) */
  --sage-deeper: #3B5044;
  --line: #E4DED4;
  --focus: #2E2B28;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 65ch;
  --wide: 72rem;
  --gutter: 1.25rem;
  --space: clamp(3rem, 2rem + 4vw, 5.5rem);
  --callbar: 0px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.65;
  padding-bottom: var(--callbar);
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 1.35rem + 1.4vw, 2.35rem); }
h3 { font-size: clamp(1.3rem, 1.2rem + 0.5vw, 1.55rem); }

p, ul, ol, dl, blockquote, figure { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }

a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--sage-deeper); text-decoration-thickness: 2px; }

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

strong { font-weight: 600; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Placeholders for content Emma still needs to supply */
mark.todo {
  background: #FFF3A8;
  color: var(--text);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #E6D24A;
  font-style: normal;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose { max-width: var(--measure); }
.prose-center { max-width: var(--measure); margin-inline: auto; }
.center { text-align: center; }

.section { padding-block: var(--space); }
.section--tint { background: var(--tint); }
.section--white { background: var(--surface); }
.section + .section:not(.section--tint):not(.section--white) { padding-top: 0; }

.lead {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  line-height: 1.55;
  color: var(--text);
}
.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.9rem;
}
.muted { color: var(--muted); }

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
  .split--reverse > :first-child { order: 2; }
}

.grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 40rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 40rem) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}
.logo { display: inline-block; line-height: 0; border-radius: 4px; }
.logo img { height: 26px; width: auto; }
@media (min-width: 64rem) { .logo img { height: 32px; } }

.header-phone {
  display: none;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone span { color: var(--muted); font-weight: 400; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { width: 100%; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--sage-deep); border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { color: var(--sage-deep); border-bottom-color: var(--sage); font-weight: 600; }

/* With JavaScript: collapse the menu on small screens behind a button */
@media (max-width: 63.99rem) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0 0.25rem; }
  .js .site-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .js .site-nav li:last-child a { border-bottom: 0; }
  .js .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
}

@media (min-width: 64rem) {
  .site-header__inner { flex-wrap: nowrap; padding-block: 1.25rem; }
  .site-nav { width: auto; margin-left: auto; }
  .site-nav ul { gap: 0 1.5rem; }
  .header-phone { display: inline-block; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--sage-deep);
  background: var(--sage-deep);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--sage-deeper); border-color: var(--sage-deeper); color: #fff; }
.button--ghost { background: transparent; color: var(--sage-deep); }
.button--ghost:hover { background: var(--sage-deep); color: #fff; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " \2192"; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem); }
.hero h1 { margin-bottom: 0.5em; }
.hero .lead { max-width: 38em; }

.portrait {
  margin: 0;
  max-width: 22rem;
  margin-inline: auto;
}
.portrait__frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint);
  box-shadow: 0 1px 2px rgba(46, 43, 40, 0.06), 0 12px 32px -12px rgba(46, 43, 40, 0.25);
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait figcaption { margin-top: 0.75rem; font-size: 0.95rem; color: var(--muted); text-align: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.section--white .card { background: var(--bg); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

.route-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.route-card:hover {
  color: var(--text);
  border-color: var(--sage);
  box-shadow: 0 10px 28px -16px rgba(46, 43, 40, 0.35);
}
.route-card h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.65rem); margin: 0; }
.route-card p { margin: 0; color: var(--muted); }
.route-card .arrow-link { margin-top: auto; padding-top: 0.5rem; color: var(--sage-deep); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.section--white .steps > li { background: var(--bg); }
.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--sage-deep);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.steps h3 { margin-bottom: 0.35em; }
.steps p:last-child { margin-bottom: 0; }

/* Longer, stacked version of the steps */
.step-detail { border-top: 1px solid var(--line); padding-top: 2rem; margin-top: 2rem; }
.step-detail:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.step-detail .step-number {
  display: inline-grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--sage-deep);
  font-size: 1.05rem;
  font-weight: 600;
  vertical-align: 0.2em;
}

/* ---------- Poem-like lines (Emma's "One Last Thing" passage) ---------- */
.lines p { margin-bottom: 0.4em; }
.lines p:last-child { margin-bottom: 0; }
.lines .emphasis { font-family: var(--serif); font-size: 1.25em; color: var(--sage-deep); margin-top: 0.9em; }

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
  line-height: 1.45;
  color: var(--sage-deep);
  border-left: 3px solid var(--sage);
  padding-left: 1.25rem;
  margin: 2rem 0;
}

/* ---------- Images ---------- */
.image-panel {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

/* ---------- Testimonials ---------- */
.quote {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem 1.5rem;
  position: relative;
}
.quote::before {
  content: "\201C";
  position: absolute;
  top: -0.2rem; left: 1.1rem;
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
  color: var(--sage);
  opacity: 0.35;
}
.quote p { font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.quote footer { font-size: 0.95rem; color: var(--muted); }

/* ---------- Lists ---------- */
.tick-list { list-style: none; padding: 0; }
.tick-list li { position: relative; padding-left: 1.6rem; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem; top: 0.62em;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--sage);
}
@media (min-width: 40rem) { .tick-list--columns { columns: 2; column-gap: 2.5rem; } .tick-list--columns li { break-inside: avoid; } }

.jump-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.jump-list li + li { margin: 0; }
.jump-list a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-size: 1rem;
}
.jump-list a:hover { border-color: var(--sage); }

.service { scroll-margin-top: 1.5rem; padding-top: 2.25rem; margin-top: 2.25rem; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

/* Definition-style details (funeral directors page) */
.details-list { margin: 0; }
.details-list > div { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.details-list > div:last-child { border-bottom: 1px solid var(--line); }
.details-list dt { font-weight: 600; margin-bottom: 0.2rem; }
.details-list dd { margin: 0; }
@media (min-width: 48rem) {
  .details-list > div { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; }
}

/* ---------- FAQ accordion ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  font-weight: 500;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  margin-top: -0.1rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--sage-deep);
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--sage-deep); }
.faq .answer { padding: 0 0 1.25rem; max-width: var(--measure); }
.faq .answer > :last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: 3rem; }

/* ---------- Contact ---------- */
.contact-methods { display: grid; gap: 1rem; margin: 2rem 0 0; }
@media (min-width: 40rem) { .contact-methods { grid-template-columns: repeat(2, 1fr); } }
.contact-method {
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.contact-method:hover { border-color: var(--sage); color: var(--text); }
.contact-method__label { display: block; color: var(--muted); font-size: 1rem; }
.contact-method__value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
  color: var(--sage-deep);
  overflow-wrap: anywhere;
}

.form { max-width: 40rem; }
.field { margin-bottom: 1.35rem; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 1rem; margin-top: -0.15rem; margin-bottom: 0.4rem; }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #B9B1A5;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  min-height: 48px;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.optional { font-weight: 400; color: var(--muted); }
.form-error {
  background: #FBEAE5;
  border: 1px solid #D9A99A;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.form-error[hidden] { display: none; }
.form-note { font-size: 1rem; color: var(--muted); }

/* ---------- Call-to-action band ---------- */
.cta { text-align: center; }
.cta .button-row { justify-content: center; }
.cta p { max-width: 38em; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--tint);
  padding-block: 3rem 2rem;
  font-size: 1rem;
}
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-footer img { height: 22px; width: auto; margin-bottom: 1rem; }
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer__base {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #D5DED7;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Tap-to-call bar (phones only) ---------- */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(250, 247, 242, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px -12px rgba(46, 43, 40, 0.3);
}
.call-bar .button { width: 100%; max-width: 26rem; }
@media (max-width: 47.99rem) { :root { --callbar: 76px; } }
@media (min-width: 48rem) { .call-bar { display: none; } }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header nav, .menu-toggle, .call-bar, .skip-link, .button-row, .site-footer__grid > :not(:first-child) { display: none !important; }
  body { background: #fff; padding: 0; font-size: 12pt; }
  .section { padding-block: 1.5rem; }
  .faq details { display: block; }
  a { color: inherit; }
}

/* ---------- Spacing helpers ---------- */
.mt-1 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }

/* ---------- Holding page (maintenance.php, removed at launch) ---------- */
.holding__main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding-block: 3rem;
}
.holding__logo { height: 34px; width: auto; margin: 0 auto 2.5rem; }
.holding .button-row { justify-content: center; }
.holding__form {
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
  font-size: 1rem;
  color: var(--muted);
}
.holding__form label { display: block; margin-bottom: 0.35rem; }
.holding__row { display: flex; gap: 0.5rem; }
.holding__row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  font: inherit;
  letter-spacing: 0.3em;
  padding: 0.5rem 0.75rem;
  border: 1px solid #B9B1A5;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.holding__row .button { min-height: 44px; padding-block: 0.4rem; }
