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

/* ── Tokens ─────────────────────────────────────────────────────────────── */
/* Same brand family as the memorial pages (warm espresso + candlelight gold),
   inverted: daylight paper by default, dark reserved for the plate/scan/close —
   so the marketing site and the memorial it sells feel like one world. */
:root {
  --bg:          oklch(0.97 0.010 78);
  --bg-deep:     oklch(0.935 0.014 74);
  --surface:     oklch(0.965 0.010 74);
  --border:      oklch(0.87 0.014 70);
  --ink:         oklch(0.23 0.018 52);
  --muted:       oklch(0.46 0.020 56);

  --navy:        oklch(0.19 0.024 52);
  --navy-mid:    oklch(0.26 0.028 52);
  --navy-deep:   oklch(0.14 0.020 50);
  --gold:        oklch(0.74 0.115 72);
  --gold-dim:    oklch(0.52 0.095 62);
  --gold-glow:   oklch(0.74 0.115 72 / 0.20);

  --hero-text:   oklch(0.97 0.008 76);
  --hero-muted:  oklch(0.84 0.014 74);
  --hero-gold:   oklch(0.85 0.100 78);

  --metal-hi:    oklch(0.90 0.010 75);
  --metal-mid:   oklch(0.74 0.012 70);
  --metal-lo:    oklch(0.52 0.014 60);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --content-w: 1080px;
  --reading-w: 62ch;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.landing {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page-container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding-inline: 2rem;
  width: 100%;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ── Reveal + focus (same proven pattern as the memorial page) ──────────── */
.js-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.js-ready .reveal.visible { opacity: 1; transform: none; }
.reveals-off .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-nav:not(.scrolled) a:focus-visible,
.plate-hero a:focus-visible,
.closing-section a:focus-visible { outline-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .plate-sheen, .scan-plate-wrap, .scan-phone-wrap, .hero-scroll-cue { transition: none !important; }
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  /* solid, matching the hero's own colour — the nav sits in normal flow
     above the hero, not overlapping it, so literal transparency would only
     reveal the page background, not the hero image beneath */
  background: var(--navy-deep);
  transition: background 0.3s, box-shadow 0.3s;
  padding: 0 2rem;
  height: 60px;
  display: flex; align-items: center; gap: 2rem;
}
.site-nav.scrolled { background: var(--bg); box-shadow: 0 2px 20px oklch(0 0 0 / 0.06); }

.nav-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.nav-logo svg { flex-shrink: 0; transition: opacity 0.3s; }
.site-nav.scrolled .nav-logo svg path { fill: var(--gold-dim); }
.nav-logo-text { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hero-muted); transition: color 0.3s; }
.site-nav.scrolled .nav-logo-text { color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav-link { font-family: var(--font-ui); font-size: 0.82rem; color: var(--hero-muted); text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 4px; transition: color 0.2s; white-space: nowrap; }
.nav-link:hover { color: var(--hero-text); }
.site-nav.scrolled .nav-link { color: var(--muted); }
.site-nav.scrolled .nav-link:hover { color: var(--ink); }

.nav-cta { font-family: var(--font-ui); font-size: 0.8rem; color: var(--gold); border: 1px solid oklch(0.74 0.115 72 / 0.5); padding: 0.4rem 1rem; border-radius: 20px; text-decoration: none; white-space: nowrap; transition: background 0.2s, color 0.2s; display: flex; align-items: center; gap: 0.4rem; margin-left: 0.5rem; }
.nav-cta:hover { background: var(--gold-glow); }
.site-nav.scrolled .nav-cta { color: var(--gold-dim); border-color: oklch(0.52 0.095 62 / 0.4); }

.read-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(to right, var(--gold-dim), var(--gold)); transform: scaleX(0); transform-origin: left; will-change: transform; }

@media (max-width: 900px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }

/* ── The Plate (hero) ───────────────────────────────────────────────────── */
.plate-hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--navy-deep);
}
.plate-hero-bg { position: absolute; inset: 0; z-index: 0; }
.granite-bg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: saturate(0.9) brightness(0.55); }
.plate-hero-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 60% at 50% 38%, oklch(0.3 0.03 60 / 0.15), transparent 65%),
    linear-gradient(to bottom, oklch(0.1 0.015 50 / 0.55) 0%, oklch(0.1 0.015 50 / 0.25) 35%, oklch(0.08 0.015 50 / 0.75) 100%);
}

.plate-hero-inner { position: relative; z-index: 2; padding: 6rem 1.5rem 3rem; max-width: 680px; }

/* The plate itself — reused at three sizes across the page */
.plate {
  position: relative;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(155deg, var(--metal-hi) 0%, var(--metal-mid) 45%, var(--metal-lo) 78%, var(--metal-mid) 100%);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.5) inset,
    0 -1px 0 oklch(0 0 0 / 0.35) inset,
    0 22px 60px oklch(0 0 0 / 0.55),
    0 4px 14px oklch(0 0 0 / 0.35);
  overflow: hidden;
  isolation: isolate;
}
.plate::before {
  /* brushed-metal grain */
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, oklch(1 0 0 / 0.05) 0px, transparent 1px, transparent 2px, oklch(0 0 0 / 0.04) 3px);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.plate-sheen {
  position: absolute; inset: -40%;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), oklch(1 0 0 / 0.55), transparent 42%);
  pointer-events: none;
  mix-blend-mode: soft-light;
  transition: background 0.08s linear;
}

