/* ═══════════════════════════════════════════════════════════════
   SBBK GLOBAL STYLESHEET
   Small Business Bookkeeping — smallbusinessbookkeeping.ca
   Brand colours locked. Do not modify hex values.
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --navy:        #1B3A6B;
  --steel:       #4A86C8;
  --slate:       #4A5568;
  --gold:        #C9933A;
  --light-blue:  #EBF4FF;
  --section-bg:  #F7F8FA;
  --border:      #D1D5DB;
  --check-green: #276749;
  --body-text:   #1A1A1A;
  --secondary:   #4A5568;
  --tertiary:    #718096;
  --white:       #FFFFFF;
  --danger:      #C53030;
  --warning:     #D97706;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:   0 1px 3px rgba(27,58,107,.08), 0 1px 2px rgba(27,58,107,.06);
  --shadow-md:   0 4px 12px rgba(27,58,107,.10), 0 2px 4px rgba(27,58,107,.06);
  --shadow-lg:   0 10px 30px rgba(27,58,107,.12), 0 4px 8px rgba(27,58,107,.06);

  --max-width:   1160px;
  --transition:  0.2s ease;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--body-text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--steel); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }
button, input, textarea, select { font-family: var(--font-body); }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
h1 { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,3rem); font-weight: 700; color: var(--navy); line-height: 1.2; }
h2 { font-family: var(--font-display); font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 600; color: var(--navy); line-height: 1.25; }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--navy); }
h4 { font-size: 1rem; font-weight: 600; color: var(--navy); }
p { color: var(--secondary); line-height: 1.7; }
.lead { font-size: 1.15rem; color: var(--secondary); line-height: 1.7; font-weight: 300; }
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--alt { background: var(--section-bg); }
.section--navy { background: var(--navy); }
.section--dark { background: #0F2347; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
@media(max-width:900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media(max-width:600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: #142d54;
  border-color: #142d54;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-steel {
  background: var(--steel);
  color: var(--white);
  border-color: var(--steel);
}
.btn-steel:hover {
  background: #3a72af;
  border-color: #3a72af;
  color: var(--white);
  transform: translateY(-1px);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover { background: #b07e2a; border-color: #b07e2a; color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: white; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--navy { background: var(--navy); border-color: var(--navy); color: var(--white); }
.card--steel { background: var(--steel); border-color: var(--steel); color: var(--white); }
.card--highlight { border-color: var(--steel); border-width: 2px; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--body-text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(74,134,200,0.15);
}
.form-input.error, .form-select.error, .form-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(197,48,48,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-hint { font-size: 0.8rem; color: var(--tertiary); margin-top: 4px; }
.form-note { font-size: 0.82rem; color: var(--warning); background: #FEF3C7; padding: 8px 12px; border-radius: var(--radius-sm); margin-top: 6px; display: none; }
.form-note.show { display: block; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge--navy { background: var(--light-blue); color: var(--navy); }
.badge--gold { background: #FDF3E3; color: #92400E; }
.badge--green { background: #EAF3DE; color: var(--check-green); }
.badge--popular { background: var(--steel); color: var(--white); }

/* ── TRUST STRIP ─────────────────────────────────────────────── */
.trust-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary);
}
.trust-item .icon {
  width: 20px;
  height: 20px;
  color: var(--steel);
  flex-shrink: 0;
}

/* ── CREDENTIAL BAR ──────────────────────────────────────────── */
.cred-bar {
  background: var(--navy);
  padding: 14px 0;
  overflow: hidden;
}
.cred-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.cred-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.cred-item .dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}
@media(max-width:600px) { .cred-bar-inner { gap: 16px; } .cred-item { font-size: 0.75rem; } }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-header .eyebrow { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.05rem; }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 40px 0; }
.divider--gold { height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ── CHECK LISTS ─────────────────────────────────────────────── */
.check-list { list-style: none; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--secondary);
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '✓';
  color: var(--check-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-md); font-size: 0.9rem; margin-bottom: 16px; }
