:root {
  color-scheme: dark;
  --ink: #080705;
  --ink-soft: #11100d;
  --paper: #f5efe3;
  --muted: #bcb3a5;
  --gold: #d8a44b;
  --gold-light: #f1cf86;
  --line: rgba(232, 190, 107, .28);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; overflow-x: hidden; color: var(--paper); background: var(--ink); font-family: var(--sans); }
a { color: inherit; }

.skip-link { position: fixed; z-index: 100; left: 1rem; top: -4rem; padding: .8rem 1rem; background: var(--paper); color: var(--ink); transition: top .2s; }
.skip-link:focus { top: 1rem; }

.site-header { position: absolute; z-index: 10; inset: 0 0 auto; width: 100%; max-width: 100vw; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; padding: 1.4rem clamp(1.25rem, 4vw, 4.5rem); border-bottom: 1px solid rgba(255,255,255,.14); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.site-header p { margin: 0; color: rgba(255,255,255,.7); }
.monogram { display: grid; place-items: center; width: 2.6rem; aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 50%; font-family: var(--serif); text-decoration: none; letter-spacing: 0; }
.header-link { text-underline-offset: .35rem; text-decoration-color: var(--gold); }

.hero { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
.hero-image { position: absolute; z-index: -3; inset: 0; background: url("assets/memorial-hero.webp") 35% center / cover no-repeat; transform: scale(1.025); animation: hero-settle 2.2s cubic-bezier(.2,.7,.2,1) both; }
.hero-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(5,4,2,.08) 0%, rgba(5,4,2,.05) 42%, rgba(5,4,2,.48) 65%, rgba(5,4,2,.92) 100%), linear-gradient(0deg, rgba(5,4,2,.62), transparent 40%); }
.hero-copy { width: min(42rem, 48vw); margin-left: auto; padding: clamp(9rem, 17vh, 12rem) clamp(1.5rem, 6vw, 7rem) 5rem 1rem; }
.eyebrow { margin: 0 0 1.1rem; color: var(--gold-light); font-size: .76rem; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; color: #fff7e8; font-size: clamp(4.3rem, 8.4vw, 8.2rem); line-height: .72; letter-spacing: -.055em; text-shadow: 0 8px 36px rgba(0,0,0,.3); }
h1 span { display: block; }
h1 span:last-child { margin-left: .28em; color: var(--gold-light); font-style: italic; }
.tribute { margin: 2.2rem 0 0; color: #eee4d4; font: italic clamp(1.25rem, 2vw, 1.65rem)/1.4 var(--serif); }
.life-dates { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; color: rgba(255,255,255,.73); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.life-dates i { width: 2.8rem; height: 1px; background: var(--gold); }
.scroll-cue { display: inline-block; margin-top: 2.5rem; padding: .9rem 0 .65rem; border-bottom: 1px solid var(--gold); font-size: .78rem; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }

.services { padding: clamp(5rem, 11vw, 9rem) clamp(1.25rem, 7vw, 8rem); background: radial-gradient(circle at 90% 5%, rgba(216,164,75,.09), transparent 28%), var(--ink-soft); }
.section-intro { display: grid; grid-template-columns: .72fr 1.3fr; gap: 1rem 4rem; max-width: 72rem; margin: 0 auto 4rem; }
.section-intro .eyebrow { grid-column: 1 / -1; }
.section-intro h2 { margin: 0; font-size: clamp(3.2rem, 6vw, 6.2rem); line-height: .9; letter-spacing: -.04em; }
.section-intro > p:last-child { align-self: end; max-width: 35rem; margin: 0; color: var(--muted); font: 1.18rem/1.7 var(--serif); }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; max-width: 72rem; margin: auto; background: var(--line); border: 1px solid var(--line); }
.service-card { padding: clamp(1.5rem, 4vw, 3.5rem); background: #0c0b09; }
.card-topline { display: flex; justify-content: space-between; color: #857c6e; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.service-label { margin: 3rem 0 .7rem; color: var(--gold-light); font-size: .78rem; font-weight: 650; letter-spacing: .17em; text-transform: uppercase; }
.service-card time { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1.25rem; padding-bottom: 1.7rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.service-card time strong { font: 400 clamp(1.5rem, 3vw, 2.5rem)/1.15 var(--serif); }
.service-card time span { color: var(--gold-light); font: 400 1.35rem var(--serif); }
address { min-height: 5.4rem; margin: 1.7rem 0 1.2rem; color: var(--muted); font-style: normal; line-height: 1.65; }
.map-link { font-size: .78rem; letter-spacing: .12em; text-decoration-color: var(--gold); text-underline-offset: .4rem; text-transform: uppercase; }

.programme-preview { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1.4rem, 5vw, 5rem); padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 7vw, 8rem); color: #18130d; background: #e5c786; }
.programme-mark { display: grid; place-items: center; width: clamp(4.5rem, 8vw, 7rem); aspect-ratio: 1; border: 1px solid rgba(28,20,10,.35); border-radius: 50%; font-size: 2rem; }
.programme-copy { max-width: 45rem; }
.programme-copy .eyebrow { color: #6b4c1a; }
.programme-copy h2 { margin: 0 0 1rem; font-size: clamp(2.5rem, 5vw, 5rem); line-height: .95; }
.programme-copy p:last-child { max-width: 39rem; margin: 0; line-height: 1.65; }
.programme-status { padding: .75rem 1rem; border: 1px solid rgba(28,20,10,.25); border-radius: 999px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.programme-status span { display: inline-block; width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: #6b4c1a; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.25rem, 7vw, 8rem); color: #887f73; background: #050403; font: italic 1rem var(--serif); }
footer p { margin: 0; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.65,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero-copy .reveal:nth-child(2) { transition-delay: .12s; }
.hero-copy .reveal:nth-child(3) { transition-delay: .22s; }
.hero-copy .reveal:nth-child(4) { transition-delay: .3s; }
.hero-copy .reveal:nth-child(5) { transition-delay: .38s; }
.hero-copy .reveal { opacity: 1; transform: none; animation: copy-rise .8s cubic-bezier(.2,.65,.2,1) both; }
.hero-copy .reveal:nth-child(2) { animation-delay: .12s; }
.hero-copy .reveal:nth-child(3) { animation-delay: .22s; }
.hero-copy .reveal:nth-child(4) { animation-delay: .3s; }
.hero-copy .reveal:nth-child(5) { animation-delay: .38s; }
.service-card:nth-child(2) { transition-delay: .12s; }

@keyframes hero-settle { from { transform: scale(1.07); filter: brightness(.8); } to { transform: scale(1.025); filter: brightness(1); } }
@keyframes copy-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 780px) {
  .site-header { grid-template-columns: auto minmax(0, 1fr); padding-inline: 1.1rem; }
  .site-header p { display: none; }
  .header-link { justify-self: end; font-size: .68rem; white-space: nowrap; }
  .hero { min-height: 850px; }
  .hero-image { background-position: 30% top; background-size: auto 62%; background-color: #080705; }
  .hero-shade { background: linear-gradient(0deg, #080705 34%, rgba(8,7,5,.88) 49%, transparent 73%); }
  .hero-copy { position: absolute; inset: auto 0 0; width: auto; padding: 0 1.25rem 4.2rem; }
  h1 { font-size: clamp(3.6rem, 18vw, 5.3rem); }
  .section-intro { grid-template-columns: 1fr; }
  .section-intro .eyebrow { grid-column: auto; }
  .service-grid { grid-template-columns: 1fr; }
  .programme-preview { grid-template-columns: auto 1fr; }
  .programme-status { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 450px) {
  .hero { min-height: 820px; }
  .hero-image { background-size: auto 58%; background-position: 26% top; }
  .hero-copy { padding-bottom: 3rem; }
  .service-card time { grid-template-columns: 1fr; gap: .6rem; }
  .programme-preview { grid-template-columns: 1fr; }
  .programme-mark { width: 4.2rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
