/* ClergyTrak marketing site — design system mirrors the app.
   Palette: warm-cream base, forest (housing) + navy (ministry) primaries,
   brass accent, ink text. Typeface: Inter. */

:root {
  --cream: #F5F0E6;
  --cream-2: #EFE8D8;
  --surface: #FFFFFF;
  --ink: #1E2520;
  --secondary: #4A4438;
  --muted: #7A6F5C;
  --forest: #234234;
  --forest-deep: #1B3328;
  --navy: #1E3A52;
  --brass: #C19A4B;
  --brass-soft: #D8B877;
  --border: #E2DAC4;
  --hairline: #ECE4D2;
  --shadow: 0 18px 50px rgba(35, 66, 52, 0.10);
  --shadow-sm: 0 6px 20px rgba(35, 66, 52, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 14px; }
.lead { font-size: 1.12rem; color: var(--secondary); }
.lead.center { max-width: 620px; margin-left: auto; margin-right: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass);
  margin: 0 0 14px;
}
.eyebrow.center { text-align: center; }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.seal {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--forest); color: var(--brass-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
}
.seal-lg { width: 76px; height: 76px; border-radius: 20px; font-size: 42px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; font-size: 1rem;
  padding: 14px 24px; border-radius: 14px; text-decoration: none;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center; white-space: normal;
}
.btn-sm { white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--forest-deep); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brass); color: var(--forest); }
.btn-sm { padding: 9px 18px; font-size: 0.92rem; border-radius: 11px; }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 240, 230, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--secondary); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav-links a:hover { color: var(--forest); }
.nav .btn-primary { margin-left: 8px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 84px;
  background:
    radial-gradient(1100px 480px at 80% -8%, rgba(193,154,75,0.14), transparent 60%),
    linear-gradient(180deg, #FBF8F1 0%, var(--cream) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 26px; max-width: 540px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.microtrust { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ---------- Video embeds ---------- */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, var(--forest), var(--navy));
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.10);
}
.video-embed--portrait { aspect-ratio: 9 / 14; max-width: 320px; margin: 0 auto; }
.video-embed video, .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.play {
  width: 78px; height: 78px; border-radius: 50%;
  background: rgba(255,255,255,0.94); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: transform .15s ease;
  z-index: 2;
}
.play:hover { transform: scale(1.06); }
.play-icon { color: var(--forest); font-size: 26px; margin-left: 4px; }
.video-caption {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,0.92); font-size: 0.85rem; font-weight: 500;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4); z-index: 2;
}

/* ---------- Pain ---------- */
.pain { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.pain h2 { margin-bottom: 44px; max-width: 680px; margin-left: auto; margin-right: auto; }
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pain-card {
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 24px 20px;
}
.pain-emoji { font-size: 28px; margin-bottom: 10px; }
.pain-card h3 { margin-bottom: 6px; font-size: 1.06rem; }
.pain-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- How it works ---------- */
.how h2 { margin-bottom: 48px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--forest); color: var(--brass-soft);
  font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--secondary); }

/* ---------- Demo ---------- */
.demo { background: var(--cream-2); }
.demo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.demo-copy .lead { margin-bottom: 24px; max-width: 480px; }

/* ---------- Features ---------- */
.features h2 { margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.feature h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--secondary); font-size: 0.98rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-forest { background: var(--forest); }
.dot-navy { background: var(--navy); }
.dot-brass { background: var(--brass); }

