/* ============================================================
   Beez Санхүү — Landing page (templates/home.php)
   Every rule is prefixed with .bfh-root so it outranks theme
   element styles; the reset uses :where() to stay at 0 specificity.
   ============================================================ */

body.beez-fin-canvas { margin: 0; background: #0f1628; }
:root:has(.bfh-root) { scroll-behavior: smooth; }

:where(.bfh-root, .bfh-root *, .bfh-root *::before, .bfh-root *::after) {
  box-sizing: border-box; margin: 0; padding: 0;
}

.bfh-root {
  --bfh-bg:      #0f1628;
  --bfh-bg2:     #121b33;
  --bfh-surface: #1a2340;
  --bfh-border:  #2a3556;
  --bfh-text:    #e8edf8;
  --bfh-muted:   #93a3c4;
  --bfh-accent:  #3b82f6;
  --bfh-income:  #10b981;
  --bfh-expense: #ef4444;
  --bfh-cash:    #8b5cf6;
  --bfh-amber:   #f59e0b;

  font-family: 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  font-size: 16px; line-height: 1.6;
  background: var(--bfh-bg); color: var(--bfh-text);
  overflow-x: clip;
}
.bfh-root a { text-decoration: none; }
.bfh-root .bfh-container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.bfh-root .bfh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  cursor: pointer; transition: transform .15s, opacity .15s, background .15s;
}
.bfh-root .bfh-btn:hover { transform: translateY(-1px); }
.bfh-root .bfh-btn-sm { padding: 9px 18px; font-size: 13px; }
.bfh-root .bfh-btn-primary { background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; box-shadow: 0 8px 24px rgba(79,70,229,.35); }
.bfh-root .bfh-btn-primary:hover { opacity: .92; color: #fff; }
.bfh-root .bfh-btn-ghost { border-color: rgba(255,255,255,.25); color: var(--bfh-text); background: rgba(255,255,255,.04); }
.bfh-root .bfh-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.bfh-root .bfh-btn-white { background: #fff; color: #1e3a8a; }
.bfh-root .bfh-btn-white:hover { color: #1e3a8a; opacity: .92; }

/* ── Nav ─────────────────────────────────────────────────────── */
.bfh-root .bfh-nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #1a2a6c 0%, #2563eb 60%, #1e40af 100%);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
body.admin-bar .bfh-root .bfh-nav { top: 32px; }
.bfh-root .bfh-nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.bfh-root .bfh-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #fff; }
.bfh-root .bfh-logo-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--bfh-amber);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.bfh-root .bfh-logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.bfh-root .bfh-logo-text strong { font-size: 16px; font-weight: 700; color: #fff; }
.bfh-root .bfh-logo-text small { font-size: 11px; color: rgba(255,255,255,.72); }
.bfh-root .bfh-nav-links { display: flex; gap: 4px; flex: 1; }
.bfh-root .bfh-nav-links a { color: rgba(255,255,255,.8); padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.bfh-root .bfh-nav-links a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── Hero ────────────────────────────────────────────────────── */
.bfh-root .bfh-hero {
  padding: 88px 0 96px;
  background:
    radial-gradient(900px 480px at 88% 0%, rgba(59,130,246,.28), transparent 60%),
    radial-gradient(700px 420px at 0% 55%, rgba(139,92,246,.2), transparent 60%),
    var(--bfh-bg);
}
.bfh-root .bfh-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.bfh-root .bfh-badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
  background: rgba(245,158,11,.14); color: #fbbf24; border: 1px solid rgba(245,158,11,.3);
  font-size: 13px; font-weight: 600;
}
.bfh-root h1 {
  font-family: inherit; font-size: clamp(34px, 5vw, 56px); line-height: 1.12;
  font-weight: 800; letter-spacing: -.02em; color: #fff; margin-bottom: 20px;
}
.bfh-root .bfh-grad {
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bfh-root .bfh-lead { font-size: 18px; color: var(--bfh-muted); max-width: 540px; margin-bottom: 32px; }
.bfh-root .bfh-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.bfh-root .bfh-hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; color: var(--bfh-muted); font-size: 14px; }
.bfh-root .bfh-hero-points li::before { content: '✓'; color: var(--bfh-income); font-weight: 700; margin-right: 6px; }

/* Preview mock */
.bfh-root .bfh-preview {
  background: var(--bfh-surface); border: 1px solid var(--bfh-border); border-radius: 18px;
  padding: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.bfh-root .bfh-preview-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.bfh-root .bfh-preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a4670; }
.bfh-root .bfh-preview-bar em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--bfh-muted); }
.bfh-root .bfh-mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bfh-root .bfh-mini { padding: 14px 16px; border-radius: 12px; color: #fff; }
.bfh-root .bfh-mini small { display: block; font-size: 12px; opacity: .9; }
.bfh-root .bfh-mini b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.bfh-root .bfh-mini-income  { background: linear-gradient(135deg, #059669, #10b981); }
.bfh-root .bfh-mini-expense { background: linear-gradient(135deg, #dc2626, #ef4444); }
.bfh-root .bfh-mini-profit  { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.bfh-root .bfh-mini-cash    { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.bfh-root .bfh-mini-chart { margin-top: 12px; background: var(--bfh-bg2); border: 1px solid var(--bfh-border); border-radius: 12px; padding: 14px; }
.bfh-root .bfh-mini-chart-title { font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.bfh-root .bfh-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; }
.bfh-root .bfh-bar-group { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 110px; }
.bfh-root .bfh-bar { display: block; width: 11px; border-radius: 4px 4px 0 0; }
.bfh-root .bfh-bar-in  { background: var(--bfh-income); }
.bfh-root .bfh-bar-out { background: var(--bfh-expense); }
.bfh-root .bfh-bar-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 6px; text-align: center; font-size: 10px; color: var(--bfh-muted); }
.bfh-root .bfh-preview-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 4px 4px 0; font-size: 13px; color: var(--bfh-muted); }
.bfh-root .bfh-preview-foot b { font-size: 20px; color: #fff; margin-right: 8px; }
.bfh-root .bfh-ok { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #064e3b; color: #6ee7b7; }

/* ── Sections ────────────────────────────────────────────────── */
.bfh-root .bfh-section { padding: 88px 0; scroll-margin-top: 68px; }
.bfh-root .bfh-section-alt { background: var(--bfh-bg2); }
.bfh-root .bfh-section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.bfh-root .bfh-eyebrow { display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bfh-amber); }
.bfh-root h2 { font-family: inherit; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: #fff; margin-bottom: 14px; }
.bfh-root h3 { font-family: inherit; font-size: 18px; line-height: 1.35; font-weight: 700; color: #fff; margin-bottom: 8px; }
.bfh-root .bfh-section-head p { color: var(--bfh-muted); font-size: 17px; }

.bfh-root .bfh-grid { display: grid; gap: 20px; }
.bfh-root .bfh-grid-3 { grid-template-columns: repeat(3, 1fr); }
.bfh-root .bfh-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Feature cards */
.bfh-root .bfh-card {
  background: var(--bfh-surface); border: 1px solid var(--bfh-border); border-radius: 16px;
  padding: 26px; transition: transform .2s, border-color .2s;
}
.bfh-root .bfh-card:hover { transform: translateY(-3px); border-color: #3b4a78; }
.bfh-root .bfh-card p { color: var(--bfh-muted); font-size: 15px; }
.bfh-root .bfh-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px; font-size: 22px;
}
.bfh-root .bfh-icon-green  { background: rgba(16,185,129,.16); }
.bfh-root .bfh-icon-blue   { background: rgba(59,130,246,.16); }
.bfh-root .bfh-icon-amber  { background: rgba(245,158,11,.16); }
.bfh-root .bfh-icon-purple { background: rgba(139,92,246,.18); }
.bfh-root .bfh-icon-red    { background: rgba(239,68,68,.16); }
.bfh-root .bfh-icon-slate  { background: rgba(148,163,184,.16); }

/* Steps */
.bfh-root .bfh-step { text-align: center; padding: 8px 16px; }
.bfh-root .bfh-step p { color: var(--bfh-muted); font-size: 15px; }
.bfh-root .bfh-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 16px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
  font-size: 22px; font-weight: 800; box-shadow: 0 8px 24px rgba(79,70,229,.35);
}

/* Decision cards */
.bfh-root .bfh-q { background: var(--bfh-surface); border: 1px solid var(--bfh-border); border-left: 4px solid var(--bfh-accent); border-radius: 14px; padding: 24px 26px; }
.bfh-root .bfh-q p { color: var(--bfh-muted); font-size: 15px; }
.bfh-root .bfh-q-green  { border-left-color: var(--bfh-income); }
.bfh-root .bfh-q-red    { border-left-color: var(--bfh-expense); }
.bfh-root .bfh-q-blue   { border-left-color: var(--bfh-accent); }
.bfh-root .bfh-q-purple { border-left-color: var(--bfh-cash); }

/* CTA band */
.bfh-root .bfh-cta-section { padding-top: 24px; }
.bfh-root .bfh-cta {
  text-align: center; padding: 64px 32px; border-radius: 24px;
  background: linear-gradient(135deg, #1a2a6c 0%, #2563eb 60%, #7c3aed 100%);
  box-shadow: 0 30px 80px rgba(37,99,235,.25);
}
.bfh-root .bfh-cta p { color: rgba(255,255,255,.85); font-size: 17px; margin-bottom: 28px; }
.bfh-root .bfh-cta h2 { margin-bottom: 12px; }

/* Footer */
.bfh-root .bfh-footer { border-top: 1px solid var(--bfh-border); padding: 28px 0; color: var(--bfh-muted); font-size: 14px; }
.bfh-root .bfh-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.bfh-root .bfh-footer a { color: var(--bfh-text); }
.bfh-root .bfh-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .bfh-root .bfh-hero { padding: 64px 0 72px; }
  .bfh-root .bfh-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .bfh-root .bfh-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .bfh-root .bfh-nav-links { display: none; }
  .bfh-root .bfh-nav-inner { justify-content: space-between; }
}
@media (max-width: 782px) {
  body.admin-bar .bfh-root .bfh-nav { top: 46px; }
}
@media (max-width: 640px) {
  .bfh-root .bfh-section { padding: 64px 0; }
  .bfh-root .bfh-grid-3, .bfh-root .bfh-grid-2 { grid-template-columns: 1fr; }
  .bfh-root .bfh-logo-text small { display: none; }
  .bfh-root .bfh-lead { font-size: 16px; }
  .bfh-root .bfh-hero-cta .bfh-btn { flex: 1 1 100%; }
  .bfh-root .bfh-cta { padding: 44px 20px; }
  .bfh-root .bfh-mini b { font-size: 16px; }
  .bfh-root .bfh-bar-labels { font-size: 9px; }
}

/* ── Desktop scale ───────────────────────────────────────────────
   Renders the whole landing page at 85% on desktop widths (like
   browser zoom 85%) so it isn't oversized on scaled displays.
   Change --bfh-zoom to taste: 1 = original size, .8 = smaller.
   Tablets / phones (<1025px) are not scaled. */
.bfh-root { --bfh-zoom: .85; }
@media (min-width: 1025px) {
  .bfh-root { zoom: var(--bfh-zoom); }
  .bfh-root .bfh-container { max-width: 1280px; }
  .bfh-root .bfh-hero { padding: 56px 0 64px; }
  body.admin-bar .bfh-root .bfh-nav { top: calc(32px / var(--bfh-zoom)); }
}
