/* ==========================================================================
   Barnamenevis — public landing page (loaded after app.css, body.lp only)
   Flat and quiet: neutral surfaces, hairlines, brand red as the only color.
   ========================================================================== */

body.lp {
    --lp-bg: #0c0c0e;
    --lp-surface: #141416;
    --lp-line: rgba(255, 255, 255, 0.08);
    --lp-line-2: rgba(255, 255, 255, 0.14);
    --lp-max: 1120px;
    --lp-gutter: 24px;
    background: var(--lp-bg);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.8;
    overflow-x: hidden;
}

.lp ::selection { background: rgba(var(--primary-rgb), .4); color: #fff; }
.lp main { display: block; }
.lp h1, .lp h2, .lp h3 { color: var(--text); }

.lp-wrap { max-width: var(--lp-max); margin: 0 auto; padding: 0 var(--lp-gutter); }

.lp .btn { border-radius: 10px; }
.lp-btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.lp .btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.lp .btn-secondary { background: transparent; border-color: var(--lp-line-2); }
.lp .btn-secondary:hover:not(:disabled) { background: var(--hover); }

.lp-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.lp-note { color: var(--muted); font-size: 13.5px; margin: 28px 0 0; }

/* ---------- Nav ---------- */

.lp-nav { position: sticky; top: 0; z-index: 30; background: var(--lp-bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
.lp-nav.is-scrolled, .lp-nav.is-open { border-bottom-color: var(--lp-line); }
.lp-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 10px; color: var(--text) !important; }
.lp-nav-links { display: flex; gap: 24px; margin-inline-start: auto; }
.lp-nav-links a { color: var(--text-2) !important; font-size: 14px; transition: color .15s; }
.lp-nav-links a:hover { color: var(--text) !important; }
.lp-nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--lp-line-2); background: transparent; color: var(--text); place-items: center; cursor: pointer; }

/* ---------- Hero ---------- */

.lp-hero { padding: 96px 0 0; text-align: center; }
.lp-hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.45; max-width: 820px; margin: 0 auto 18px; }
.lp-hero-sub { color: var(--text-2); font-size: clamp(15px, 1.8vw, 17px); max-width: 620px; margin: 0 auto; }
.lp-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.lp-hero-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.lp-hero-note span { margin: 0 10px; }

/* Demo window */
.lp-demo { max-width: 800px; margin: 64px auto 0; text-align: right; border-radius: 12px; background: var(--lp-surface); border: 1px solid var(--lp-line); overflow: hidden; }
.lp-demo-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--lp-line); }
.lp-demo-head .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.lp-demo-title { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; }
.lp-demo-body { padding: 20px; display: grid; gap: 16px; }
.lp-demo-prompt { margin: 0; justify-self: start; max-width: 560px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--lp-line); color: var(--text); font-size: 14px; }
.lp-demo-answer { border-radius: 10px; border: 1px solid var(--lp-line); background: var(--code-bg); overflow: hidden; }
.lp-demo-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--lp-line); color: var(--muted); }
.lp-demo .code { border: none; border-radius: 0; max-height: 280px; background: transparent; }
.lp-demo-actions { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--lp-line); }
.lp-fake-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; border: 1px solid var(--lp-line-2); color: var(--text-2); }
.lp-fake-btn.is-primary { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Stats */
.lp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 64px 0 0; border-top: 1px solid var(--lp-line); }
.lp-stat { display: flex; flex-direction: column-reverse; padding: 28px 16px; border-inline-start: 1px solid var(--lp-line); }
.lp-stat:first-child { border-inline-start: none; }
.lp-stat dd { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--text); font-variant-numeric: tabular-nums; }
.lp-stat dt { color: var(--muted); font-size: 13px; }

/* ---------- Sections ---------- */

.lp-section { padding: 96px 0; border-top: 1px solid var(--lp-line); }
.lp-head { max-width: 640px; margin-bottom: 48px; }
.lp-head h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.5; margin-bottom: 8px; }
.lp-head p { color: var(--muted); margin: 0; }

/* Features: table-like grid with hairlines, no card backgrounds */
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--lp-line); border-inline-start: 1px solid var(--lp-line); }
.lp-feature { padding: 28px; border-bottom: 1px solid var(--lp-line); border-inline-end: 1px solid var(--lp-line); }
.lp-feature .bnv-icon { color: var(--text-2); margin-bottom: 16px; }
.lp-feature h3 { font-size: 16px; margin-bottom: 6px; }
.lp-feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Library ---------- */

