@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  --paper: #111613;
  --paper-deep: #1a231e;
  --ink: #eee9df;
  --muted: #aab3aa;
  --line: rgba(238, 233, 223, 0.17);
  --sage: #758f7d;
  --sage-deep: #b5c8b4;
  --copper: #c78963;
  --white: #fbf8f1;
  --deep: #161d1a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  filter: invert(1);
  z-index: 10;
}
::selection { background: #d7c4ac; color: var(--ink); }
a { color: inherit; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: var(--white); padding: .75rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.site-shell { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 90px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wordmark-mark { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid var(--copper); border-radius: 50%; color: var(--copper); font-size: .65rem; }
.topbar-note { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: .96fr 1.04fr; gap: clamp(2.5rem, 8vw, 8rem); align-items: center; min-height: 730px; padding: 5.25rem 0 6.5rem; }
.hero-copy { padding-left: clamp(0rem, 3vw, 3rem); }
.eyebrow { margin: 0 0 1.4rem; color: var(--copper); font-size: .7rem; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; line-height: .98; letter-spacing: -.045em; }
h1 { font-size: clamp(3.6rem, 7vw, 6.8rem); }
h2 { font-size: clamp(2.8rem, 5vw, 5.4rem); }
h1 em, h2 em { color: var(--sage-deep); font-weight: 500; }
.rule { width: 76px; height: 2px; margin: 2.2rem 0 1.8rem; background: var(--copper); }
.hero-lede { max-width: 350px; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.memorial-facts { display: flex; align-items: center; gap: 1.8rem; margin: 2.8rem 0 2.6rem; }
.fact { display: grid; gap: .35rem; }
.fact-label { color: var(--muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.fact strong { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; font-weight: 500; }
.fact-divider { width: 1px; height: 42px; background: var(--line); }
.quiet-button { display: inline-flex; align-items: center; gap: .9rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: .45rem; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; transition: gap .25s ease, color .25s ease; }
.quiet-button:hover, .quiet-button:focus-visible { gap: 1.3rem; color: var(--copper); }
.hero-portrait { position: relative; justify-self: end; width: min(100%, 500px); }
.portrait-frame { position: relative; isolation: isolate; padding: 1.15rem; background: #202a24; box-shadow: var(--shadow); transform: rotate(2.5deg); }
.portrait-frame::after { content: ''; position: absolute; inset: 13px; border: 1px solid rgba(251, 248, 241, .34); pointer-events: none; }
.portrait-glow { position: absolute; right: -28px; bottom: -28px; width: 58%; height: 62%; background: var(--sage); opacity: .33; z-index: -1; }
.portrait-frame img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; filter: saturate(.82) contrast(.98); }
.portrait-expand { position: absolute; left: 2rem; bottom: 2rem; border: 1px solid rgba(255, 253, 249, .65); background: rgba(32, 39, 36, .8); color: var(--white); padding: .7rem .9rem; cursor: pointer; font: inherit; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; transition: background .2s ease, transform .2s ease; }
.portrait-expand:hover, .portrait-expand:focus-visible { background: var(--copper); transform: translateY(-2px); }
.portrait-caption { margin: 1.25rem 0 0; color: var(--muted); font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; font-style: italic; text-align: right; }
.tribute-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 10vw, 11rem); padding: 6.5rem clamp(0rem, 7vw, 8rem); border-top: 1px solid var(--line); }
.section-intro h2 { font-size: clamp(2.9rem, 5vw, 5rem); }
.tribute-copy { align-self: end; max-width: 420px; color: var(--muted); font-size: 1.02rem; line-height: 1.9; }
.tribute-copy p { margin: 0 0 1.4rem; }
.tribute-copy .dropcap::first-letter { float: left; margin: .18rem .65rem 0 0; color: var(--copper); font-family: 'Playfair Display', Georgia, serif; font-size: 4.7rem; line-height: .72; }
.life-story { padding: 1.5rem clamp(0rem, 7vw, 8rem) 6.5rem; }
.life-story-heading { display: grid; grid-template-columns: .9fr 1.25fr .8fr; gap: 2rem; align-items: end; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.life-story-heading .eyebrow { align-self: start; padding-top: .5rem; }
.life-story-heading h2 { font-size: clamp(2.8rem, 5vw, 5rem); }
.story-intro { max-width: 270px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.story-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1px; margin-top: 1px; background: var(--line); }
.story-card { min-height: 280px; padding: 2rem; background: var(--paper); }
.story-card-featured { background: var(--paper-deep); }
.story-number, .memory-note span { color: var(--copper); font-size: .68rem; font-weight: 600; letter-spacing: .16em; }
.story-card h3 { margin: 3.6rem 0 1.3rem; font-family: 'Playfair Display', Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.story-card p { max-width: 340px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.8; }
.family-letter { display: grid; grid-template-columns: .3fr 1fr 1.2fr; gap: 1rem; align-items: start; padding: 5.5rem clamp(0rem, 7vw, 8rem); background: #202b24; }
.family-letter-mark { color: var(--copper); font-family: 'Playfair Display', Georgia, serif; font-size: 7rem; line-height: .5; }
.family-letter h2 { font-size: clamp(2.8rem, 5vw, 5rem); }
.family-letter-copy { max-width: 430px; padding-top: 2.9rem; color: #b7c2b7; font-size: .97rem; line-height: 1.85; }
.family-letter-copy p { margin: 0 0 1.5rem; }
.memory-notes { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 10vw, 10rem); padding: 6.5rem clamp(0rem, 7vw, 8rem); }
.memory-notes-heading h2 { font-size: clamp(2.8rem, 5vw, 5rem); }
.memory-notes-list { border-top: 1px solid var(--line); }
.memory-note { display: grid; grid-template-columns: 44px 1fr; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.memory-note p { max-width: 450px; margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.75; }
.remembrance { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 640px; margin: 2rem 0 7rem; background: var(--deep); color: var(--white); overflow: hidden; }
.remembrance-visual { position: relative; min-height: 580px; overflow: hidden; background: radial-gradient(circle at 50% 48%, #3b5148 0%, #24312b 32%, #202724 74%); perspective: 1100px; }
.scene-grid { position: absolute; inset: 0; opacity: .17; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 42px 42px; transform: perspective(400px) rotateX(61deg) scale(1.7) translateY(33%); transform-origin: center bottom; }
.memory-orb { position: absolute; left: 50%; top: 48%; width: 280px; height: 280px; transform: translate(-50%, -50%) rotateX(8deg); transform-style: preserve-3d; }
.orb-halo { position: absolute; border: 1px solid rgba(223, 193, 153, .42); border-radius: 50%; transform-style: preserve-3d; }
.halo-one { inset: -25px; transform: rotateX(70deg) rotateY(12deg); }
.halo-two { inset: -48px; border-color: rgba(113, 131, 118, .45); transform: rotateY(70deg) rotateX(14deg); }
.orb-core { position: absolute; inset: 47px; border-radius: 50%; background: radial-gradient(circle at 34% 27%, #fff1c9 0%, #e3ad66 19%, #a56b42 43%, #4b382d 72%, #24241f 100%); box-shadow: 0 0 26px rgba(233, 186, 105, .58), 0 0 100px rgba(218, 159, 84, .25); transform: translateZ(18px); }
.orb-flame { position: absolute; left: 50%; top: 21%; width: 24px; height: 44px; border-radius: 70% 30% 68% 32% / 65% 50% 50% 35%; background: #fff1c6; box-shadow: 0 0 22px #f2bd6e, 0 0 55px rgba(243, 177, 88, .8); transform: translateX(-50%) rotate(45deg) translateZ(36px); animation: breathe 3.8s ease-in-out infinite; }
.orbit { position: absolute; inset: 0; border: 1px solid rgba(227, 190, 139, .45); border-radius: 50%; transform-style: preserve-3d; }
.orbit span { position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #e7bd83; box-shadow: 0 0 12px #e7bd83; }
.orbit-a { transform: rotateX(68deg) rotateY(18deg); animation: orbit-a 13s linear infinite; }
.orbit-b { transform: rotateX(70deg) rotateY(74deg) rotateZ(27deg); animation: orbit-b 17s linear infinite reverse; }
.orbit-c { inset: 20px; border-color: rgba(113, 158, 132, .5); transform: rotateX(79deg) rotateY(13deg); animation: orbit-a 22s linear infinite reverse; }
.scene-label { position: absolute; color: rgba(255,255,255,.56); font-size: .63rem; letter-spacing: .18em; text-transform: uppercase; }
.scene-label-one { left: 12%; top: 16%; }
.scene-label-two { right: 12%; bottom: 17%; }
.remembrance-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 6vw, 6rem); }
.remembrance-copy .eyebrow { color: #d6aa73; }
.remembrance-copy h2 { color: var(--white); font-size: clamp(3rem, 5.3vw, 5.2rem); }
.remembrance-copy h2 em { color: #d6c5a9; }
.remembrance-copy > p:not(.eyebrow):not(.candle-status) { max-width: 360px; margin: 2rem 0; color: rgba(255,255,255,.65); line-height: 1.8; }
.candle-button { display: inline-flex; align-items: center; align-self: flex-start; gap: .7rem; border: 1px solid rgba(227, 190, 139, .65); background: transparent; color: var(--white); padding: .85rem 1rem; cursor: pointer; font: inherit; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.candle-button:hover, .candle-button:focus-visible, .candle-button[aria-pressed='true'] { border-color: #e7bd83; background: #e7bd83; color: var(--ink); }
.candle-icon { color: #e7bd83; }
.candle-button[aria-pressed='true'] .candle-icon { color: var(--ink); }
.candle-status { margin: .9rem 0 0; color: rgba(255,255,255,.42); font-size: .82rem; }
.closing { padding: 0 0 6rem; text-align: center; }
.closing-line { width: 1px; height: 90px; margin: 0 auto 2.5rem; background: var(--copper); }
.closing h2 { font-size: clamp(2.8rem, 5vw, 5rem); }
.closing-note { margin: 2.2rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.8; }
.footer { display: flex; justify-content: space-between; padding: 1.35rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.portrait-dialog { width: min(860px, calc(100% - 2rem)); padding: 0; border: 0; background: var(--ink); color: var(--white); box-shadow: 0 24px 100px rgba(0,0,0,.35); }
.portrait-dialog::backdrop { background: rgba(18, 22, 20, .82); backdrop-filter: blur(5px); }
.dialog-inner { padding: 1rem; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; padding: .25rem .25rem 1rem .4rem; }
.dialog-heading h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; }
.dialog-close { border: 0; background: transparent; color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer; }
.dialog-inner img { display: block; width: 100%; max-height: 78vh; object-fit: contain; }
:focus-visible { outline: 3px solid #bf835d; outline-offset: 4px; }
@keyframes breathe { 0%, 100% { transform: translateX(-50%) rotate(45deg) translateZ(36px) scale(.92); opacity: .82; } 50% { transform: translateX(-50%) rotate(45deg) translateZ(36px) scale(1.1); opacity: 1; } }
@keyframes orbit-a { from { transform: rotateX(68deg) rotateY(18deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateY(18deg) rotateZ(360deg); } }
@keyframes orbit-b { from { transform: rotateX(70deg) rotateY(74deg) rotateZ(27deg); } to { transform: rotateX(70deg) rotateY(74deg) rotateZ(387deg); } }
@media (max-width: 760px) {
  .site-shell { width: min(100% - 2rem, 560px); }
  .topbar { min-height: 74px; }
  .topbar-note { display: none; }
  .hero { grid-template-columns: 1fr; gap: 3.7rem; min-height: auto; padding: 4rem 0 5rem; }
  .hero-copy { padding-left: 0; }
  .hero-portrait { width: min(100%, 460px); justify-self: center; }
  .tribute-section, .remembrance { grid-template-columns: 1fr; }
  .tribute-section { gap: 3rem; padding: 5rem 0; }
  .life-story { padding: 1rem 0 5rem; }
  .life-story-heading { grid-template-columns: 1fr; gap: 1rem; padding-bottom: 2.2rem; }
  .story-intro { max-width: 390px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: auto; padding: 1.7rem; }
  .story-card h3 { margin-top: 2.2rem; }
  .family-letter { grid-template-columns: 1fr; gap: .5rem; padding: 4.5rem 0; }
  .family-letter-mark { font-size: 5.5rem; }
  .family-letter-copy { padding-top: 1rem; }
  .memory-notes { grid-template-columns: 1fr; gap: 3rem; padding: 5rem 0; }
  .remembrance { margin: 1rem 0 5rem; }
  .remembrance-visual { min-height: 420px; }
  .memory-orb { transform: translate(-50%, -50%) scale(.78) rotateX(8deg); }
  .remembrance-copy { padding: 3.5rem 2rem 4rem; }
  .footer { flex-direction: column; gap: .6rem; text-align: center; }
  .footer span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
