@font-face {
  font-family: 'SPHeading';
  src: url('/fonts/EBGaramondSC12-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'SPBody';
  src: url('/fonts/Tinos-Regular.ttf') format('truetype');
}
:root {
  --bg: #f5f1ea;
  --panel: #f8f4ee;
  --panel-2: #efe5d7;
  --text: #2f241c;
  --muted: #6a5647;
  --line: #d8c9b6;
  --accent: #8b633c;
  --accent-dark: #6d4a29;
  --accent-soft: #e9dccd;
  --success: #31523d;
  --shadow: 0 14px 34px rgba(64, 43, 24, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8f4ee 0%, #f4efe7 100%);
  color: var(--text);
  font-family: 'SPBody', Georgia, serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 244, 238, 0.92);
  border-bottom: 1px solid rgba(216, 201, 182, 0.8);
  backdrop-filter: blur(10px);
}
.topbar-inner {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'SPHeading', Georgia, serif;
  font-size: 1.35rem;
}
.brand img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
}
.back-link {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdfb;
}
.page-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 28px auto 46px;
}
.demo-banner,
.hero-card,
.info-card,
.gallery-card,
.text-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.demo-banner {
  padding: 16px 20px;
  margin-bottom: 24px;
  background: #eef4ec;
  border-color: #cad9c8;
}
.hero-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 30px;
  padding: 34px;
  align-items: center;
}
.hero-copy h1,
.section-heading h2,
.text-card h2,
.info-card h2 {
  margin: 0;
  font-family: 'SPHeading', Georgia, serif;
  letter-spacing: 0.02em;
}
.hero-copy h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 0.92;
  margin-top: 8px;
  margin-bottom: 12px;
}
.eyebrow {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.dates {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--muted);
}
.lead {
  margin: 0 0 16px;
  font-size: 1.2rem;
  line-height: 1.55;
}
.tribute {
  margin: 0;
  line-height: 1.65;
  font-size: 1.06rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-weight: 700;
}
.button:hover { transform: translateY(-1px); }
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(139, 99, 60, 0.22);
}
.button.primary:hover { background: var(--accent-dark); }
.button.secondary {
  background: var(--accent-soft);
  border-color: var(--line);
}
.button.full { width: 100%; margin-top: 14px; }
.hero-image-wrap {
  min-height: 100%;
}
.hero-image {
  width: 100%;
  aspect-ratio: 4 / 4.2;
  object-fit: cover;
  border-radius: 24px;
}
.info-grid,
.memory-text-grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}
.info-grid { grid-template-columns: 0.95fr 1.05fr; }
.memory-text-grid { grid-template-columns: 1fr 1fr; }
.info-card,
.gallery-card,
.text-card { padding: 28px; }
.info-card h2,
.gallery-card h2,
.text-card h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 12px; }
.qr-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: center;
}
.qr-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}
.small-note {
  margin-top: 12px;
  color: var(--muted);
}
.small-note span {
  font-size: 0.92rem;
  word-break: break-word;
}
.slate-preview {
  border-radius: 20px;
  border: 1px solid var(--line);
}
.gallery-card { margin-top: 24px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.gallery-help { margin: 0; color: var(--muted); }
.gallery-viewer {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
}
.gallery-viewer img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.25s ease;
}
.featured-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(28,20,14,0.7) 100%);
  border-radius: 16px;
  font-size: 1rem;
}
.thumb-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.thumb {
  margin: 0;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(64, 43, 24, 0.08);
}
.thumb img {
  width: 100%;
  aspect-ratio: 1.1 / 1;
  object-fit: cover;
}
.thumb.is-active { border-color: var(--accent); }
.text-card p {
  margin-top: 0;
  line-height: 1.7;
  font-size: 1.05rem;
}
.candle-card { background: linear-gradient(180deg, #fbf7f1 0%, #f7f0e6 100%); }
.candle-visual {
  position: relative;
  width: 112px;
  height: 150px;
  margin: 18px auto 14px;
}
.candle-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72px;
  height: 98px;
  transform: translateX(-50%);
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #fff7e8 0%, #f0dbc0 100%);
  border: 1px solid #e0c8a8;
}
.candle-flame {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 24px;
  height: 40px;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(circle at 50% 30%, #fffbe6 0%, #ffd672 45%, #f29c2f 78%, #da6d11 100%);
  box-shadow: 0 0 20px rgba(255, 182, 69, 0.8);
  opacity: 0.35;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.candle-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 219, 130, 0.6) 0%, rgba(255, 219, 130, 0) 72%);
  opacity: 0.25;
  transition: opacity 0.25s ease;
}
.candle-visual.is-lit .candle-flame { opacity: 1; transform: translateX(-50%) scale(1.04); }
.candle-visual.is-lit .candle-glow { opacity: 1; }
.occasion-label { display: block; font-weight: 700; margin-bottom: 8px; }
#occasion-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdfa;
}
.candle-status {
  margin-top: 14px;
  margin-bottom: 10px;
  color: var(--success);
  font-weight: 700;
}
.candle-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.candle-history li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.footer-note {
  padding: 10px 18px 30px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 980px) {
  .hero-card,
  .info-grid,
  .memory-text-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 24px; }
  .thumb-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .page-shell,
  .topbar-inner { width: min(100% - 20px, 1200px); }
  .topbar-inner { min-height: 72px; }
  .brand span { font-size: 1.15rem; }
  .hero-copy h1 { font-size: 3rem; }
  .qr-layout { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; align-items: start; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .info-card,
  .gallery-card,
  .text-card,
  .hero-card { border-radius: 22px; }
}

