/* ============================================================
   Arrange With Grace — design system v2 (memorial-program)
   Ivory paper · warm ink · antique gold · hairline rules
   Display: Libre Caslon · Body/UI: Source Sans 3
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* stable names — inline styles + JS reference these */
  --bg: #f4efe5;            /* ivory paper */
  --card: #fcf9f2;          /* raised paper */
  --text: #26231b;          /* warm ink */
  --muted: #6d6555;         /* warm grey-brown */
  --accent: #7a5c1c;        /* antique gold (text-safe on paper, WCAG AA) */
  --accent-hover: #664b14;
  --border: #ddd3bf;        /* hairline */

  /* new tokens */
  --paper: #f4efe5;
  --paper-light: #fcf9f2;
  --paper-white: #fffdf8;
  --ink: #26231b;
  --ink-soft: #3a352b;
  --night: #1f1b13;
  --night-text: #e9e2d2;
  --night-muted: #b8ac92;
  --gold-rule: #b08a2e;     /* decorative foil */
  --gold-soft: rgba(143,109,36,0.10);
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow-paper: 0 1px 0 rgba(38,35,27,0.04), 0 12px 32px -18px rgba(38,35,27,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--gold-soft); color: var(--ink); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper-light);
  padding: 8px 16px; z-index: 100; font-weight: 600; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: rgba(244,239,229,0.92);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .inner {
  max-width: 1000px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.logo {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  color: var(--ink); letter-spacing: 0.01em; text-decoration: none; line-height: 1.1;
}
.logo:hover { text-decoration: none; color: var(--ink); }
.logo span {
  display: block; font-family: var(--sans); font-size: 0.62rem; color: var(--accent);
  font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin-top: 3px;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 0.82rem; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.74rem;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .cta {
  background: var(--ink); color: var(--paper-light) !important;
  font-weight: 600; padding: 8px 16px; border-radius: 6px; letter-spacing: 0.04em;
  text-transform: none; font-size: 0.82rem;
}
.nav .cta:hover { background: var(--accent); color: #fff !important; text-decoration: none; }

/* ---------- hero + signature report card ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 400; line-height: 1.15;
  margin-bottom: 16px; letter-spacing: -0.01em; color: var(--ink);
}
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 26px; }
.badge {
  display: inline-block; color: var(--accent);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0 4px 10px; margin-bottom: 18px;
  border-bottom: 1px solid var(--gold-rule);
}
.badge::before, .badge::after { content: '—'; color: var(--gold-rule); margin: 0 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper-light) !important;
  font-weight: 600; padding: 13px 24px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--ink); cursor: pointer; font-size: 0.98rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff !important; text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--text) !important; border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; text-decoration: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 20px 0; }

/* signature: the printed arrangement report (memorial card) */
.hero-report { margin: 44px auto 0; max-width: 480px; }
.memorial-card {
  background: var(--paper-white);
  border: 1px solid var(--border);
  border-top: 3px double var(--gold-rule);
  border-bottom: 3px double var(--gold-rule);
  padding: 34px 34px 26px;
  font-family: var(--serif);
  color: var(--ink);
  box-shadow: var(--shadow-paper);
  text-align: center;
}
.memorial-card .mc-kicker {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.memorial-card .mc-name { font-size: 1.55rem; font-weight: 700; line-height: 1.2; margin-bottom: 2px; }
.memorial-card .mc-dates { font-size: 0.95rem; color: var(--muted); font-style: italic; margin-bottom: 16px; }
.memorial-card .mc-rule { width: 64px; height: 1px; background: var(--gold-rule); margin: 0 auto 16px; }
.memorial-card .mc-line {
  font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft);
  margin-bottom: 6px; line-height: 1.5;
}
.memorial-card .mc-line b { color: var(--ink); font-weight: 600; }
.memorial-card .mc-honors {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-family: var(--sans); font-size: 0.78rem; color: var(--accent);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-report .mc-caption {
  margin-top: 12px; font-size: 0.74rem; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}

/* ---------- prose / cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; margin-bottom: 28px;
}
.prose h2 {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 700;
  margin: 2.6rem 0 0.9rem; letter-spacing: -0.005em; color: var(--ink);
}
.prose h1 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
}
.prose h2::before {
  content: ''; display: block; width: 44px; height: 2px;
  background: var(--gold-rule); margin-bottom: 14px;
}
.prose h3 { font-family: var(--serif); font-size: 1.15rem; margin: 1.6rem 0 0.5rem; color: var(--ink); font-weight: 700; }
.prose p { margin: 0 0 1rem; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; color: var(--muted); }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }

.grid-3, .grid-2 { display: grid; gap: 16px; margin: 1.4rem 0; }
@media (min-width: 700px) {
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature-card:hover { border-color: var(--gold-rule); transform: translateY(-2px); }
.feature-card h3 {
  font-family: var(--serif); margin: 0 0 8px; font-size: 1.1rem; color: var(--ink); font-weight: 700;
}
.feature-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* clickable plan cards → Stripe */
.plan-card { display: block; cursor: pointer; }
.plan-card-cta {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  font-weight: 600; font-size: 0.92rem; color: var(--accent);
}
.plan-card:hover .plan-card-cta { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- breadcrumbs / toc / related ---------- */
.breadcrumbs { font-size: 0.74rem; color: var(--muted); padding: 22px 0 0; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 1rem 0 1.6rem; }
.toc strong { display: block; margin-bottom: 8px; color: var(--ink); font-family: var(--serif); }
.toc ol { margin: 0 0 0 1.1rem; color: var(--muted); font-size: 0.92rem; }
.related { margin: 2.4rem 0; }
.related a { display: block; padding: 12px 2px; border-bottom: 1px solid var(--border); color: var(--muted); }
.related a:hover { color: var(--accent); }

/* ---------- forms (homepage tool) ---------- */
.form-group { margin-bottom: 22px; }
label { display: block; font-size: 0.74rem; color: var(--accent); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
input, select, textarea {
  width: 100%; padding: 12px 14px; background: var(--paper-white); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 0.98rem; transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--sans);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--gold-soft);
}
textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
button.generate {
  width: 100%; padding: 15px; background: var(--ink); color: var(--paper-light); border: none;
  border-radius: var(--radius); font-size: 1.02rem; font-weight: 600; cursor: pointer; margin-top: 6px;
  font-family: var(--sans); transition: background 0.15s ease;
}
button.generate:hover { background: var(--accent); color: #fff; }
button.generate:disabled { opacity: 0.55; cursor: not-allowed; }
#result { display: none; margin-top: 30px; }
.field-hint { margin: 6px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.status { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* ---------- the generated report (paper output) ---------- */
.report {
  background: var(--paper-white); color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 42px 38px;
  font-family: var(--serif); box-shadow: var(--shadow-paper);
}
.report h2 { font-size: 1.6rem; text-align: center; margin-bottom: 6px; color: var(--ink); font-weight: 700; }
.report .report-provider {
  text-align: center; font-size: 1.1rem; color: var(--ink); font-weight: 600;
  font-family: var(--sans); margin-bottom: 8px; letter-spacing: 0.01em;
}
.report .subtitle { text-align: center; font-size: 0.88rem; color: var(--muted); margin-bottom: 30px; font-style: italic; }
.report section { margin-bottom: 24px; }
.report h3 {
  font-size: 1rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 5px;
  margin-bottom: 10px; font-family: var(--sans); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.report p, .report li { font-size: 0.97rem; line-height: 1.65; }
.report ul { padding-left: 18px; }
.report li { margin-bottom: 5px; }
.report .footer-note {
  margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--muted); text-align: center; font-family: var(--sans);
}
.actions { display: flex; gap: 10px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- invoice lines / military highlight ---------- */
.invoice-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.invoice-line-row { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .invoice-line-row { grid-template-columns: 1fr 90px auto; } }
.invoice-line-row input { margin: 0; }
.invoice-line-row .btn-remove-line {
  padding: 10px 12px; background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 0.85rem; white-space: nowrap;
}
.invoice-line-row .btn-remove-line:hover { border-color: var(--accent); color: var(--accent); }
.report .invoice-table {
  width: 100%; border-collapse: collapse; font-family: var(--sans);
  font-size: 0.92rem; margin: 8px 0 10px;
}
.report .invoice-table th, .report .invoice-table td {
  border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left;
}
.report .invoice-table th:last-child, .report .invoice-table td:last-child { text-align: right; }
.report .invoice-table tfoot td { font-weight: 600; border-bottom: none; padding-top: 12px; }
.report .invoice-disclaimer { font-size: 0.82rem; color: var(--muted); font-style: italic; margin-top: 8px; font-family: var(--sans); }
.military-highlight {
  background: var(--gold-soft); border-left: 3px solid var(--gold-rule); padding: 12px 16px; margin: 10px 0;
  border-radius: 0 6px 6px 0;
}

/* ---------- pricing ---------- */
.pricing { text-align: center; padding: 44px 0 56px; border-top: 1px solid var(--border); }
.pricing h2, .pricing h3 { font-family: var(--serif); font-size: 1.55rem; margin-bottom: 10px; font-weight: 700; color: var(--ink); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 56px; padding: 40px 0 36px; border-top: 2px solid var(--gold-rule);
  background: var(--night); color: var(--night-muted); font-size: 0.86rem;
}
.site-footer .grid {
  display: grid; gap: 28px; max-width: 1000px; margin: 0 auto 28px; padding: 0 20px;
}
@media (min-width: 700px) { .site-footer .grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { color: var(--night-text); font-size: 0.78rem; margin-bottom: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--night-muted); }
.site-footer a:hover { color: var(--gold-rule); text-decoration: none; }
.site-footer em { color: var(--night-text); }
.footer-bottom {
  max-width: 1000px; margin: 0 auto; padding: 18px 20px 0; border-top: 1px solid rgba(233,226,210,0.14);
  font-size: 0.76rem; color: var(--night-muted);
}

/* ---------- focus / motion ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
