/* Public Memorial Wall landing page (/memorial/).
   Consumer-facing and Petra-branded: the warm memorial palette carries the
   page, Petra navy carries the actions. Loaded only on the landing template.

   Motion thesis: the stone catches the light. One authored graze across the
   granite — as if morning sun found the etched plaque — then quiet feedback
   on plan cards and form fields. Content is visible without the animation. */

.memorial-consumer {
  --lp-ink: #2b2823;
  --lp-muted: #5b574f;
  --lp-faint: #6a655c;
  --lp-rule: #e5dfd2;
  --lp-card: #ffffff;
  --lp-tint: #f3ede1;
  --lp-sage: #4f6144;
  --lp-navy: #1a365d;
  --lp-brass: #967100;
  --lp-save: #2f6b45;
}

.memorial-consumer ::selection {
  background: var(--lp-navy);
  color: #faf6ef;
}

#pricing {
  scroll-margin-top: 1.5rem;
}

/* ------------------------------------------------------------------ Hero */

.memorial-lp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 2.5rem 0 3.5rem;
}

.memorial-lp-hero-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 64px -28px rgba(40, 38, 30, 0.48);
  /* Reserve the box before the image decodes so the hero doesn't jump. */
  aspect-ratio: 4 / 3;
  background: var(--lp-tint);
}

/* <picture> is inline by default and would collapse the fixed-ratio box. */
.memorial-lp-hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.memorial-lp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

.memorial-lp-hero-light {
  position: absolute;
  inset: -15% 0;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(
    102deg,
    transparent 0%,
    rgba(255, 246, 220, 0) 22%,
    rgba(255, 244, 220, 0.55) 50%,
    rgba(255, 246, 220, 0) 78%,
    transparent 100%
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  transform: translateX(-130%);
}

.memorial-consumer .memorial-lp-hero-body h1 {
  font-size: clamp(2.35rem, 5.2vw, 3.55rem);
  line-height: 1.06;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

.memorial-lp-hero-rule {
  display: block;
  width: 3.25rem;
  height: 1px;
  background: var(--lp-brass);
  margin: 0 0 1.35rem;
}

.memorial-lp-lede {
  font-family: var(--memorial-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--lp-muted);
  max-width: 38ch;
  margin: 0 0 1.85rem;
}

.memorial-lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.memorial-consumer .memorial-lp-cta {
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 10px;
}

.memorial-lp-textlink {
  font-weight: 600;
  font-size: 0.98rem;
}

.memorial-lp-hero-note {
  margin: 1.1rem 0 0;
  font-size: 0.9rem;
  color: var(--lp-faint);
}

/* -------------------------------------------------------------- Sections */

.memorial-lp-section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--lp-rule);
}

.memorial-lp-section--tint {
  background: var(--lp-tint);
  border-top: 0;
  border-radius: 20px;
  padding: 2.85rem 2.15rem;
  margin: 2.5rem 0;
}

.memorial-consumer .memorial-lp-section h2 {
  font-family: var(--memorial-serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  color: var(--lp-ink);
  margin: 0 0 0.55rem;
}

.memorial-consumer .memorial-lp-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lp-ink);
  margin: 0 0 0.4rem;
}

.memorial-lp-section p {
  color: var(--lp-muted);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------- How it works */

.memorial-lp-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.memorial-lp-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--lp-sage);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

/* ------------------------------------------------------------- Features */

.memorial-lp-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.75rem;
  margin-top: 1.5rem;
}

/* -------------------------------------------------------------- Pricing */

.memorial-lp-pricing-intro {
  max-width: 58ch;
  margin: 0 0 1.75rem !important;
}

.memorial-lp-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.memorial-lp-plan {
  background: var(--lp-card);
  border: 1px solid var(--lp-rule);
  border-radius: 16px;
  padding: 1.55rem 1.65rem 1.45rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 36px -24px rgba(40, 38, 30, 0.4);
}

.memorial-lp-plan.is-best-value {
  background: #f7f3e8;
  border-color: #d8cfba;
}

.memorial-consumer .memorial-lp-plan-name {
  font-family: var(--memorial-serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--lp-ink);
  margin: 0 0 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.memorial-consumer .memorial-lp-plan-amount {
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--lp-ink);
  margin: 0 0 0.55rem;
}

.memorial-lp-plan-note {
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  margin-bottom: 1.15rem !important;
  flex: 1;
}

.memorial-lp-best {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--lp-sage);
  color: #fff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memorial-lp-save {
  font-weight: 700;
  color: var(--lp-save);
}

/* The struck-through comparison is decoration, not content: it repeats what
   .memorial-lp-save already states, so hiding it from assistive tech avoids
   reading a price the family is NOT being asked to pay. */
.memorial-lp-was {
  color: var(--lp-faint);
  text-decoration: line-through;
}

.memorial-lp-peryear {
  color: var(--lp-muted);
}

.memorial-lp-prices-foot {
  font-size: 0.9rem;
  color: var(--lp-faint) !important;
}

.memorial-consumer .memorial-lp-buy {
  font-size: 0.95rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  align-self: flex-start;
  margin-top: auto;
}

