/* ==========================================================================
   Everdale Funeral Home — fictional portfolio piece
   Quiet dignity: dove grey, soft slate blue, warm parchment white.
   Source Serif 4, generous line-height, large readable type (18px+ base),
   calm centered layout with muted hairline dividers and a willow motif.
   ========================================================================== */

:root {
  --parchment: #faf7f0;
  --dove: #e7e5e0;
  --slate: #5a7184;
  --slate-deep: #3e5260;
  --ink: #3a4148;
  --hairline: #d4d0c8;
  --max: 58rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  font-size: 1.1875rem; /* 19px base for older visitors */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--slate-deep);
  color: var(--parchment);
  padding: 0.6rem 1.2rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

:focus-visible {
  outline: 3px solid var(--slate-deep);
  outline-offset: 2px;
}

/* ---------- 24/7 immediate-need banner ---------- */

.urgent-banner {
  background: var(--slate-deep);
  color: #f4f1e9;
  text-align: center;
  padding: 0.8rem 1.25rem;
  font-size: 1.05rem;
}

.urgent-banner p {
  margin: 0;
  max-width: var(--max);
  margin-inline: auto;
}

.urgent-banner a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  text-align: center;
  padding: 2.8rem 1.5rem 1.2rem;
  max-width: var(--max);
  margin: 0 auto;
}

.brand-mark {
  display: inline-block;
  color: var(--slate);
}

.brand-name {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.015em;
  margin: 0.5rem 0 0.2rem;
  color: var(--slate-deep);
}

.brand-tag {
  font-size: 1rem;
  font-style: italic;
  color: var(--slate);
  margin: 0 0 1.2rem;
}

/* ---------- Navigation ---------- */


.site-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1.9rem;
  padding: 0.9rem 0 0;
  margin: 0;
  border-top: 1px solid var(--hairline);
}

.site-nav a {
  font-size: 1.02rem;
  color: var(--slate-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover {
  border-bottom-color: var(--slate);
}

/* The 24-hour phone line appears only inside the small-screen menu,
   pinned to the top; desktop visitors already have the banner above. */
.nav-phone {
  display: none;
}

/* Navigation is never hidden on this site. Hiding wayfinding behind a
   menu button is the wrong trade for a funeral home's audience — on small
   screens the nav simply wraps, centered, with large readable targets. */

@media (max-width: 42rem) {
  /* Keep the first phone screen mostly content, not chrome: the banner
     already carries the 24/7 number, so the header drops its duplicate
     phone line and tightens to a compact masthead + two-column nav. */
  .urgent-banner p {
    font-size: 0.92rem;
    padding: 0.55rem 1rem;
  }

  .nav-phone { display: none; }

  .site-header {
    padding: 1rem 1rem 0.75rem;
  }

  .brand-mark svg { width: 30px; height: 30px; }

  .brand-name { font-size: 1.35rem; }

  .brand-tag { font-size: 0.85rem; margin-bottom: 0.5rem; }

  .site-nav {
    justify-content: center;
    gap: 0 1rem;
  }

  .site-nav a {
    display: inline-block;
    font-size: 1.02rem;
    padding: 0.5rem 0.4rem;
  }
}

/* ---------- Section scaffolding ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3.25rem 0;
  text-align: center;
}

h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  font-weight: 600;
  color: var(--slate-deep);
  margin: 0 0 1.2rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-deep);
  margin: 0 0 0.4rem;
}

.section-intro {
  max-width: 40rem;
  margin: 0 auto 2.2rem;
}

.hairline {
  border-top: 1px solid var(--hairline);
  max-width: 30rem;
  margin: 0 auto;
}

.prose {
  max-width: 38rem;
  margin: 0 auto;
  text-align: left;
}

.prose p {
  margin: 0 0 1.2rem;
}

.prose a {
  color: var(--slate-deep);
  text-decoration-color: var(--slate);
  text-underline-offset: 3px;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 4rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--slate-deep);
  max-width: 36rem;
  margin: 0 auto 1.3rem;
}

.hero-lede {
  max-width: 38rem;
  margin: 0 auto 2rem;
  font-size: 1.22rem;
}

.hero-actions {
  margin: 0 0 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-size: 1.08rem;
  text-decoration: none;
  padding: 0.75rem 1.7rem;
  border-radius: 6px;
  border: 1px solid var(--slate-deep);
}

.btn-primary {
  background: var(--slate-deep);
  color: #fff;
}

.btn-primary:hover {
  background: var(--slate);
  border-color: var(--slate);
}

.btn-quiet {
  color: var(--slate-deep);
  background: transparent;
}

.btn-quiet:hover {
  background: var(--dove);
}

.hero-fact {
  font-size: 1rem;
  color: var(--slate);
  max-width: 38rem;
  margin: 0 auto;
}

/* ---------- Services & pricing ---------- */

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  text-align: left;
}

@media (max-width: 44rem) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1.6rem 1.7rem;
  box-shadow: 0 1px 3px rgba(62, 82, 96, 0.06);
}

.price {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.7rem;
}

.service-card p:last-child {
  margin-bottom: 0;
}

.service-note {
  max-width: 40rem;
  margin: 2rem auto 0;
  font-style: italic;
  color: var(--slate);
}

/* ---------- Staff ---------- */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  text-align: center;
}

@media (max-width: 48rem) {
  .staff-grid {
    grid-template-columns: 1fr;
    max-width: 30rem;
    margin: 0 auto;
  }
}

.staff-card {
  background: var(--dove);
  border-radius: 8px;
  padding: 1.7rem 1.4rem;
}

.staff-mark {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--parchment);
  color: var(--slate);
  margin-bottom: 0.8rem;
}

.staff-role {
  font-style: italic;
  color: var(--slate);
  margin: 0 0 0.7rem;
}

.staff-card p:last-child {
  margin-bottom: 0;
  text-align: left;
  font-size: 1.05rem;
}

/* ---------- Grief resources ---------- */

.resource-list {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
}

.resource-list li {
  margin-bottom: 0.9rem;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 40rem;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-item:first-child {
  border-top: 1px solid var(--hairline);
}

.faq-item summary {
  cursor: pointer;
  padding: 1.05rem 0.4rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--slate);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item summary h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  display: inline;
}

.faq-item p {
  margin: 0 0 1.2rem;
  padding: 0 0.4rem;
}

/* ---------- Hours, location, contact ---------- */

.visit-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
}

@media (max-width: 48rem) {
  .visit-cols {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 30rem;
    margin: 0 auto;
  }
}

.visit-block h3 {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.visit-block a {
  color: var(--slate-deep);
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  border-top: 1px solid var(--hairline);
  padding: 2.6rem 1.5rem 3rem;
  margin-top: 1rem;
  background: var(--dove);
}

.footer-mark {
  display: inline-block;
  color: var(--slate);
}

.footer-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-deep);
  margin: 0.5rem 0 0.3rem;
}

.site-footer a {
  color: var(--slate-deep);
}

.footer-legal {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--slate);
  max-width: 36rem;
  margin: 0.5rem auto;
}

/* ---------- Single gentle, motion-safe fade ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero-lede {
    animation: settle 0.9s ease-out both;
  }

  .hero-lede {
    animation-delay: 0.15s;
  }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Social links (fictional .example profiles) */
.social-links { display: flex; gap: 1.2rem; list-style: none; justify-content: center; padding: 0 1.5rem; margin: 1.5rem auto 0; }
.social-links a { display: inline-flex; color: inherit; opacity: 0.85; }
.social-links a:hover, .social-links a:focus-visible { opacity: 1; }
.social-links svg { width: 1.3rem; height: 1.3rem; }

