/* Journey's End Funeral Home — styles */

:root {
  --ivory: #FBF8F3;
  --cream: #F2ECE1;
  --ink: #1C1B19;
  --ink-soft: #302D29;
  --body: #3D3A35;
  --muted: #6F6960;
  --gold: #B08D57;
  --gold-deep: #8A6B3D;
  --gold-pale: #DCCBAE;
  --line: #E7E0D2;
  --wa: #25D366;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --hdr: 74px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--hdr); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.15rem); line-height: 1.08; }
h2 { font-size: clamp(1.95rem, 3.7vw, 3rem); line-height: 1.16; }
h3 { font-size: 1.3rem; line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 640px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: var(--ivory); padding: .75rem 1.25rem;
  font-size: .85rem; transition: top .2s;
}
.skip:focus { top: 1rem; }

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

/* ---------- shared type devices ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 1.1rem;
  display: block;
}
.eyebrow--light { color: var(--gold-pale); }

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  color: var(--muted);
}

.rule { width: 54px; height: 1px; background: var(--gold); border: 0; margin: 1.6rem 0; }
.rule--center { margin-inline: auto; }

/* floral divider glyph between sections */
.glyph {
  display: flex; align-items: center; gap: 1rem;
  justify-content: center; color: var(--gold-pale);
}
.glyph::before, .glyph::after {
  content: ""; height: 1px; flex: 1; max-width: 130px; background: var(--gold-pale);
}
.glyph svg { width: 20px; height: 20px; color: var(--gold); opacity: .55; flex: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .9rem 1.7rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border-radius: 2px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--solid { background: var(--ink); color: var(--ivory); }
.btn--solid:hover { background: var(--ink-soft); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--gold-pale); }
.btn--ghost:hover { border-color: var(--gold); background: rgba(176, 141, 87, .07); }

.btn--onDark { background: transparent; color: var(--ivory); border-color: rgba(220, 203, 174, .45); }
.btn--onDark:hover { border-color: var(--gold-pale); background: rgba(220, 203, 174, .09); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.textlink {
  font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-deep); text-decoration: none;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 0; min-height: 44px;
}
.textlink svg { width: 14px; height: 14px; transition: transform .22s ease; }
.textlink:hover svg { transform: translateX(4px); }

/* ---------- botanical motif ---------- */

.botanic { position: absolute; color: var(--gold); pointer-events: none; z-index: 0; }
.botanic svg { width: 100%; height: 100%; display: block; }

/* ---------- header ---------- */

.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, .93);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.hdr__in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--hdr);
}
.brand { display: flex; align-items: center; text-decoration: none; padding: .35rem 0; }
.brand__wordmark {
  font-family: var(--serif); font-weight: 400; font-size: 1.2rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); line-height: 1; white-space: nowrap;
  margin-right: -.16em;
}

.nav { display: none; }
.nav ul {
  display: flex; align-items: center; list-style: none; margin: 0; padding: 0;
  gap: clamp(1.75rem, 3.4vw, 3.25rem);
}
.nav a {
  font-size: .9rem; letter-spacing: .035em; text-decoration: none; color: var(--body);
  padding: .4rem 0; position: relative; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right .28s ease;
}
.nav a:hover::after, .nav a[aria-current="true"]::after { right: 0; }

.hdr__actions { display: flex; align-items: center; gap: .5rem; }

.iconbtn {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: none; border: 0; color: var(--ink); cursor: pointer; text-decoration: none;
}
.iconbtn svg { width: 22px; height: 22px; }

/* mobile drawer */
.drawer {
  position: fixed; inset: var(--hdr) 0 auto 0; z-index: 99;
  background: var(--ivory); border-bottom: 1px solid var(--line);
  transform: translateY(-115%); transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  max-height: calc(100dvh - var(--hdr)); overflow-y: auto;
}
.drawer[data-open="true"] { transform: translateY(0); }
.drawer ul { list-style: none; margin: 0; padding: .5rem var(--gutter) 1rem; }
.drawer li + li { border-top: 1px solid var(--line); }
.drawer a {
  display: block; padding: 1.05rem 0; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 1.35rem;
}
.drawer .btn { width: 100%; margin-top: 1.1rem; }

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.25rem, 5vw, 5rem) 0 clamp(2.75rem, 5vw, 4.5rem);
}
.hero__grid {
  display: grid; gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center; position: relative; z-index: 1; text-align: center;
}

.hero__logo { margin: 0; }
.hero__logo img {
  width: clamp(150px, 52vw, 300px); height: auto; margin-inline: auto;
}