/* Enhanced remembrance moment and candle wall */
.occasion-label span {
  color: var(--muted);
  font-weight: 400;
  font-size: .9em;
}
.candle-input {
  width: 100%;
  margin: 0 0 13px;
  padding: 12px 14px;
  color: var(--text);
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  resize: vertical;
}
.candle-input:focus,
#occasion-select:focus {
  outline: 3px solid rgba(139,99,60,.18);
  border-color: var(--accent);
}
.candle-total {
  margin: 10px 0 0 !important;
  padding: 10px 12px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.65);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.candle-wall-card {
  margin-top: 24px;
  padding: 28px;
  background: linear-gradient(180deg,#f8f4ee 0%,#efe4d5 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.candle-wall {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}
.wall-candle {
  position: relative;
  min-height: 205px;
  padding: 22px 18px 18px;
  text-align: center;
  background: rgba(255,253,249,.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.wall-candle::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 26%,rgba(255,210,113,.26),transparent 36%);
}
.wall-flame {
  position: relative;
  width: 16px;
  height: 28px;
  margin: 0 auto 4px;
  border-radius: 55% 55% 50% 50% / 68% 68% 35% 35%;
  background: radial-gradient(circle at 50% 30%,#fffbea 0%,#ffd36f 45%,#ef9228 78%,#d4660e 100%);
  box-shadow: 0 0 18px rgba(255,176,54,.75);
  animation: wallFlicker 1.8s ease-in-out infinite alternate;
}
.wall-body {
  width: 46px;
  height: 54px;
  margin: 0 auto 14px;
  border: 1px solid #dec6a5;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg,#fff8e9,#efd9bc);
}
.wall-candle h3 { margin: 0 0 6px; font-family:'SPHeading',Georgia,serif; font-size:1.25rem; }
.wall-candle p { margin: 5px 0; line-height:1.4; }
.wall-candle .wall-message { color: var(--muted); font-style: italic; }
.wall-candle .wall-date { font-size:.9rem; color:var(--muted); }
.empty-candle-wall { margin: 0; padding: 24px; text-align:center; color:var(--muted); border:1px dashed var(--line); border-radius:18px; }

.remembrance-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: rgba(25,18,13,.82);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .45s ease;
}
.remembrance-overlay[hidden] { display:none; }
.remembrance-overlay.is-visible { opacity:1; }
.remembrance-moment {
  position: relative;
  z-index: 2;
  width: min(520px,100%);
  padding: 34px 28px;
  text-align: center;
  color: #fdf8f0;
  background: linear-gradient(180deg,rgba(84,56,34,.94),rgba(42,29,20,.97));
  border: 1px solid rgba(255,231,190,.34);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0,0,0,.46);
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .55s ease, opacity .55s ease;
}
.remembrance-overlay.is-visible .remembrance-moment { transform: translateY(0) scale(1); opacity:1; }
.remembrance-moment .eyebrow { color:#e8c890; }
.remembrance-moment h2 { margin:8px 0 10px; font-family:'SPHeading',Georgia,serif; font-size:clamp(2rem,6vw,3rem); }
.remembrance-occasion { margin:0 0 8px; font-size:1.15rem; color:#f3d6a9; }
.remembrance-message { min-height:1.5em; margin:0 0 22px; font-size:1.08rem; font-style:italic; line-height:1.5; }
.moment-candle { position:relative; width:126px; height:165px; margin:0 auto 12px; }
.moment-body {
  position:absolute; left:50%; bottom:0; width:76px; height:104px; transform:translateX(-50%);
  border-radius:18px 18px 10px 10px; background:linear-gradient(180deg,#fff8e8,#ebd3b2); border:1px solid rgba(255,255,255,.5);
}
.moment-flame {
  position:absolute; left:50%; top:18px; width:28px; height:48px; transform:translateX(-50%);
  border-radius:55% 55% 50% 50% / 68% 68% 35% 35%;
  background:radial-gradient(circle at 50% 30%,#fffdf0 0%,#ffd772 42%,#f49a2c 75%,#d5650e 100%);
  box-shadow:0 0 30px rgba(255,181,66,.95);
  animation:momentFlicker 1.25s ease-in-out infinite alternate;
}
.moment-glow { position:absolute; left:50%; top:-8px; width:130px; height:130px; transform:translateX(-50%); border-radius:50%; background:radial-gradient(circle,rgba(255,214,123,.58),rgba(255,214,123,0) 72%); animation:momentPulse 2.3s ease-in-out infinite; }
.remembrance-particles { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.remembrance-particle { position:absolute; bottom:-40px; width:9px; height:9px; border-radius:50%; background:#ffd88a; box-shadow:0 0 12px rgba(255,216,138,.8); opacity:0; animation:riseParticle var(--duration,4s) ease-out var(--delay,0s) forwards; }
.remembrance-particle.heart { width:12px; height:12px; border-radius:2px; transform:rotate(45deg); background:#f3b5a4; }
.remembrance-particle.heart::before,.remembrance-particle.heart::after { content:""; position:absolute; width:12px; height:12px; border-radius:50%; background:inherit; }
.remembrance-particle.heart::before { left:-6px; }
.remembrance-particle.heart::after { top:-6px; }
.remembrance-particle.snow { width:7px; height:7px; background:#fff; box-shadow:0 0 9px rgba(255,255,255,.85); }
.remembrance-particle.star { width:11px; height:11px; border-radius:0; background:#ffe5a8; clip-path:polygon(50% 0,61% 36%,100% 38%,69% 59%,79% 100%,50% 74%,21% 100%,31% 59%,0 38%,39% 36%); }
body.remembrance-open { overflow:hidden; }
@keyframes momentFlicker { from{transform:translateX(-50%) rotate(-1.6deg) scale(.98)} to{transform:translateX(-50%) rotate(1.4deg) scale(1.05)} }
@keyframes momentPulse { 0%,100%{opacity:.65;transform:translateX(-50%) scale(.94)} 50%{opacity:1;transform:translateX(-50%) scale(1.06)} }
@keyframes wallFlicker { from{transform:rotate(-1deg) scale(.98)} to{transform:rotate(1deg) scale(1.04)} }
@keyframes riseParticle { 0%{opacity:0;transform:translate3d(0,20px,0) scale(.6)} 15%{opacity:.95} 100%{opacity:0;transform:translate3d(var(--drift,0px),-105vh,0) scale(1.25)} }
@media (max-width:900px){ .candle-wall{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:620px){ .candle-wall{grid-template-columns:1fr;} .remembrance-moment{padding:28px 20px;} }
@media (prefers-reduced-motion:reduce){ .remembrance-particle,.moment-flame,.moment-glow,.wall-flame{animation:none!important;} }

.product-overview-card,
.how-it-works-card,
.pricing-cta-card,
.candle-wall-card{
  margin-top:24px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
  padding:28px;
}
.section-heading.compact{align-items:flex-start}
.feature-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.feature-tile{
  background:#fffdf9;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px 18px 16px;
}
.feature-tile h3, .step-tile h3{
  margin:0 0 10px;
  font-family:'SPHeading', Georgia, serif;
  font-size:1.3rem;
}
.feature-tile p, .step-tile p, .pricing-cta-card p, .pricing-list li{
  margin:0;
  line-height:1.65;
}
.step-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.step-tile{
  background:#fffdf9;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
}
.step-tile span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin-bottom:12px;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  font-weight:700;
}
.pricing-cta-card{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:24px;
  align-items:center;
  background:linear-gradient(145deg,#fbf7f1 0%, #efe2d0 100%);
}
.pricing-list{
  margin:16px 0 0;
  padding-left:18px;
  display:grid;
  gap:8px;
}
.cta-actions{
  display:flex;
  flex-direction:column;
  gap:14px;
}
@media (max-width: 980px) {
  .feature-grid{grid-template-columns:1fr 1fr;}
  .step-grid, .pricing-cta-card{grid-template-columns:1fr 1fr;}
}
@media (max-width: 700px) {
  .feature-grid, .step-grid, .pricing-cta-card{grid-template-columns:1fr;}
  .product-overview-card, .how-it-works-card, .pricing-cta-card, .candle-wall-card{padding:22px;}
}

.coming-soon-note{
  margin-top:18px;
  padding:14px 16px;
  border:1px solid #d8c9b6;
  border-radius:16px;
  background:linear-gradient(145deg,#fffaf3 0%, #efe3d3 100%);
  color:var(--text);
  font-size:1.02rem;
  line-height:1.55;
}
.demo-banner strong:last-child{
  color:var(--accent-dark);
}

.message-support-card{
  margin-top:24px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:22px;
  align-items:flex-start;
  padding:28px;
  background:linear-gradient(145deg,#fffaf4 0%,#efe2d2 100%);
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
}
.message-support-card h2{
  margin:4px 0 12px;
  font-family:'SPHeading',Georgia,serif;
  font-size:clamp(1.8rem,3vw,2.5rem);
}
.message-support-card p:not(.eyebrow){
  margin:0 0 12px;
  max-width:900px;
  font-size:1.06rem;
  line-height:1.7;
}
.message-support-card p:last-child{margin-bottom:0}
.message-support-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:58px;
  height:58px;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  font-size:2rem;
  line-height:1;
  box-shadow:0 8px 20px rgba(139,99,60,.24);
}
@media(max-width:700px){
  .message-support-card{grid-template-columns:1fr;padding:22px}
  .message-support-icon{width:50px;height:50px;font-size:1.7rem}
}

.real-product-note{
  display:grid;
  grid-template-columns:190px 1fr;
  gap:22px;
  align-items:center;
  margin-top:14px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(145deg,#fffdf9 0%,#efe4d5 100%);
}
.real-product-qr{
  width:100%;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.real-product-note p{
  margin:0 0 12px;
  line-height:1.65;
}
.real-product-note p:last-child{margin-bottom:0}
@media(max-width:700px){
  .real-product-note{grid-template-columns:1fr}
  .real-product-qr{width:min(220px,100%);margin:auto}
}


/* Separate product-information and finished memorial pages */
.memorial-only-page .page-shell{max-width:1120px}
.memorial-only-page .memorial-hero-card{background:linear-gradient(145deg,#fbf7f1 0%,#efe4d6 100%)}
.memorial-only-page .hero-copy .lead{font-style:italic;color:var(--accent-dark)}
.product-info-page .product-coming-soon-banner{text-align:center;font-size:1.08rem}
.product-info-page .product-hero-card{background:linear-gradient(145deg,#fffaf3 0%,#eadbc6 100%)}
.product-info-grid{align-items:stretch}
.compassionate-message-card{background:linear-gradient(145deg,#fffdf9 0%,#efe4d5 100%)}
.compassionate-message-card p{line-height:1.7}
@media(max-width:700px){
  .topbar-inner{align-items:center}
  .back-link{padding:10px 12px;text-align:center;font-size:.9rem}
}


/* Product page: centred QR leading to the separate finished Buddy memorial */
.product-demo-qr-card{
  margin-top:24px;
  padding:34px 28px;
  text-align:center;
}
.product-demo-qr-card h2{
  margin:4px auto 12px;
  font-size:clamp(2rem,4vw,3rem);
  font-family:'SPHeading', Georgia, serif;
}
.product-demo-qr-intro{
  max-width:760px;
  margin:0 auto 22px;
  font-size:1.08rem;
  line-height:1.65;
}
.product-demo-qr-link{
  display:block;
  width:min(310px,82vw);
  margin:0 auto;
  padding:14px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:0 12px 26px rgba(64,43,24,.13);
}
.product-demo-qr-image{
  width:100%;
  border-radius:12px;
}
.product-demo-qr-help{
  max-width:620px;
  margin:18px auto 0;
  color:var(--muted);
}
.message-support-full{
  margin-top:24px;
  text-align:center;
}
.message-support-full p{
  max-width:850px;
  margin:0 auto 14px;
  line-height:1.68;
}
@media(max-width:700px){
  .product-demo-qr-card{padding:28px 18px;}
  .product-demo-qr-link{width:min(280px,88vw);}
}