/* ---------- Founder ---------- */
.founder { background: var(--forest); color: #fff; }
.founder-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.founder .eyebrow { color: var(--brass-soft); }
.founder .seal-lg { background: rgba(255,255,255,0.10); color: var(--brass-soft); }
.founder blockquote {
  margin: 0 0 14px; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 600;
  line-height: 1.4; letter-spacing: -0.01em; color: #fff;
}
.founder-attr { margin: 0; color: rgba(255,255,255,0.75); font-weight: 500; }

/* ---------- Lead magnet ---------- */
.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 44px 40px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
.lead-card .lead { margin-bottom: 0; }
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-form input {
  font-family: inherit; font-size: 1rem; padding: 15px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--cream);
  color: var(--ink); width: 100%;
}
.lead-form input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(193,154,75,0.18); }
.lead-form .btn { width: 100%; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 2px 0 0; }
.form-note.success { color: var(--forest); font-weight: 600; }
.form-note.error { color: #B4452F; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq h2 { margin-bottom: 36px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 20px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.06rem; padding: 16px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brass); font-size: 1.4rem; font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 18px; color: var(--secondary); }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--surface); border-top: 1px solid var(--hairline); }
.final-cta h2 { margin-bottom: 10px; }
.final-cta .lead { margin-bottom: 26px; }

/* ---------- Footer ---------- */
.footer { background: var(--forest-deep); color: rgba(255,255,255,0.82); padding: 40px 0; }
.footer .brand-name { color: #fff; }
.footer .seal { background: rgba(255,255,255,0.10); }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; margin-left: auto; }
.footer-links a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { color: var(--brass-soft); }
.copyright { width: 100%; margin: 10px 0 0; font-size: 0.85rem; color: rgba(255,255,255,0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .demo-inner, .lead-card { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .demo-media { order: -1; }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .founder-inner { grid-template-columns: 1fr; gap: 22px; text-align: left; }
  .nav-links { display: none; }
  .section { padding: 60px 0; }
}
@media (max-width: 520px) {
  .pain-grid { grid-template-columns: 1fr; }
  .lead-card { padding: 30px 22px; }
  .cta-row .btn { width: 100%; }
}

/* ---------- Pre-launch / launch flip ----------
   Default (pre-launch): [data-soon-only] shows, [data-live-only] hides.
   main.js adds .app-live to <html> when APP_STORE_LIVE = true. */
html:not(.app-live) [data-live-only] { display: none !important; }
html.app-live [data-soon-only] { display: none !important; }

.soon-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(193, 154, 75, 0.14);
  border: 1px solid rgba(193, 154, 75, 0.35);
  color: var(--forest); font-weight: 600; font-size: 0.85rem;
  padding: 6px 14px; border-radius: 999px; margin: 0 0 18px;
}
.soon-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brass);
  animation: soon-pulse 2s ease-in-out infinite;
}
@keyframes soon-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Honeypot field — humans never see it; bots fill it. */
.lead-form .hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* ---------- Subpages (privacy, terms, playbook) ---------- */
.page { padding: 56px 0 84px; }
.page-narrow { max-width: 780px; margin: 0 auto; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.page .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 30px; }
.page .eyebrow { margin-bottom: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.card h3 { color: var(--forest); font-size: 1.02rem; margin: 24px 0 6px; }
.card h3:first-of-type { margin-top: 0; }
.card p, .card li { font-size: 0.98rem; color: var(--secondary); }
.card ul, .card ol { margin: 0 0 14px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card a { color: var(--forest); }

.callout {
  background: var(--cream); border-left: 4px solid var(--brass);
  border-radius: 10px; padding: 16px 20px; margin: 18px 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }

/* ---------- Playbook ---------- */
.pb-cover {
  background: linear-gradient(155deg, var(--forest), var(--navy));
  color: #fff; border-radius: 22px; padding: 52px 44px; margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.pb-cover .eyebrow { color: var(--brass-soft); }
.pb-cover h1 { color: #fff; margin-bottom: 12px; }
.pb-cover p { color: rgba(255,255,255,0.85); margin: 0; max-width: 560px; }
.pb-toc { columns: 2; column-gap: 30px; }
.pb-toc li { break-inside: avoid; }
.pb-example {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 16px 0;
}
.pb-example table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.pb-example td { padding: 6px 4px; border-bottom: 1px solid var(--hairline); color: var(--secondary); }
.pb-example tr:last-child td { border-bottom: none; font-weight: 700; color: var(--forest); }
.pb-example td:last-child { text-align: right; white-space: nowrap; }
.pb-check li { margin-bottom: 10px; }
.pb-disclaimer { font-size: 0.88rem; color: var(--muted); }

/* Group dividers inside the long "Maximize it honestly" section — turn one wall
   of seven into three short, restful acts. */
.pb-group {
  margin: 36px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  break-after: avoid;
}
.pb-group:first-of-type { margin-top: 24px; }

@media (max-width: 600px) {
  .pb-cover { padding: 36px 24px; }
  .pb-toc { columns: 1; }
}

@media print {
  /* Force brand colors to render in the PDF — without this Chrome drops every
     background, turning the green cover (white text) into invisible white-on-white. */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .nav, .footer, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 24px 0 0; }
  .card, .pb-cover { box-shadow: none; break-inside: avoid; }
  .pb-cover { margin: 0 0 24px; }
  .card { margin-bottom: 16px; }
}