.alert--success { background: #EAF3DE; color: var(--check-green); border-left: 3px solid var(--check-green); }
.alert--warning { background: #FEF3C7; color: #92400E; border-left: 3px solid var(--gold); }
.alert--error { background: #FEE2E2; color: var(--danger); border-left: 3px solid var(--danger); }
.alert--info { background: var(--light-blue); color: var(--navy); border-left: 3px solid var(--steel); }

/* ── NAV ─────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-text .brand-sbbk { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1; }
.nav-logo-text .brand-bk { font-size: 0.72rem; font-weight: 600; color: var(--steel); letter-spacing: 0.14em; text-transform: uppercase; display: block; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; color: var(--secondary); transition: all var(--transition); white-space: nowrap; }
.nav-link:hover { color: var(--navy); background: var(--section-bg); }
.nav-link.active { color: var(--navy); font-weight: 600; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-item { display: block; padding: 10px 14px; font-size: 0.875rem; color: var(--secondary); border-radius: var(--radius-sm); transition: all var(--transition); }
.nav-dropdown-item:hover { background: var(--section-bg); color: var(--navy); }
.nav-cta { margin-left: 8px; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-hamburger span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: all var(--transition); }
@media(max-width:900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--white);
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
    z-index: 999;
    align-items: stretch;
  }
  .nav-mobile-open .nav-link { padding: 14px 16px; border-radius: var(--radius-md); }
  .nav-mobile-open .nav-cta { margin-left: 0; }
  .nav-mobile-open .nav-dropdown-menu { position: static; box-shadow: none; border: none; background: var(--section-bg); display: block; }
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: #0F2347; color: rgba(255,255,255,0.8); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .brand-name { font-family: var(--font-display); font-size: 1.5rem; color: white; font-weight: 700; }
.footer-brand .tagline { font-size: 0.8rem; color: var(--gold); letter-spacing: 0.1em; margin-top: 4px; }
.footer-brand p { font-size: 0.875rem; margin-top: 16px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-col h4 { color: white; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.65); font-size: 0.875rem; padding: 4px 0; transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.4); }
@media(max-width:900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media(max-width:600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── STICKY MOBILE CTA ───────────────────────────────────────── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 998;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
@media(max-width:768px) { .mobile-cta-bar { display: flex; gap: 10px; } }

/* ── CHAT WIDGET ─────────────────────────────────────────────── */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 997;
}
.chat-bubble {
  width: 52px;
  height: 52px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
  border: none;
}
.chat-bubble:hover { transform: scale(1.08); }
.chat-bubble svg { color: white; width: 24px; height: 24px; }
.chat-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 340px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-header { background: var(--navy); padding: 16px 20px; color: white; }
.chat-header h4 { font-size: 0.95rem; margin-bottom: 2px; }
.chat-header p { font-size: 0.78rem; opacity: 0.8; }
.chat-messages { padding: 16px; flex: 1; overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 85%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg-bubble { padding: 10px 14px; border-radius: 16px; font-size: 0.875rem; line-height: 1.5; }
.chat-msg.bot .chat-msg-bubble { background: var(--section-bg); color: var(--body-text); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-msg-bubble { background: var(--navy); color: white; border-bottom-right-radius: 4px; }
.chat-input-row { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 100px; font-size: 0.875rem; outline: none; }
.chat-input:focus { border-color: var(--steel); }
.chat-send { width: 36px; height: 36px; background: var(--navy); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send svg { color: white; width: 16px; height: 16px; }
.chat-typing { display: flex; gap: 4px; padding: 8px 0; }
.chat-typing span { width: 6px; height: 6px; background: var(--tertiary); border-radius: 50%; animation: typing 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
@media(max-width:768px) { .chat-widget { bottom: 76px; right: 16px; } .chat-panel { width: 300px; right: -4px; } }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--steel); border-radius: 2px; transition: width 0.4s ease; }

/* ── TOOLTIPS ────────────────────────────────────────────────── */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-icon { width: 16px; height: 16px; background: var(--border); border-radius: 50%; font-size: 10px; color: var(--tertiary); display: inline-flex; align-items: center; justify-content: center; cursor: help; font-weight: 700; margin-left: 4px; flex-shrink: 0; }
.tooltip-text { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--navy); color: white; font-size: 0.78rem; padding: 8px 12px; border-radius: var(--radius-sm); white-space: normal; width: 220px; line-height: 1.5; display: none; z-index: 100; box-shadow: var(--shadow-md); }
.tooltip-wrap:hover .tooltip-text { display: block; }

/* ── LOADING SPINNER ─────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-up { animation: fadeUp 0.6s ease forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease forwards; }

/* ── UTILS ───────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-steel { color: var(--steel); }
.text-gold { color: var(--gold); }
.text-white { color: var(--white); }
.text-muted { color: var(--tertiary); }
.font-display { font-family: var(--font-display); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-center { justify-content: center; } .flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── PRINT ───────────────────────────────────────────────────── */
@media print { .site-nav, .site-footer, .chat-widget, .mobile-cta-bar { display: none; } }
