/* LedgerBooks website. One stylesheet, no framework. Colours: deep petrol + warm gold on paper. */
:root {
  --ink: #0f1f2e;
  --ink-2: #3b4a5a;
  --muted: #5d6b79;
  --line: #dde3e8;
  --paper: #ffffff;
  --bg: #f4f6f7;
  --bg-2: #eaf0f1;
  --brand: #0d5c6b;
  --brand-dark: #08414c;
  --brand-ink: #062f37;
  --brand-soft: #e3f0f2;
  --gold: #b9822a;      /* decoration only (dots, borders) */
  --gold-text: #8a5f17; /* gold for text and badges: AA contrast on white */
  --gold-soft: #fbf3e4;
  --bad: #a3361f;
  --bad-soft: #fbece8;
  --ok: #1d6b43;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 46, .06), 0 8px 24px rgba(15, 31, 46, .06);
  --wrap: 1160px;
  --font: "Noto Sans", "Noto Sans Lao", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="lo"] { --font: "Noto Sans Lao", "Noto Sans", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
}
html[lang="lo"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
html[lang="lo"] h1, html[lang="lo"] h2, html[lang="lo"] h3 { line-height: 1.45; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }
.nav .btn { margin-left: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover, .nav a.btn-primary[aria-current="page"] { color: #fff; background: var(--brand); }
.nav a.btn-primary:hover { background: var(--brand-dark); }
.lang-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--brand); }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 42px; height: 42px; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; } .menu-btn span::after { position: absolute; top: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { background: var(--gold-soft); color: var(--brand-ink); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-2) 0%, #fff 100%); padding: 64px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.eyebrow { display: inline-block; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.hero h1 { max-width: 16ch; }
html[lang="lo"] .hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.18rem; color: var(--ink-2); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.hero-note { color: var(--muted); font-size: .92rem; }
.shot { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shot .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4dbe1; }
.hero .shot { transform: perspective(1600px) rotateY(-4deg) rotateX(1deg); transform-origin: left center; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; color: var(--ink-2); font-size: .93rem; list-style: none; padding: 0; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); font-size: 1.06rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Pain -> fix */
.pains { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pain { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 10px; }
.pain .before, .pain .after { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-radius: 6px; padding: 2px 8px; margin-top: 3px; white-space: nowrap; }
html[lang="lo"] .tag { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.tag-before { background: var(--bad-soft); color: var(--bad); }
.tag-after { background: var(--brand-soft); color: var(--brand-dark); }
.pain .before p { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163, 54, 31, .45); margin: 0; }
.pain .after p { margin: 0; font-weight: 500; }

/* Feature tour */
.features { display: grid; grid-template-columns: 1fr; gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feature figure { margin: 0; background: var(--bg); border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; overflow: hidden; }
.feature figure img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.feature .body { padding: 20px 22px 24px; }
.feature .body p { color: var(--ink-2); margin: 0; }
.kicker { color: var(--gold-text); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; display: block; }
html[lang="lo"] .kicker { text-transform: none; letter-spacing: 0; }
.caption-note { color: var(--muted); font-size: .88rem; margin-top: 18px; }

/* Audience columns */
.cols { display: grid; grid-template-columns: 1fr; gap: 22px; }
.col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.col h3 { font-size: 1.3rem; }
.checks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.checks li.soon::before { border-color: var(--gold); }

/* CTA band */
.band { background: var(--brand-ink); color: #fff; border-radius: 20px; padding: 44px 32px; display: grid; gap: 18px; }
.band h2 { color: #fff; }
.band p { color: #cfe3e6; margin: 0; }
.band .cta-row { margin: 8px 0 0; }
.band .btn-outline { background: transparent; color: #fff; border-color: #8fbfc7; }
.band .btn-outline:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* Pricing */
.toggle { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 30px; }
.toggle button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink-2); padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(15, 31, 46, .15); }
.toggle .save { color: var(--gold-text); font-weight: 700; }
.plans { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; display: flex; flex-direction: column; }
.plan.popular { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.badge { position: absolute; top: -13px; left: 24px; background: var(--gold-text); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.25rem; margin-bottom: 4px; }
.plan .for { color: var(--muted); font-size: .93rem; min-height: 3em; }
.price { margin: 14px 0 2px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price .cur { font-weight: 600; color: var(--ink-2); }
.price .amt { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.price .per { color: var(--muted); }
.price .from { color: var(--muted); font-size: .95rem; margin-right: 4px; }
.lak { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.plan .checks { margin: 4px 0 22px; }
.plan .btn { margin-top: auto; }
.note-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.notes { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 26px; }
.note-box h3 { margin-bottom: 6px; }
.note-box p { color: var(--ink-2); margin: 0; }
.footnote { color: var(--muted); font-size: .86rem; margin-top: 18px; }
.soon-list { display: grid; grid-template-columns: 1fr; gap: 10px; list-style: none; padding: 0; margin: 0; }
.soon-list li { background: #fff; border: 1px dashed #d8c39c; border-radius: 10px; padding: 12px 14px 12px 40px; position: relative; color: var(--ink-2); }
.soon-list li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border: 2px solid var(--gold); border-radius: 50%; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.4rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: 0 0 16px; }

/* Forms */
.form-page { padding: 48px 0 72px; background: var(--bg); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .86rem; margin-top: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid #c9d2da; border-radius: 10px; padding: 10px 12px; min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.err { color: var(--bad); font-size: .88rem; margin-top: 5px; font-weight: 500; }
.err:empty { display: none; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #c9d2da; border-radius: 10px; padding: 11px 12px; cursor: pointer; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input, .check input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.demo-box { background: var(--gold-soft); border: 1px solid #ecd9b4; border-radius: 10px; padding: 14px; }
.demo-box .hint { margin-left: 28px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.form-alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; background: var(--bad-soft); color: var(--bad); border: 1px solid #efc7bd; font-weight: 500; }
.form-alert:empty { display: none; }
.form-alert.info { background: var(--brand-soft); color: var(--brand-dark); border-color: #bcdbe0; }
.form-foot { color: var(--muted); font-size: .9rem; margin-top: 14px; }
/* honeypot: off-screen for people and ignored by autofill */
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.side h2 { font-size: 1.6rem; }
.side .checks li { color: var(--ink); }

/* Simple pages */
.page-hero { background: var(--bg-2); padding: 52px 0 36px; }
.page-hero p { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; }
.prose { max-width: 760px; padding: 40px 20px 72px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-2); }
.draft-banner { background: var(--gold-soft); border-bottom: 1px solid #ecd9b4; color: #6b4a12; text-align: center; padding: 10px 16px; font-weight: 600; font-size: .95rem; }
.message { min-height: 60vh; display: grid; place-items: center; padding: 56px 0; background: var(--bg); }
.message .card { max-width: 560px; text-align: center; }
.message .icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.6rem; font-weight: 700; }
.message .cta-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--ink); color: #c4ced7; padding: 52px 0 28px; font-size: .94rem; }
.site-footer a { color: #e7edf2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.site-footer h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa0b0; margin-bottom: 12px; font-weight: 700; }
html[lang="lo"] .site-footer h2 { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .logo { color: #fff; margin-bottom: 10px; }
.foot-base { border-top: 1px solid #26384a; margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: #8fa0b0; font-size: .86rem; }

/* Larger screens */
@media (min-width: 720px) {
  .pains { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .notes { grid-template-columns: 1fr 1fr; }
  .soon-list { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
  .band { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 48px 44px; }
  .band .cta-row { justify-content: flex-end; }
}
@media (min-width: 980px) {
  .hero { padding: 84px 0 56px; }
  .hero-grid { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 48px; }
  .pains { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .form-grid { grid-template-columns: 1fr 1.3fr; gap: 48px; }
  .soon-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) {
  .menu-btn { display: inline-block; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 14px; gap: 2px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 6px 0 0; }
  .nav .lang-btn { align-self: flex-start; margin-top: 6px; }
  .hero .shot { transform: none; }
}
@media (max-width: 899px) { .no-js .nav { display: flex; } .no-js .menu-btn { display: none; } }
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .cta-row .btn { width: 100%; }
  .choice-row { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; }
  section { padding: 56px 0; }
  .band { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Without JavaScript: no language switch or price toggle; contact details come from config.js */
.no-js .lang-btn, .no-js .js-only { display: none !important; }