.hero__rule { margin-inline: auto; margin-block: 0 1.5rem; }
.hero__quote {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.2rem, 2.8vw, 1.65rem); line-height: 1.4;
  color: var(--ink-soft); margin-bottom: 1.35rem; max-width: 26ch; margin-inline: auto;
}
.hero__copy { max-width: 46ch; margin: 0 auto 2rem; color: var(--body); }

.hero .botanic--a { right: -13%; bottom: -20%; width: 44%; aspect-ratio: 1; opacity: .05; }
.hero .botanic--d { left: -15%; top: -14%; width: 27%; aspect-ratio: 1; opacity: .04; }

/* ---------- credibility strip ---------- */

.strip { background: var(--cream); border-block: 1px solid var(--line); }
.strip ul {
  list-style: none; margin: 0; padding: 1.5rem 0; display: grid; gap: 1rem;
  text-align: center; justify-items: center;
}
.strip li { display: flex; align-items: center; gap: .7rem; }
.strip svg { width: 19px; height: 19px; color: var(--gold); flex: none; }
.strip .k { font-size: .95rem; font-weight: 500; letter-spacing: .01em; color: var(--ink); }
.strip .v { font-size: .82rem; color: var(--muted); }
.stars { color: var(--gold); letter-spacing: .12em; font-size: .82rem; }

.strip .strip__compact { display: none; }

@media (max-width: 599px) {
  .strip .strip__full { display: none; }
  .strip .strip__compact {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem;
    padding: 1rem 0; list-style: none; margin: 0;
  }
  .strip__compact li {
    flex-direction: column; align-items: center; justify-content: center;
    gap: .3rem; padding-inline: .25rem;
  }
  .strip__compact svg { width: 17px; height: 17px; }
  .strip__compact .k { font-size: .82rem; }
  .strip__compact .v { font-size: .68rem; line-height: 1.3; }
}

/* ---------- generic section ---------- */

