:root {
  color-scheme: light;
  --bg: #f2eee4;
  --paper: #fffcf5;
  --navy: #132a3b;
  --navy-light: #344957;
  --muted: #45515b;
  --gold: #ba9254;
  --gold-deep: #765324;
  --brass: #e4c791;
  --rule: #b9a587;
  --focus: #12689b;
  --pill: 100vmax;
  --rounded: clamp(0.85rem, 2vw, 1.6rem);
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --side: clamp(0.85rem, 3.4vw, 2.5rem);
  --safe-end: env(safe-area-inset-bottom, 0px);
  --head-clearance: 8rem;
  --bottom-clearance: calc(4rem + var(--safe-end));
  --intro-veil: linear-gradient(180deg, rgb(246 250 255 / 30%), rgb(255 253 248 / 56%) 48%, rgb(250 245 234 / 34%));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-block: var(--head-clearance) calc(var(--bottom-clearance) + 4rem);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  isolation: isolate;
  padding-block-end: var(--bottom-clearance);
  background: var(--bg);
  color: var(--navy);
  font: 400 1.065rem / 1.53 var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgb(247 250 243 / 27%), rgb(250 246 231 / 33%)),
    url("assets/intro-backdrop-draft.webp") center / cover no-repeat;
}

img { display: block; max-inline-size: 100%; block-size: auto; }
a { color: inherit; text-underline-offset: 0.23em; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
h2, h3 { text-wrap: balance; }
address { font-style: normal; }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.wrap {
  inline-size: min(calc(100% - 2 * var(--side)), 76rem);
  margin-inline: auto;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  inset: max(0.65rem, env(safe-area-inset-top, 0px)) auto auto var(--side);
  z-index: 12;
  padding: 0.65rem 1rem;
  border-radius: 0.45rem;
  background: var(--paper);
}

.icon {
  inline-size: 1.12em;
  block-size: 1.12em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone { white-space: nowrap; font-variant-numeric: tabular-nums; }

.button, .icon-button, .text-link, .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46em;
  min-inline-size: 44px;
  min-block-size: 48px;
  font-weight: 650;
  line-height: 1.2;
}

.button {
  padding: 0.57rem 1.04rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  text-decoration: none;
  text-align: center;
}

.button-primary { background: var(--navy); color: #fff9ef; }
.button-outline { border-color: var(--gold-deep); background: transparent; }
.text-link { justify-content: start; text-decoration-color: var(--gold-deep); }
.icon-button {
  padding: 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
}

.site-header {
  position: sticky;
  z-index: 8;
  inset-block-start: 0;
  padding-block: max(0.42rem, env(safe-area-inset-top, 0px)) 0.35rem;
  pointer-events: none;
}

.main-nav {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.2rem;
  inline-size: min(56rem, calc(100% - 2 * max(0.5rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
  padding: 0.25rem clamp(0.25rem, 1.1vw, 0.7rem);
  border: 2px solid var(--gold);
  border-radius: 1.22rem;
  background: #192e3e;
  color: #fff8ec;
  box-shadow: 0 6px 17px rgb(16 33 46 / 19%);
  pointer-events: auto;
}

@supports (backdrop-filter: blur(12px)) {
  .main-nav {
    background: linear-gradient(175deg, rgb(46 64 78 / 96%), rgb(20 37 50 / 97%));
    backdrop-filter: blur(12px);
  }
}

.nav-link {
  min-inline-size: 0;
  padding: 0.3rem 0.22rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  color: inherit;
  background: transparent;
  text-decoration: none;
  text-align: center;
  font-size: clamp(0.79rem, 2.7vw, 0.99rem);
}

.nav-link .icon { inline-size: 0.98em; block-size: 0.98em; }
.main-nav :focus-visible { outline-color: #f7dcab; }
.nav-call {
  grid-area: 1 / 1 / 2 / 5;
  border-color: #e9d09e;
  background: var(--brass);
  color: #192b38;
  white-space: nowrap;
}
.nav-crest {
  grid-area: 1 / 5 / 2 / 9;
  display: grid;
  justify-self: center;
  place-items: center;
  min-inline-size: 48px;
  inline-size: clamp(3.25rem, 8vw, 4.5rem);
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--paper);
}
.nav-help { grid-area: 1 / 9 / 2 / 13; }
.nav-caskets { grid-area: 2 / 1 / 3 / 4; }
.nav-guide { grid-area: 2 / 4 / 3 / 7; }
.nav-location { grid-area: 2 / 7 / 3 / 10; }
.nav-language { grid-area: 2 / 10 / 3 / 13; }
.nav-language { border-color: #bda57c; background: rgb(254 248 234 / 9%); }
.nav-link :is(.nav-help-icon, .nav-book-icon, .nav-casket-icon, .nav-globe-icon) {
  inline-size: clamp(1.04rem, 2.1vw, 1.3rem);
  block-size: clamp(1.04rem, 2.1vw, 1.3rem);
}
.help-dot, .help-moving-dot, .globe-land { fill: currentColor; stroke: none; }
.help-moving-dot { opacity: 0; }
.help-hook, .book-left, .book-right { transform-origin: center; transform-box: view-box; }
.book-left, .book-right { transform: scaleX(0.71); }
.language-glyph { position: relative; display: grid; place-items: center; overflow: hidden; font: 700 0.85rem / 1 var(--sans); }
.language-glyph span { grid-area: 1 / 1; }
.glyph-next { opacity: 0; transform: translateY(105%); }
html:has(dialog:modal) .nav-call { visibility: hidden; }

.crest {
  position: relative;
  display: block;
  inline-size: 100%;
  aspect-ratio: 729 / 662;
}

.nav-crest .crest { inline-size: 72%; }
.crest-wheat { inline-size: 100%; }
.crest-monogram {
  position: absolute;
  inset: 34% auto auto 22.09%;
  inline-size: 55.83%;
}
.crest-dove {
  position: absolute;
  inset: -10% auto auto 29.5%;
  inline-size: 41%;
  aspect-ratio: 320 / 220;
  background: url("assets/crest-dove.svg") left center / 300% 100% no-repeat;
}

.hero { padding-block-start: clamp(0.7rem, 2.15vw, 1.55rem); }
.hero-shell {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  min-block-size: clamp(31rem, 48vw, 42rem);
  overflow: clip;
  border: 1px solid #a38a61;
  border-radius: var(--rounded);
  background: #122732;
  color: #fffbf3;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 67% 57%;
}

.hero-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, rgb(10 23 31 / 95%), rgb(10 23 31 / 83%) 53%, rgb(10 23 31 / 18%));
}

.hero-content {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding: clamp(1.05rem, 4.8vw, 4rem);
}

.hero h1 {
  font: 650 clamp(2.55rem, 6.7vw, 6.2rem) / 0.96 var(--serif);
  letter-spacing: -0.04em;
}

.hero h1 span { display: block; }
.hero h1 span:last-child { font-size: 0.68em; margin-block-start: 0.14em; }
.hero p { max-inline-size: 37ch; font-size: clamp(1rem, 1.75vw, 1.27rem); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  inline-size: 100%;
  margin-block-start: 0.18rem;
}

.hero .button-primary { background: var(--brass); color: #1b2e3c; }
.hero .button-outline { border-color: #ddbd89; color: #fffaf1; }
.hero :focus-visible { outline-color: #ffdeb0; }
.hero .call-note {
  color: #ffefcf;
  font-size: 0.89rem;
  line-height: 1.42;
}
.call-note a { text-decoration-color: var(--brass); }

.hero-address {
  display: flex;
  align-items: start;
  gap: 0.42em;
  max-inline-size: 44ch;
  color: #ffefcf;
  font-size: 0.92rem;
  line-height: 1.4;
}

.hero-address .icon { margin-block-start: 0.12em; }
.section { padding-block: clamp(2.2rem, 6vw, 5.75rem); }
:is(#guidance, #ofw, #location) { padding-block-start: clamp(3.3rem, 7.1vw, 6.6rem); }
.section-copy { min-inline-size: 0; }
.section-copy h2 {
  font: 600 clamp(1.95rem, 4.7vw, 4.05rem) / 1.05 var(--serif);
  letter-spacing: -0.035em;
}

.section-copy p { max-inline-size: 62ch; margin-block-start: 0.78rem; color: var(--muted); }
.section-copy .cluster { margin-block-start: 0.8rem; }
.care-grid, .ofw-card, .location-heading { display: grid; gap: clamp(1rem, 3.4vw, 2.25rem); }
.care-grid { align-items: start; }
.care-copy, .ofw-card {
  padding: clamp(1.1rem, 3.7vw, 2.8rem);
  background: var(--paper);
}

.has-foliage {
  --plant-overhang: clamp(0.52rem, 1.2vw, 0.92rem);
  --rim-source: url("assets/orchid-rim.webp");
  --rim-dense-source: url("assets/orchid-rim-2x.webp");
  --rim-ratio: 1536 / 196;
  isolation: isolate;
}

.has-foliage::before,
.foliage-cascade,
.foliage-trail {
  position: absolute;
  z-index: 1;
  inset-inline-end: calc(-1 * var(--plant-overhang));
  pointer-events: none;
  transform-origin: top center;
}

.has-foliage::before {
  content: "";
  inset-block-start: 0;
  inset-inline-start: calc(-1 * var(--plant-overhang));
  aspect-ratio: var(--rim-ratio);
  transform: translateY(-55%);
  background: var(--rim-source) center / contain no-repeat;
  background-image: image-set(var(--rim-source) 1x, var(--rim-dense-source) 2x);
}

.foliage-cascade {
  inset-block-start: calc(-1.15 * var(--plant-overhang));
  inline-size: var(--cascade-width);
  block-size: auto;
}

.foliage-trail {
  inset-block-start: calc(-0.5 * var(--plant-overhang));
  block-size: calc(100% + var(--plant-overhang));
  inline-size: auto;
  max-inline-size: none;
}

.has-foliage > :is(h2, p, .section-copy, .cluster, .ofw-actions) { position: relative; z-index: 2; }

.care-copy.has-foliage {
  --cascade-width: clamp(3.6rem, 9vw, 8.15rem);
  padding-block: clamp(2.65rem, 4.5vw, 4.1rem) clamp(1.15rem, 2.3vw, 1.75rem);
  padding-inline: calc(var(--cascade-width) - var(--plant-overhang) + 0.35rem) clamp(1.15rem, 2.7vw, 2.6rem);
}

.care-copy :is(.foliage-cascade, .foliage-trail) {
  inset-inline: calc(-1 * var(--plant-overhang)) auto;
}

.care-copy .foliage-trail {
  mask-image: linear-gradient(90deg, #000 0 calc(var(--cascade-width) - 0.5rem), transparent var(--cascade-width));
}

.care-copy h2 { font-size: clamp(1.95rem, 4.1vw, 3.3rem); }

.ofw-card.has-foliage {
  --rim-source: url("assets/sampaguita-rim-fuller.webp");
  --rim-dense-source: url("assets/sampaguita-rim-fuller-2x.webp");
  --rim-ratio: 1536 / 240;
  --cascade-width: clamp(5rem, 9vw, 8.75rem);
  padding-inline-end: calc(var(--cascade-width) - var(--plant-overhang) + 0.5rem);
}

.ofw-card > .section-copy { align-self: start; }

[data-lit] {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--rounded);
}

.chapter-photo {
  align-self: stretch;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 40 / 27;
  background: #384235;
}

.chapter-photo img {
  position: absolute;
  inset: auto 0 0;
  inline-size: 100%;
  block-size: calc(100% / 0.9);
  object-fit: cover;
  object-position: center bottom;
}

@supports (object-view-box: inset(10% 0 0)) {
  .chapter-photo img {
    block-size: 100%;
    object-view-box: inset(10% 0 0);
  }
}

.chapter-photo figcaption {
  position: absolute;
  z-index: 1;
  inset: auto auto 0.65rem 0.65rem;
  max-inline-size: calc(100% - 1.3rem);
  padding: 0.26rem 0.5rem;
  border-radius: 0.3rem;
  background: #142739;
  color: #fff8ea;
  font-size: 0.83rem;
}

.service-section {
  border-block: 1px solid #ccbda4;
  background: rgb(249 242 226 / 83%);
}

.wake-grid {
  display: grid;
  gap: 0.85rem;
  margin-block: clamp(1.05rem, 3.8vw, 2.35rem);
}

.wake-card { min-inline-size: 0; background: var(--paper); }
.photo-link {
  display: grid;
  inline-size: 100%;
  border-radius: inherit;
  text-decoration: none;
}

.photo-link img {
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--rounded) - 1px) calc(var(--rounded) - 1px) 0 0;
}

.photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-block-size: 48px;
  padding: 0.5rem 0.8rem;
  font-weight: 650;
}

.ofw-actions { display: grid; gap: 0.6rem; justify-items: start; }
.ofw-actions .email-link { min-block-size: 44px; display: inline-flex; align-items: center; overflow-wrap: anywhere; }

.location-heading.has-foliage {
  --rim-source: url("assets/anthurium-rim-fuller.webp");
  --rim-dense-source: url("assets/anthurium-rim-fuller-2x.webp");
  --rim-ratio: 1536 / 310;
  --cascade-width: clamp(3.85rem, 6vw, 5.75rem);
  align-items: end;
  padding: clamp(0.95rem, 2.7vw, 1.65rem);
  padding-inline-end: calc(var(--cascade-width) - var(--plant-overhang) + 0.5rem);
  background: rgb(255 252 245 / 97%);
}

:is(.ofw-card, .location-heading).has-foliage {
  padding-block-start: clamp(1.65rem, 3vw, 2.75rem);
}
.location-heading address { margin-block-start: 0.72rem; font-weight: 600; }
.map-frame {
  margin-block: 1.25rem 0.75rem;
  overflow: clip;
  border: 1px solid #b29b75;
  border-radius: var(--rounded);
  background: #e7e7df;
}

.map-frame iframe {
  display: block;
  inline-size: 100%;
  block-size: clamp(22rem, 52vw, 36rem);
  border: 0;
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem 1.25rem;
  color: #213d50;
}

.contact-strip a, .email-link { overflow-wrap: anywhere; }
.feedback { margin-block-start: 0.4rem; color: #355565; }
.feedback:empty { display: none; }
.copy-fallback { margin-block-start: 0.7rem; }
.copy-fallback textarea { display: block; inline-size: min(100%, 34rem); margin-block-start: 0.3rem; padding: 0.48rem 0.62rem; }

.site-footer { background: #172d3d; color: #fff8eb; }
.footer-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.1rem 1rem;
  padding-block: 0.85rem;
}

.site-footer :focus-visible { outline-color: #ffdbac; }
.site-footer .text-link { text-decoration-color: #e1c896; }
.studio-credit { display: inline-flex; align-items: center; gap: 0.64rem; }
.studio-credit img { inline-size: 2rem; block-size: auto; }

.site-dialog {
  inline-size: min(calc(100% - 2rem), 33rem);
  max-block-size: calc(100dvh - 2rem);
  padding: clamp(0.9rem, 3vw, 1.55rem);
  border: 1px solid var(--rule);
  border-radius: var(--rounded);
  background: var(--paper);
  color: var(--navy);
}

dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.site-dialog::backdrop { background: rgb(9 23 35 / 69%); }
.dialog-header, .assistant-header { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; }
.dialog-header h2 { font: 650 clamp(1.55rem, 4vw, 2.2rem) / 1.1 var(--serif); }
.site-dialog p { margin-block: 0.75rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; padding-block-start: 0.4rem; }
.photo-dialog { inline-size: min(calc(100% - 2rem), 37rem); }
.photo-dialog img { inline-size: 100%; margin-block-start: 0.65rem; border-radius: 0.35rem; }

.assistant {
  position: fixed;
  z-index: 6;
  inset: auto max(0.8rem, env(safe-area-inset-right, 0px)) calc(var(--bottom-clearance) + 0.75rem) auto;
  inline-size: fit-content;
  max-inline-size: min(calc(100% - 1.6rem), 21rem);
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.assistant-launch {
  min-block-size: 48px;
  border-color: #ccab76;
  background: #182e3e;
  color: #fff8ea;
  box-shadow: 0 5px 16px rgb(15 32 46 / 22%);
}

.launcher-short { display: none; }

.assistant-nudge {
  max-inline-size: 16rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid #9e835b;
  border-radius: 0.62rem;
  background: var(--paper);
  color: var(--navy);
  box-shadow: 0 3px 12px rgb(15 32 46 / 15%);
  font-size: 0.89rem;
  font-weight: 600;
}

.assistant-panel {
  inline-size: min(21rem, 100%);
  block-size: min(26rem, calc(100dvh - var(--head-clearance) - var(--bottom-clearance) - 1.35rem));
  min-block-size: 9rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #9d825b;
  border-radius: 1.05rem;
  background: var(--paper);
  box-shadow: 0 10px 27px rgb(14 33 47 / 26%);
}

.assistant-header { padding: 0.18rem 0.45rem 0.18rem 0.76rem; background: #223a4d; color: #fffaf4; }
.assistant-header h2 { flex: 1; font: 650 1.08rem / 1.1 var(--sans); }
.assistant-header .icon-button { min-inline-size: 44px; min-block-size: 44px; background: transparent; color: inherit; border-color: transparent; }
.assistant-header :focus-visible { outline-color: #ffe6ae; }
.viber-icon { filter: brightness(0) invert(1); stroke: none; }
.assistant-header .viber-icon { inline-size: 1.75rem; block-size: 1.75rem; padding: 0.35rem; background: #decaef; border-radius: 50%; filter: none; }
.assistant-thread {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.75rem;
  background:
    radial-gradient(ellipse at 25% 45%, transparent 24%, rgb(159 135 95 / 13%) 26%, transparent 29%) 0 0 / 38px 29px,
    radial-gradient(ellipse at 75% 55%, transparent 23%, rgb(159 135 95 / 11%) 25%, transparent 28%) 0 0 / 38px 29px,
    #efe7da;
}
.assistant-intro, .assistant-reply, .assistant-question {
  inline-size: fit-content;
  max-inline-size: 95%;
  margin-block-end: 0.6rem;
  padding: 0.52rem 0.7rem;
  border: 1px solid #dbccb4;
  border-radius: 0.27rem 0.85rem 0.85rem;
  background: #fffdf7;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.assistant-intro small { display: block; margin-block-start: 0.12rem; color: var(--muted); }
.assistant-question { margin-inline-start: auto; border-radius: 0.85rem 0.27rem 0.85rem 0.85rem; background: #eae1f5; }
.assistant-reply a { margin-block-start: 0.25rem; }
.assistant-contacts {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.75rem;
  margin-block-start: 0.45rem;
  border-block-start: 1px solid #dbccb4;
}
.assistant-contacts .text-link { min-block-size: 44px; }
.assistant-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-block: 0.5rem;
}
.assistant-topics button {
  min-block-size: 44px;
  padding: 0.3rem 0.6rem;
  border: 1px solid #a8916d;
  border-radius: var(--pill);
  background: var(--paper);
  font-size: 0.87rem;
  font-weight: 600;
}
.assistant-topics button[aria-pressed="true"] { background: var(--navy); color: #fff9ef; border-color: var(--navy); }
.assistant-panel .text-link { font-size: 0.91rem; }
.assistant-form { display: flex; align-items: stretch; gap: 0.4rem; padding: 0.49rem; background: var(--paper); }
.assistant-form input {
  flex: 1;
  min-inline-size: 0;
  min-block-size: 46px;
  padding: 0.38rem 0.55rem;
  border: 1px solid #9c8460;
  border-radius: var(--pill);
  background: #fffdf7;
  font-size: 1rem;
}
.assistant-form .button { inline-size: 46px; padding: 0; flex: none; border-radius: 50%; background: #583986; color: white; }

.mobile-actions {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  padding: 0.42rem max(0.55rem, env(safe-area-inset-right, 0px)) calc(0.42rem + var(--safe-end)) max(0.55rem, env(safe-area-inset-left, 0px));
  border-block-start: 1px solid var(--rule);
  background: var(--paper);
}
.mobile-actions .button { font-size: 0.89rem; padding-inline: 0.4rem; }
.mobile-actions:has(> .assistant-launch) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mobile-actions > .assistant-launch { box-shadow: none; }
.mobile-actions .launcher-full { display: none; }
.mobile-actions .launcher-short { display: inline; }
.mobile-actions > .assistant-nudge {
  grid-column: 1 / -1;
  justify-self: end;
  padding-block: 0.25rem;
  box-shadow: none;
  font-size: 0.85rem;
}

@media (max-width: 31rem) {
  .hero-shell { align-items: start; min-block-size: 28rem; }
  .hero-shell::before {
    background: linear-gradient(95deg, rgb(10 23 31 / 91%), rgb(10 23 31 / 78%) 67%, rgb(10 23 31 / 60%));
  }
  .hero-content { gap: 0.55rem; padding-block: 1.25rem; }
  .hero .hero-actions { margin-block-start: 0; }
  .hero-actions .button { inline-size: 100%; }
}

@media (max-width: 31rem) and (max-height: 34rem) {
  .mobile-actions > .assistant-nudge { display: none; }
  .hero-shell { min-block-size: 0; }
  .hero-content { padding-block: 0.92rem 1.18rem; }
  .hero h1 { font-size: clamp(2.1rem, 9.4vw, 2.55rem); }
  .hero p:not(.call-note) { line-height: 1.4; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .button { gap: 0.34em; padding-inline: 0.52rem; font-size: 0.94rem; }
}

@media (min-width: 44rem) {
  .hero-shell::before {
    background: linear-gradient(90deg, rgb(10 23 31 / 90%), rgb(10 23 31 / 72%) 43%, rgb(10 23 31 / 8%) 92%);
  }
  .wake-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: stretch; }
  .chapter-photo { aspect-ratio: auto; min-block-size: 0; }
  .ofw-card.has-foliage {
    --rim-source: url("assets/sampaguita-rim-wide-fuller.webp");
    --rim-dense-source: url("assets/sampaguita-rim-wide-fuller-2x.webp");
    --rim-ratio: 2976 / 248;
  }
  .location-heading.has-foliage {
    --rim-source: url("assets/anthurium-rim-wide-fuller.webp");
    --rim-dense-source: url("assets/anthurium-rim-wide-fuller-2x.webp");
    --rim-ratio: 2976 / 316;
  }
}

@media (min-width: 57rem) {
  :root { --head-clearance: 5.75rem; --bottom-clearance: 0px; }
  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto repeat(3, minmax(0, 1fr));
    gap: 0.32rem;
    border-radius: var(--pill);
  }
  .nav-crest { grid-area: 1 / 4 / 2 / 5; }
  .nav-call { grid-area: 1 / 6 / 2 / 7; }
  .nav-help { grid-area: 1 / 5 / 2 / 6; }
  .nav-caskets { grid-area: 1 / 1 / 2 / 2; }
  .nav-guide { grid-area: 1 / 2 / 2 / 3; }
  .nav-location { grid-area: 1 / 3 / 2 / 4; }
  .nav-language { grid-area: 1 / 7 / 2 / 8; }
  .nav-link { padding: 0.45rem 0.3rem; }
  .wake-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ofw-card { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr); align-items: center; }
  .location-heading { grid-template-columns: minmax(0, 1fr) auto; }
  .mobile-actions { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  [data-reveal].entered {
    animation: section-in 640ms cubic-bezier(0.35, 0.05, 0.2, 1) both;
    transform-origin: center top;
  }
  .entered :is(.wake-card, .chapter-photo img) {
    animation: photo-in 550ms cubic-bezier(0.35, 0.05, 0.2, 1) both;
    animation-delay: var(--reveal-delay, 80ms);
  }
  .entered .wake-card:nth-child(3n + 2) { --reveal-delay: 150ms; }
  .entered .wake-card:nth-child(3n) { --reveal-delay: 220ms; }
  .entered .has-foliage::before { animation: flowering-drape-in 1250ms 140ms cubic-bezier(.24,.72,.33,1) both; }
  .entered :is(.foliage-cascade, .foliage-trail) { animation: flowering-drape-in 1280ms 230ms cubic-bezier(.24,.72,.33,1) both; }
}

@keyframes section-in {
  from { opacity: 0.34; transform: translateY(23px) scale(0.982); }
  to { opacity: 1; transform: none; }
}

@keyframes photo-in {
  from { opacity: 0.44; clip-path: inset(6% 0 4% round 0.5rem); }
  to { opacity: 1; clip-path: none; }
}

@keyframes flowering-drape-in {
  from { opacity: 0; translate: 0 -0.35rem; }
  to { opacity: 1; translate: none; }
}
@media (hover: hover) {
  .button-primary:hover { background: #274355; }
  .button-outline:hover, .icon-button:hover { background: #f1e7d7; }
  .hero .button-outline:hover { background: rgb(255 246 229 / 14%); }
  .hero .button-primary:hover, .nav-call:hover { background: #f0d8aa; }
  .nav-link:not(.nav-call):hover { background: rgb(255 249 236 / 13%); }
  .assistant-launch:hover { background: #294758; }
  .text-link:hover, .photo-link:hover .photo-caption span { text-decoration-line: underline; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.button, .nav-call, .nav-crest) { translate: var(--pull-x, 0px) var(--pull-y, 0px); transition: translate 200ms ease-out; }
  :is(a, button):is(:hover, :focus-visible) .phone-icon { animation: phone-ring 610ms ease-in-out both; }
  .nav-caskets:is(:hover, :focus-visible) .casket-lid { animation: casket-lid-open 710ms ease-in-out both; }
  .nav-guide:is(:hover, :focus-visible) :is(.book-left, .book-right) { animation: book-unfold 600ms cubic-bezier(.24,.77,.3,1) both; }
  .nav-location:is(:hover, :focus-visible) .globe-land { animation: earth-turn 700ms ease-in-out both; }
  .nav-help:is(:hover, :focus-visible) .help-ring { animation: gather-help-ring 690ms ease-in-out both; }
  .nav-help:is(:hover, :focus-visible) .help-hook { animation: grow-help-hook 690ms ease-in-out both; }
  .nav-help:is(:hover, :focus-visible) .help-dot { animation: swap-help-dot 690ms ease-in-out both; }
  .nav-help:is(:hover, :focus-visible) .help-moving-dot { animation: raise-help-dot 690ms ease-in-out both; }
  .nav-language:is(:hover, :focus-visible) .glyph-current { animation: glyph-leave 310ms ease-in-out both; }
  .nav-language:is(:hover, :focus-visible) .glyph-next { animation: glyph-arrive 310ms ease-in-out both; }
  [data-tilt] img {
    transform: perspective(580px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(var(--tilt-scale, 1));
    transition: transform 240ms ease-out;
  }
  [data-lit].is-lit:not(.has-foliage) { border-color: var(--gold); }
  @supports (mask-composite: exclude) {
    [data-lit].is-lit::after {
      content: "";
      position: absolute;
      z-index: 2;
      inset: -1px;
      padding: 2px;
      border-radius: inherit;
      background:
        radial-gradient(130px circle at var(--glow-x, 50%) var(--glow-y, 50%), #ffe0a1, #cc8f34 42%, transparent 92%),
        radial-gradient(3rem circle at top left, #d6a048 42%, transparent),
        radial-gradient(3rem circle at top right, #d6a048 42%, transparent),
        radial-gradient(3rem circle at bottom left, #d6a048 42%, transparent),
        radial-gradient(3rem circle at bottom right, #d6a048 42%, transparent);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask-composite: exclude;
      pointer-events: none;
    }
    /* Keep the moving highlight behind the garland's alpha cutout. */
    .has-foliage[data-lit].is-lit::after { z-index: 0; }
  }
}

@keyframes phone-ring {
  0%, 100% { transform: rotate(0); }
  14%, 42%, 68% { transform: rotate(-12deg); }
  27%, 55%, 81% { transform: rotate(12deg); }
}

@keyframes casket-lid-open {
  0%, 100% { transform: none; }
  46%, 60% { transform: translateY(-2.8px); }
}
@keyframes book-unfold {
  from { transform: scaleX(0.71); }
  to { transform: scaleX(1); }
}
@keyframes earth-turn { to { transform: translateX(-9px); } }
@keyframes gather-help-ring {
  0% { stroke-dasharray: 50 0 50 100; }
  76% { stroke-dasharray: 0.01 99.98 0.01 100; opacity: 1; }
  100% { stroke-dasharray: 0 100 0 100; opacity: 0; }
}
@keyframes grow-help-hook {
  0%, 16% { transform: none; }
  100% { transform: translateY(-0.7px) scale(1.48); }
}
@keyframes swap-help-dot {
  0%, 38% { opacity: 1; }
  65%, 100% { opacity: 0; }
}
@keyframes raise-help-dot {
  0%, 62% { opacity: 0; transform: none; }
  76% { opacity: 1; transform: none; }
  100% { opacity: 1; transform: translateY(-2.5px); }
}
@keyframes glyph-leave {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-105%); }
}
@keyframes glyph-arrive {
  from { opacity: 0; transform: translateY(105%); }
  to { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .main-nav, .hero-shell, .assistant-panel { border-color: CanvasText; }
  .nav-link, .button { border: 1px solid ButtonText; }
}

/* The launch layout uses one guidance card while wake photo rights are pending. */
.care-grid:not(:has(.chapter-photo)) {
  grid-template-columns: minmax(0, 1fr);
  inline-size: min(100%, 53rem);
  margin-inline: auto;
}