.plate-hero .plate { width: min(78vw, 300px); margin: 0 auto 2.25rem; animation: plateRise 1s cubic-bezier(0.22,1,0.36,1) both 0.1s; }
@keyframes plateRise { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }

.plate-qr { display: flex; justify-content: center; margin-bottom: 0.65rem; }
.plate-qr svg { width: 100%; height: auto; display: block; }
.qr-module { fill: oklch(0.22 0.015 50); }
.qr-module.dim { fill: oklch(0.22 0.015 50 / 0.55); }

.plate-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: oklch(0.30 0.015 50);
  text-shadow: 0 1px 0 oklch(1 0 0 / 0.35);
}

.plate-hero-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--hero-text);
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 30px oklch(0.1 0.02 50 / 0.6);
  animation: heroRise 0.8s cubic-bezier(0.22,1,0.36,1) both 0.3s;
}
.plate-hero-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.02rem, 2.1vw, 1.15rem);
  color: var(--hero-muted);
  max-width: 46ch;
  margin: 0 auto 2rem;
  line-height: 1.6;
  animation: heroRise 0.8s cubic-bezier(0.22,1,0.36,1) both 0.42s;
}
@keyframes heroRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.plate-hero-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-ui); font-size: 0.9rem; color: var(--gold);
  text-decoration: none; border-bottom: 1px solid oklch(0.74 0.115 72 / 0.4);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
  animation: heroRise 0.8s cubic-bezier(0.22,1,0.36,1) both 0.54s;
}
.plate-hero-cta:hover { color: var(--hero-gold); border-color: var(--hero-gold); }

.hero-scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; z-index: 2;
  width: 1px; height: 40px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, oklch(0.85 0.10 78 / 0.75));
  animation: cuePulse 2.6s ease-in-out infinite;
}
@keyframes cuePulse {
  0%, 100% { opacity: 0.15; transform: translateX(-50%) scaleY(0.6); transform-origin: top; }
  50%      { opacity: 0.85; transform: translateX(-50%) scaleY(1); transform-origin: top; }
}

/* ── The Scan: scroll-driven centerpiece ────────────────────────────────── */
.scan-section {
  position: relative;
  height: 320vh;
  background: linear-gradient(to bottom, var(--navy-deep), var(--navy) 60%, var(--bg) 100%);
}
.scan-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}

.scan-plate-wrap {
  position: absolute;
  /* sensible static resting state before JS takes over (progressive enhancement) */
  opacity: 1; transform: scale(1) translateY(0);
  will-change: transform, opacity;
  z-index: 2;
}
.scan-plate-wrap .plate { width: min(60vw, 220px); }

.scan-phone-wrap {
  position: absolute;
  opacity: 0; transform: scale(0.92) translateY(24px);
  will-change: transform, opacity;
  z-index: 1;
}

.phone-frame {
  width: min(78vw, 300px);
  aspect-ratio: 9 / 19.5;
  background: #0b0b0c;
  border-radius: 34px;
  padding: 10px;
  box-shadow: 0 30px 90px oklch(0 0 0 / 0.55), 0 0 0 1px oklch(1 0 0 / 0.06) inset;
  position: relative;
}
.phone-frame::before {
  content: '';
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 20px; border-radius: 0 0 14px 14px;
  background: #0b0b0c; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
}
.phone-screen iframe { width: 100%; height: 100%; border: none; }

.scan-caption {
  position: absolute; bottom: 9vh; left: 0; right: 0;
  text-align: center; z-index: 3; pointer-events: none;
}
.scan-caption p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--hero-text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
  text-shadow: 0 2px 20px oklch(0.1 0.02 50 / 0.6);
}
.scan-caption p.on { opacity: 1; transform: none; }

/* ── Live preview (bigger, resting phone) ───────────────────────────────── */
.preview-section { background: var(--bg); padding: clamp(4rem, 9vh, 6.5rem) 0; }
.preview-inner { text-align: center; }
.preview-eyebrow { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 0.85rem; display: block; }
.preview-heading { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.015em; margin-bottom: 0.9rem; }
.preview-sub { color: var(--muted); max-width: 56ch; margin: 0 auto 3rem; font-size: 1.05rem; }

.preview-phone-wrap { display: flex; justify-content: center; }
.preview-phone-wrap .phone-frame { width: min(88vw, 340px); box-shadow: 0 40px 100px oklch(0.3 0.05 55 / 0.28), 0 0 0 1px var(--border); }

/* ── Section shared ──────────────────────────────────────────────────────── */
.section-eyebrow { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); display: block; margin-bottom: 0.85rem; }
.section-heading { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.015em; margin-bottom: 1rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 56ch; }

