/* ═══════════════════════════════════════════════════════
   BASE.CSS — Reset, Design Tokens, Typography, Layout
   Marketing Central Proposal — Bonfire LA × Liberty Tax
   ═══════════════════════════════════════════════════════ */

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ─── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Bonfire Brand */
  --bf-black:       #0d0d0d;
  --bf-green:       #2eb82e;
  --bf-green-light: #e8f8e8;
  --bf-green-dark:  #1a8a1a;

  /* Liberty Tax Brand */
  --lt-red:         #cc0000;
  --lt-red-light:   #fff0f0;
  --lt-navy:        #003087;
  --lt-navy-dark:   #00205b;
  --lt-navy-light:  #f0f4ff;

  /* Accent = Liberty navy (the default highlight color).
     Use --accent / --accent-dark / --accent-light on LIGHT surfaces,
     and --accent-on-dark on dark surfaces (sidebar, hero) where navy
     would be unreadable. Green and Bonfire red stay reserved as
     occasional "cool" highlights in specific visualizations. */
  --accent:         var(--lt-navy);
  --accent-dark:    var(--lt-navy-dark);
  --accent-light:   var(--lt-navy-light);
  --accent-on-dark: #5b8def;

  /* Neutrals */
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  /* Semantic */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted:     var(--gray-400);
  --bg-page:        #ffffff;
  --bg-subtle:      var(--gray-50);
  --bg-muted:       var(--gray-100);
  --border-color:   var(--gray-200);
  --border-strong:  var(--gray-300);

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);

  /* Transitions */
  --t-fast:   .15s ease;
  --t-normal: .25s ease;
  --t-slow:   .4s ease;

  /* Layout */
  --sidebar-w:    272px;
  --content-max:  860px;
  --topbar-h:     56px;
}

/* ─── Typography ─────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bf-black);
}

h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin-bottom: var(--space-4); color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--text-primary); }

/* ─── Page Layout ────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar-placeholder {
  width: var(--sidebar-w);
  flex-shrink: 0;
}

.page-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-12) var(--space-10) var(--space-20);
}

.page-inner {
  max-width: var(--content-max);
}

/* ─── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  font-size: .8125rem;
  color: var(--text-muted);
}
.breadcrumb a { transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--bf-black); }
.breadcrumb .sep { color: var(--gray-300); }
.breadcrumb .current { color: var(--text-secondary); }

/* ─── Page Header ────────────────────────────────────────────────── */
.page-header {
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-color);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.page-header h1 { margin-bottom: var(--space-3); }

.page-header .lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 640px;
}

/* ─── RFP Callout ────────────────────────────────────────────────── */
.rfp-callout {
  background: var(--lt-navy-light);
  border-left: 4px solid var(--lt-navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}
.rfp-callout .rfp-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lt-navy);
  margin-bottom: var(--space-2);
}
.rfp-callout p {
  font-size: .9375rem;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}
.rfp-callout p:last-child { margin-bottom: 0; }

/* ─── Section Divider ────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-12) 0;
}

/* ─── Page Nav (prev/next) ────────────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-4);
  margin-top: var(--space-20);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
}
.page-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--t-normal);
  max-width: 45%;
}
.page-nav-link:hover {
  border-color: var(--bf-black);
  box-shadow: var(--shadow-sm);
}
.page-nav-link .direction {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.page-nav-link .label {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.page-nav-link.next { margin-left: auto; text-align: right; }

/* ─── On-Page TOC ────────────────────────────────────────────────── */
.on-page-toc {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-10);
}
.on-page-toc .toc-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.on-page-toc ul { display: flex; flex-direction: column; gap: var(--space-1); }
.on-page-toc a {
  font-size: .9375rem;
  color: var(--gray-700);
  transition: color var(--t-fast);
}
.on-page-toc a:hover { color: var(--bf-green-dark); }

/* ─── Section Anchor Heading ─────────────────────────────────────── */
.section-anchor {
  scroll-margin-top: calc(var(--topbar-h) + var(--space-6));
}

/* ─── Print ──────────────────────────────────────────────────────── */
@media print {
  .sidebar-placeholder,
  #sidebar,
  .mobile-topbar,
  .page-nav { display: none; }
  .page-main { padding: 0; }
  .page-inner { max-width: 100%; }
}

/* ─── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar-placeholder { display: none; }
  .page-main { padding: calc(var(--topbar-h) + var(--space-8)) var(--space-5) var(--space-16); }
}
