
/* MomSync website tokens — see design.md. No external fonts or scripts. */
/* MomSync light purple theme. Core values come from the MomSync app's
   production-build34/theme.config.js (primary #684778, background #F8F9FB,
   surface #FFFFFF, foreground #172B4D, muted #667085, border #E5EAF0, warning #916D00).
   Values marked "derived" are tints/shades of those tokens for web layout. */
:root {
  --background: #f8f9fb;        /* app background */
  --surface: #ffffff;           /* app surface */
  --foreground: #172b4d;        /* app foreground: body text */
  --heading: #3d2a4c;           /* derived: dark plum for headings */
  --muted: #5b6474;             /* derived from app muted #667085, darkened for 4.5:1+ on lavender */
  --primary: #684778;           /* app primary: buttons, links */
  --primary-soft: #efe9f4;      /* derived: light lavender surface */
  --accent-dot: #b89fca;        /* derived: lavender marker */
  --border: #e5eaf0;            /* app border */
  --border-strong: #c9bfd3;     /* derived: table and blockquote rules */
  --focus: #684778;             /* app primary */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-200%);
  background: var(--surface);
  color: var(--foreground);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { transform: none; }

/* Header and nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.nav-link,
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--foreground);
  text-decoration: none;
}
.nav-link:hover,
.nav-list a:hover { background: var(--primary-soft); }
.nav-link[aria-current="page"] {
  background: var(--primary);
  color: #ffffff;
}

/* Hero */
.hero { padding-top: 56px; padding-bottom: 40px; }
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero-panel {
  background: var(--primary-soft);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
}
.facts { list-style: none; padding: 0; margin: 0; }
.facts li {
  padding: 12px 0 12px 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.facts li:last-child { border-bottom: none; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dot);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary);
}
.btn:hover { filter: brightness(1.08); }
.btn-outline {
  background: transparent;
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); filter: none; }

/* Sections and cards */
.section { padding-top: 40px; padding-bottom: 40px; }
.page-stack { padding-top: 40px; padding-bottom: 56px; display: grid; gap: 28px; }
.page-head h1 { margin-bottom: 0.25em; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.feature-list,
.plans {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.plans { grid-template-columns: 1fr; }
.plan .price {
  font-weight: 600;
  color: var(--primary);
  font-size: 1.05rem;
}
.trust {
  border-top: 1px solid var(--border);
  padding-bottom: 56px;
}

/* FAQ */
.faq-group { display: grid; gap: 8px; }
.faq-group h2 { margin-bottom: 8px; }
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq[open] summary { margin-bottom: 6px; }
.faq p { margin-bottom: 4px; }

/* Legal */
.legal { padding-top: 40px; padding-bottom: 56px; max-width: 760px; }
.legal header { margin-bottom: 24px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal-section p { max-width: 70ch; }
.toc {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 8px;
}
.toc-title { font-weight: 600; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
}
.footer-grid {
  display: grid;
  gap: 20px;
}
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin-bottom: 4px; color: var(--heading); }
.footer-links { padding: 0; }

@media (min-width: 760px) {
  body { font-size: 18px; }
  .hero { padding-top: 88px; padding-bottom: 64px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .feature-list { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
  .header-row { flex-wrap: nowrap; }
}

@media (prefers-reduced-motion: no-preference) {
  .fade-up > * { animation: fade-up 0.7s ease-out both; }
  .fade-up > :nth-child(2) { animation-delay: 0.1s; }
  .fade-up > :nth-child(3) { animation-delay: 0.2s; }
  .fade-up > :nth-child(4) { animation-delay: 0.3s; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Legal Markdown rendering (owner-approved final documents) */
.markdown-doc { max-width: 72ch; }
.markdown-doc h1 { margin-bottom: 12px; }
.markdown-doc h2 { margin-top: 32px; margin-bottom: 10px; scroll-margin-top: 24px; }
.markdown-doc h3 { margin-top: 22px; margin-bottom: 8px; scroll-margin-top: 24px; }
.markdown-doc p, .markdown-doc li { line-height: 1.6; }
.markdown-doc ul, .markdown-doc ol { padding-left: 1.25em; margin: 8px 0 14px; }
.markdown-doc blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
}
.markdown-doc table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.95em;
}
.markdown-doc th, .markdown-doc td { border: 1px solid var(--border-strong); padding: 6px 8px; text-align: left; vertical-align: top; }
.markdown-doc code { overflow-wrap: anywhere; }