/* ── Engrave your own ───────────────────────────────────────────────────── */
.engrave-section { background: var(--surface); padding: clamp(4rem, 9vh, 6.5rem) 0; }
.engrave-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.engrave-copy .section-lead { margin-bottom: 1.75rem; }

.engrave-input-wrap { position: relative; max-width: 380px; }
#engrave-input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#engrave-input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px var(--gold-glow); }
.engrave-hint { font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

.engrave-plate-wrap { display: flex; justify-content: center; }
.engrave-plate-wrap .plate { width: min(80vw, 320px); padding: 2rem 1.75rem 1.5rem; }
.plate-engraved-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  text-align: center;
  color: oklch(0.30 0.015 50);
  text-shadow: 0 1px 0 oklch(1 0 0 / 0.4), 0 -1px 1px oklch(0 0 0 / 0.3);
  margin-bottom: 1.1rem;
  word-break: break-word;
  min-height: 1.3em;
}
.engrave-plate-wrap .plate-qr { width: 68%; margin: 0 auto 0.75rem; }

@media (max-width: 860px) {
  .engrave-inner { grid-template-columns: 1fr; text-align: center; }
  .engrave-copy .section-lead { margin-left: auto; margin-right: auto; }
  .engrave-input-wrap { margin: 0 auto; }
}

/* ── Permanence: the year slider ────────────────────────────────────────── */
.permanence-section { background: var(--bg); padding: clamp(4rem, 9vh, 6.5rem) 0; text-align: center; }
.permanence-plate-wrap { display: flex; justify-content: center; margin: 2.5rem 0 2rem; }

/* The stone backdrop is what weathers. The plate sitting on it never does —
   that contrast IS the point of this section, so the plate must stay at its
   normal full-legibility styling regardless of the slider position. */
.permanence-stone {
  position: relative;
  padding: clamp(2.5rem, 6vw, 3.5rem);
  border-radius: 16px;
  background-size: cover;
  background-position: center 30%;
  display: flex; align-items: center; justify-content: center;
}
.permanence-stone::before {
  content: '';
  position: absolute; inset: 0; border-radius: 16px;
  background: oklch(0.08 0.015 50 / 0.75);
  transition: background 0.5s ease;
}
.permanence-stone.weathered::before { background: oklch(0.68 0.03 78 / 0.32); }
.permanence-stone .plate { position: relative; z-index: 1; width: min(56vw, 210px); }

.permanence-slider-wrap { max-width: 420px; margin: 0 auto 1.25rem; display: flex; align-items: center; gap: 1rem; }
#year-slider { flex: 1; accent-color: var(--gold-dim); cursor: pointer; }
.permanence-year { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-dim); min-width: 4ch; }
.permanence-note { font-family: var(--font-body); font-style: italic; color: var(--muted); }

/* ── How it works ────────────────────────────────────────────────────────── */
.steps-section { background: var(--surface); padding: clamp(4rem, 9vh, 6.5rem) 0; text-align: center; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 3rem; text-align: left; }
.step-num { font-family: var(--font-display); font-size: 1rem; color: var(--gold-dim); display: block; margin-bottom: 0.75rem; letter-spacing: 0.05em; }
.steps h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin-bottom: 0.5rem; }
.steps p { color: var(--muted); font-size: 0.96rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 2.25rem; } }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-section { background: var(--bg); padding: clamp(4rem, 9vh, 6.5rem) 0; text-align: center; }
.pricing-inner { max-width: 640px; margin: 0 auto; }
.pricing-points { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; margin: 2rem auto 2.5rem; text-align: left; max-width: 420px; }
.pricing-points li { display: flex; align-items: baseline; gap: 0.65rem; font-size: 1rem; color: var(--ink); }
.pricing-points li::before { content: '\2665'; color: var(--gold-dim); font-size: 0.8rem; }

.cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--navy); color: var(--hero-text);
  font-family: var(--font-ui); font-size: 0.92rem;
  padding: 0.9rem 2rem; border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.cta-btn:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* ── Closing / start ─────────────────────────────────────────────────────── */
.closing-section { position: relative; background: var(--navy-deep); padding: clamp(5rem, 12vh, 8rem) 0; overflow: hidden; }
.closing-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 20%, var(--gold-glow), transparent 70%);
  pointer-events: none;
}
.closing-inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; text-align: center; }
.closing-inner .section-eyebrow { color: var(--hero-gold); }
.closing-inner h2 { font-family: var(--font-display); font-weight: 400; color: var(--hero-text); font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.9rem; }
.closing-inner .section-lead { color: var(--hero-muted); margin: 0 auto 2.5rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer.landing-footer {
  background: var(--navy-deep);
  color: var(--hero-muted);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
}
footer.landing-footer a { color: var(--hero-muted); text-underline-offset: 3px; }
footer.landing-footer a:hover { color: var(--hero-text); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .page-container { padding-inline: 1.25rem; }
  .plate-hero-inner { padding-top: 5rem; }
}