a.memorial-lp-buy {
  display: inline-block;
}

/* Checkout status notice: neutral, not an error — nothing was charged. */
.memorial-alert--info {
  background: #eef2f7;
  color: var(--lp-navy);
  border: 1px solid #cdd8e6;
  margin-bottom: 1.5rem;
}

/* ----------------------------------------------------------- Order form */

.memorial-lp-order-intro {
  max-width: 58ch;
  margin: 0.35rem 0 1.85rem !important;
}

.memorial-lp-order-card {
  background: var(--lp-card);
  border: 1px solid var(--lp-rule);
  border-radius: 18px;
  padding: 2rem 1.85rem 1.75rem;
  max-width: 740px;
  box-shadow: 0 18px 48px -26px rgba(40, 38, 30, 0.32);
}

.memorial-lp-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

.memorial-lp-field {
  margin-bottom: 1.15rem;
}

.memorial-lp-field .form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--lp-ink);
  margin-bottom: 0.4rem;
}

.memorial-lp-field .form-control,
.memorial-lp-field select.form-control {
  background: #faf6ef;
  border: 1px solid var(--lp-rule);
  border-radius: 10px;
  color: var(--lp-ink);
  caret-color: var(--lp-navy);
  padding: 0.7rem 0.85rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.memorial-lp-field .form-control:hover,
.memorial-lp-field select.form-control:hover {
  border-color: #d0c8b6;
}

.memorial-lp-field .form-control:focus,
.memorial-lp-field select.form-control:focus {
  background: #fff;
  border-color: var(--lp-navy);
  box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.16);
  outline: none;
}

.memorial-lp-field .form-control:focus-visible,
.memorial-lp-field select.form-control:focus-visible,
.memorial-consumer .memorial-lp-cta:focus-visible,
.memorial-lp-textlink:focus-visible,
.memorial-lp-signin .btn:focus-visible,
.memorial-lp-prices-foot a:focus-visible {
  outline: 3px solid var(--lp-navy);
  outline-offset: 3px;
}

.memorial-lp-field-help {
  font-size: 0.85rem;
  color: var(--lp-faint);
  margin: 0.35rem 0 0 !important;
}

.memorial-lp-field-error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9b2c2c !important;
  margin: 0.35rem 0 0 !important;
}

.memorial-lp-order-privacy {
  font-size: 0.85rem;
  color: var(--lp-faint) !important;
  margin-top: 1rem !important;
}

/* --------------------------------------------------------- Sign-in foot */

.memorial-lp-signin {
  text-align: center;
  padding: 3.25rem 1.5rem;
  border-top: 1px solid var(--lp-rule);
}

.memorial-consumer .memorial-lp-signin h2 {
  font-family: var(--memorial-serif);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
}

.memorial-lp-signin p {
  color: var(--lp-muted);
  max-width: 52ch;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 900px) {
  .memorial-lp-hero {
    grid-template-columns: 1fr;
    gap: 1.85rem;
    padding: 1.15rem 0 2.5rem;
  }
  /* Words before picture on a phone: the headline is the reason to keep reading. */
  .memorial-lp-hero-media { order: 2; aspect-ratio: 16 / 10; }
  .memorial-lp-hero-body { order: 1; }
  .memorial-lp-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .memorial-lp-features { grid-template-columns: 1fr; }
  .memorial-lp-plans { grid-template-columns: 1fr; }
  .memorial-lp-field-row { grid-template-columns: 1fr; }
  .memorial-lp-section--tint { padding: 2rem 1.25rem; border-radius: 16px; }
  .memorial-lp-order-card { padding: 1.35rem 1.2rem; }
}

@media (max-width: 560px) {
  .memorial-lp-plan-note {
    flex-direction: column;
    gap: 0.15rem;
  }
  .memorial-consumer .memorial-lp-cta {
    width: 100%;
    text-align: center;
  }
  .memorial-consumer .memorial-lp-buy {
    align-self: stretch;
  }
}

/* -------------------------------------------------------------- Motion */

@keyframes memorial-light-graze {
  from {
    opacity: 0;
    transform: translateX(-130%);
  }
  18% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(160%);
  }
}

@keyframes memorial-settle {
  from {
    opacity: 0.4;
    filter: blur(5px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.memorial-lp-hero) {
    scroll-behavior: smooth;
  }

  .memorial-lp-hero-light {
    animation: memorial-light-graze 1.55s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  }

  .memorial-lp-hero-body {
    animation: memorial-settle 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .memorial-lp-plan {
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .memorial-lp-plan:hover,
  .memorial-lp-plan:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px -22px rgba(40, 38, 30, 0.45);
  }

  .memorial-consumer .memorial-lp-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -10px rgba(26, 54, 93, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memorial-lp-hero-light {
    opacity: 0.22;
    transform: none;
    width: 100%;
    background: linear-gradient(
      180deg,
      rgba(255, 246, 220, 0.18),
      transparent 55%
    );
  }

  .memorial-lp-hero-body,
  .memorial-lp-hero-light,
  .memorial-lp-plan,
  .memorial-consumer .memorial-lp-cta {
    animation: none;
    transition: none;
  }
}