.lp-snips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-snip { display: flex; flex-direction: column; min-width: 0; padding: 22px; border-radius: 12px; border: 1px solid var(--lp-line); background: var(--lp-surface); transition: border-color .2s; }
.lp-snip:hover { border-color: var(--lp-line-2); }
.lp-snip-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lp-snip h3 { font-size: 15.5px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-snip p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.8; min-height: calc(13.5px * 1.8 * 2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-snip-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--lp-line); display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lp-snip-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.lp-snip-author { margin-inline-start: auto; min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block !important; }

/* ---------- Steps ---------- */

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lp-step { padding-top: 20px; border-top: 1px solid var(--lp-line-2); }
.lp-step-num { display: block; margin-bottom: 12px; color: var(--primary-text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lp-step h3 { font-size: 16px; margin-bottom: 6px; }
.lp-step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Plans ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; border-radius: 12px; border: 1px solid var(--lp-line); background: var(--lp-surface); }
.plan.is-highlighted { border-color: var(--primary); }
.plan-head { display: flex; align-items: center; gap: 8px; }
.plan-head h3 { font-size: 17px; }
.plan-tag { margin-inline-start: auto; color: var(--primary-text); font-size: 12.5px; font-weight: 500; }
.plan-desc { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.plan-price { margin: 24px 0 4px; font-size: 32px; font-weight: 700; line-height: 1.4; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 13px; font-weight: 400; color: var(--muted); margin-inline-start: 6px; }
.plan-credits { color: var(--text-2); font-size: 13.5px; margin-bottom: 22px; }
.plan-features { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--lp-line); display: grid; gap: 10px; align-content: start; flex: 1; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 14px; }
.plan-features .bnv-icon { color: var(--muted); margin-top: 5px; flex-shrink: 0; }

/* ---------- FAQ ---------- */

.lp-faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.lp-faq-wrap .lp-head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--lp-line); }
.faq details { border-bottom: 1px solid var(--lp-line); }
.faq summary { padding: 20px 0; cursor: pointer; font-weight: 500; color: var(--text); list-style: none; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .bnv-icon { margin-inline-start: auto; flex-shrink: 0; color: var(--muted); transition: transform .2s, color .2s; }
.faq details[open] summary .bnv-icon { transform: rotate(180deg); color: var(--primary-text); }
.faq details p { padding: 0 0 20px; margin: 0; color: var(--text-2); }

/* ---------- CTA ---------- */

.lp-cta { text-align: center; }
.lp-cta h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.5; margin-bottom: 8px; }
.lp-cta p { color: var(--muted); margin: 0 auto 32px; max-width: 540px; }

/* ---------- Footer ---------- */

.lp-footer { border-top: 1px solid var(--lp-line); color: var(--muted); font-size: 13.5px; }
.lp-footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; padding-top: 40px; padding-bottom: 32px; }
.lp-footer-brand { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 10px; }
.lp-footer-brand p { grid-column: 1 / -1; margin: 0; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.lp-footer-links a { color: var(--text-2) !important; }
.lp-footer-links a:hover { color: var(--text) !important; }
.lp-footer-contact { max-width: 320px; }
.lp-footer-bottom { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--lp-line); font-size: 12.5px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .lp-features, .lp-snips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-stat:nth-child(3) { border-inline-start: none; }
    .lp-stat:nth-child(n + 3) { border-top: 1px solid var(--lp-line); }
    .lp-faq-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 760px) {
    body.lp { --lp-gutter: 16px; }
    .lp-nav-toggle { display: grid; }
    .lp-nav-cta { margin-inline-start: auto; }
    .lp-nav-links {
        display: none; position: absolute; top: 64px; right: 0; left: 0; margin: 0; padding: 8px 16px 16px;
        flex-direction: column; gap: 0; background: var(--lp-bg); border-bottom: 1px solid var(--lp-line);
    }
    .lp-nav.is-open .lp-nav-links { display: flex; }
    .lp-nav-links a { padding: 12px 0; font-size: 15px; }
    .lp-hero { padding-top: 64px; }
    .lp-demo { margin-top: 48px; }
    .lp-demo-body { padding: 14px; }
    .lp-demo-actions .lp-fake-btn:last-child { display: none; }
    .lp-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .lp-section { padding: 72px 0; }
    .lp-head { margin-bottom: 32px; }
}

@media (max-width: 560px) {
    .lp-features, .lp-snips { grid-template-columns: minmax(0, 1fr); }
    .lp-nav-cta span { display: none; }
    .lp-nav-cta { width: 40px; padding: 0; justify-content: center; }
    .lp-stat { padding: 20px 12px; }
    .lp-stat dd { font-size: 22px; }
    .lp-actions .btn { width: 100%; justify-content: center; }
    .lp-hero-note span { margin: 0 6px; }
}