.sec { position: relative; padding: clamp(3.75rem, 7.5vw, 6.5rem) 0; }
.sec--tight { padding-block: clamp(3rem, 5.5vw, 4.5rem); }
.sec--compact { padding-block: clamp(2.25rem, 4vw, 3rem); }
.sec--tall { padding-block: clamp(5rem, 11vw, 9.5rem); }
.sec--cream { background: var(--cream); }
.sec--dark { background: var(--ink); color: #C9C4BA; }
.sec--dark h2, .sec--dark h3 { color: var(--ivory); }
.sec__head { max-width: 620px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec__head--center { margin-inline: auto; text-align: center; }

/* ---------- about ---------- */

.about { overflow: hidden; }
.about__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.about__intro { max-width: 640px; }
.about .eyebrow { font-size: .74rem; letter-spacing: .24em; margin-bottom: 1.35rem; }
.about h2 {
  font-size: clamp(2.2rem, 4.2vw, 3.35rem);
  line-height: 1.12; letter-spacing: -0.012em; margin-bottom: 0;
}
.about__intro .rule { margin-block: 1.75rem; }

.about .botanic--b { left: -9%; bottom: -8%; width: 30%; aspect-ratio: 1; opacity: .045; }

/* ---------- services ---------- */

.svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.svc li { padding: 2.25rem 0; border-top: 1px solid rgba(220, 203, 174, .2); }
.svc li:last-child { border-bottom: 1px solid rgba(220, 203, 174, .2); }
.svc__ico { width: 30px; height: 30px; color: var(--gold); margin-bottom: 1.35rem; }
.svc h3 { font-size: 1.45rem; margin-bottom: .6rem; }
.svc p { font-size: .95rem; color: #A9A399; max-width: 34ch; margin-bottom: 1rem; }
.svc .textlink { color: var(--gold-pale); }
.svc .textlink:hover { color: #fff; }

/* ---------- team ---------- */

.team { position: relative; overflow: hidden; }
.team__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; position: relative; z-index: 1; }
.team__figure { position: relative; margin: 0; }
.team__figure img { width: 100%; height: auto; position: relative; z-index: 1; }
.team__figure::before {
  content: ""; position: absolute; z-index: 0;
  inset: -18px; border: 1px solid var(--gold-pale);
}
.team .botanic--c { right: -10%; top: -12%; width: 38%; aspect-ratio: 1; opacity: .05; }

/* ---------- policies ---------- */

.policy { text-align: center; }
.policy__box {
  max-width: 720px; margin-inline: auto;
  border-block: 1px solid var(--gold-pale); padding: clamp(2.75rem, 6vw, 4.25rem) clamp(1rem, 4vw, 3rem);
}
.policy h2 { margin-bottom: 1.4rem; }
.policy p { color: var(--body); max-width: 52ch; margin-inline: auto; }
.policy .btn { margin-top: 2.1rem; }

/* ---------- reviews ---------- */

.rev { text-align: center; border-block: 1px solid var(--line); }
.rev__score { font-family: var(--serif); font-size: clamp(2.75rem, 6vw, 3.75rem); line-height: 1; color: var(--ink); }
.rev__stars { color: var(--gold); font-size: 1.05rem; letter-spacing: .3em; margin: .6rem 0 .4rem; }
.rev__count { font-size: .92rem; color: var(--muted); }
.rev .btn { margin-top: 1.5rem; }
.rev .eyebrow { margin-bottom: .8rem; }

/* ---------- contact ---------- */

.contact__grid { display: grid; gap: clamp(2.25rem, 4.5vw, 3.25rem); align-items: start; }
.contact__info { max-width: 640px; }
.cdl { margin: 0; }
.cdl__row { display: flex; gap: 1.1rem; padding: .95rem 0; border-top: 1px solid var(--line); align-items: flex-start; }
.cdl__row:last-of-type { border-bottom: 1px solid var(--line); }
.cdl svg { width: 20px; height: 20px; color: var(--gold); flex: none; margin-top: .3rem; }
.cdl dt { font-size: .82rem; color: var(--muted); margin-bottom: .15rem; }
.cdl dd { margin: 0; font-size: 1.02rem; color: var(--ink); line-height: 1.5; }
.cdl dd a { text-decoration: none; }
.cdl dd a:hover { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.contact .btn-row { margin-top: 1.5rem; }

/* ---------- footer ---------- */

.ftr {
  background: var(--ivory); border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0; color: var(--muted);
}
.ftr__in { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.ftr__mark { height: 76px; width: auto; }
.ftr__name { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin: 0; }

/* ---------- floating whatsapp ---------- */

.wa-float {
  position: fixed; z-index: 90;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: .6rem;
  height: 54px; padding: 0 1.15rem; border-radius: 27px;
  background: var(--wa); color: #06301C; text-decoration: none;
  font-size: .875rem; font-weight: 500;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .16);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.wa-float svg { width: 25px; height: 25px; flex: none; }
.wa-float[data-show="true"] { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- motion ---------- */

.reveal { opacity: 0; transform: translateY(18px); }
.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22, .8, .3, 1); }

.hero .reveal { transition-delay: 0ms; }
.hero [data-d="1"].is-in { transition-delay: 90ms; }
.hero [data-d="2"].is-in { transition-delay: 180ms; }
.hero [data-d="3"].is-in { transition-delay: 270ms; }
.hero [data-d="4"].is-in { transition-delay: 360ms; }
.hero [data-d="5"].is-in { transition-delay: 450ms; }

/* ---------- breakpoints ---------- */

@media (min-width: 600px) {
  .strip ul { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 1.5rem; }
  .btn-row .btn { flex: 0 1 auto; }
}

@media (max-width: 400px) {
  .hero { padding-top: 1.75rem; }
  .hero__quote { font-size: 1.15rem; }
  .brand__wordmark { font-size: 1.05rem; letter-spacing: .1em; margin-right: -.1em; }
}

@media (max-width: 599px) {
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}

@media (min-width: 860px) {
  :root { --hdr: 88px; }
  .brand__wordmark { font-size: 1.35rem; letter-spacing: .19em; margin-right: -.19em; }
  .nav { display: block; margin-left: auto; }
  .hdr__actions { display: none; }
  .drawer { display: none; }

  .hero { padding-block: clamp(3.5rem, 6vw, 6rem) clamp(3rem, 5vw, 5rem); }
  .hero__grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(3rem, 6vw, 5rem); }
  .hero__body {
    text-align: left; border-left: 1px solid var(--gold-pale);
    padding-left: clamp(2.5rem, 5vw, 4rem);
  }
  .hero__logo img { width: clamp(240px, 24vw, 330px); }
  .hero__rule { margin-inline: 0; }
  .hero__quote { margin-inline: 0; max-width: 22ch; }
  .hero__copy { margin-inline: 0; }
  .svc { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 4.5rem); }
  .svc li:nth-child(3) { border-bottom: 1px solid rgba(220, 203, 174, .2); }
  .team__grid { grid-template-columns: 1.05fr .95fr; }
  .team__grid--flip .team__figure { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .is-in { transition: none; }
  .wa-float { transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
