/* Stokvel Manager marketing site — same emerald + gold tokens as the app (theme/tokens.ts). */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #ecfdf5;
  --text: #0f1f1a;
  --text-2: #475a53;
  --border: #dce5e1;
  --primary: #047857;
  --primary-hover: #065f46;
  --primary-ink: #ffffff;
  --brand-text: #047857;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --hero-1: #064e3b;
  --hero-2: #022c22;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(6, 78, 59, 0.06), 0 8px 24px rgba(6, 78, 59, 0.08);
  --max: 1120px;
  --read: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08100d;
    --surface: #0f1915;
    --surface-2: #10241c;
    --text: #e8f1ed;
    --text-2: #a3b5ae;
    --border: #1f2e28;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-ink: #04140e;
    --brand-text: #34d399;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, h4, .display { font-family: "Poppins", "Inter", system-ui, sans-serif; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 1.8em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.5em 0 0.4em; }
p { margin: 0 0 1em; }
a { color: var(--brand-text); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.read { max-width: var(--read); margin: 0 auto; }
.muted { color: var(--text-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 1.05rem "Poppins", sans-serif; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 720px) { .nav a.hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font: 600 1rem "Inter", sans-serif; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-gold { background: var(--accent); color: #1c1300; }
.btn-gold:hover { filter: brightness(1.05); color: #1c1300; }
.btn-sm { padding: 8px 14px; font-size: 0.92rem; border-radius: 10px; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(245, 158, 11, 0.18), transparent 60%), linear-gradient(160deg, var(--hero-1), var(--hero-2)); color: #ecfdf5; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: #c8eadc; max-width: 560px; }
.hero .eyebrow { display: inline-block; background: rgba(251, 191, 36, 0.16); color: #fcd34d; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.hero .btn-ghost { color: #ecfdf5; border-color: rgba(236, 253, 245, 0.3); }
.hero .btn-ghost:hover { background: rgba(236, 253, 245, 0.08); color: #fff; }
.hero .fine { font-size: 0.9rem; color: #a7d8c4; }
.hero-art { position: relative; }
.hero-art .phone { width: min(300px, 70vw); margin: 0 auto; border-radius: 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; } .hero-art { order: -1; } .hero-art .phone { width: min(240px, 60vw); } }

/* Sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-text); font-size: 1.3rem; margin-bottom: 12px; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform 0.15s, border-color 0.15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--primary); color: inherit; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin: 56px 0; }
.feature-row:nth-child(even) .feature-img { order: 2; }
.feature-img img { width: min(280px, 70vw); margin: 0 auto; border-radius: 22px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 24px; } .feature-row:nth-child(even) .feature-img { order: 0; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 30px; position: relative; margin: 8px 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand-text); font-weight: 700; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin: 18px 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-family: "Poppins", sans-serif; }
.trust { background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }

/* Article */
.crumbs { font-size: 0.9rem; color: var(--text-2); margin: 24px 0 8px; }
.crumbs a { color: var(--text-2); }
.article-head { padding: 8px 0 8px; }
.article-meta { color: var(--text-2); font-size: 0.92rem; margin-bottom: 24px; }
.prose { font-size: 1.06rem; }
.prose h2 { border-top: 1px solid var(--border); padding-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose blockquote { margin: 1.5em 0; padding: 16px 20px; background: var(--surface-2); border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; white-space: pre-wrap; font-size: 0.95rem; }
.prose code { font-size: 0.92em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.96rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose img { border-radius: 12px; }
.callout { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #ecfdf5; border-radius: var(--radius); padding: 24px; margin: 2em 0; }
.callout img { width: 84px; flex: none; }
.callout h3 { color: #fff; margin: 0 0 4px; font-size: 1.15rem; border: 0; padding: 0; }
.callout p { margin: 0 0 12px; color: #c8eadc; font-size: 0.98rem; }
@media (max-width: 560px) { .callout { flex-direction: column; align-items: flex-start; } }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; margin: 10px 0; }
.faq-list summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-list summary::after { content: "+"; color: var(--brand-text); font-size: 1.3rem; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details > div { padding: 0 0 16px; color: var(--text-2); }
.related { margin: 48px 0; }
.note { font-size: 0.92rem; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 12px 16px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 0 0 2em; font-size: 0.95rem; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.2em; }

/* Tools */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 24px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.field .hint { font-size: 0.85rem; color: var(--text-2); margin-top: 4px; }
.result { margin-top: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat { background: var(--surface-2); border-radius: 12px; padding: 16px; }
.stat .k { font-size: 0.85rem; color: var(--text-2); }
.stat .v { font: 700 1.5rem "Poppins", sans-serif; color: var(--brand-text); }
.schedule { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.schedule th, .schedule td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; }
.schedule th { color: var(--text-2); font-weight: 600; }
.doc { background: #fff; color: #111; padding: 40px; border-radius: 12px; border: 1px solid var(--border); font: 15px/1.6 Georgia, "Times New Roman", serif; }
.doc h2 { font: 700 1.4rem Georgia, serif; text-align: center; border: 0; margin: 0 0 4px; }
.doc h3 { font: 700 1.05rem Georgia, serif; margin: 1.4em 0 0.3em; }
.doc .sig { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.doc .sig div { border-bottom: 1px solid #333; height: 32px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 64px; background: var(--surface); font-size: 0.95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: 0.95rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 32px; color: var(--text-2); font-size: 0.85rem; }

@media print {
  .site-header, .site-footer, .no-print, .crumbs, .callout { display: none !important; }
  body { background: #fff; }
  .doc { border: 0; padding: 0; }
}
