/* ============================================================
   TextBack Pro — Shared site chrome (header + footer)
   Loaded on every public page so header/footer markup, styling
   and behaviour stay identical everywhere. Relies on each page's
   own :root design tokens (--accent, --text, --border, etc.);
   the fallback block below only fills in values a page might miss.
============================================================ */

:root {
  --accent:        #2563EB;
  --accent-hover:  #1D4ED8;
  --text:          #0F172A;
  --text-2:        #334155;
  --muted:         #64748B;
  --muted-2:       #94A3B8;
  --border:        #E2E8F0;
  --border-2:      #CBD5E1;
  --surface:       #FFFFFF;
  --surface-2:     #F1F5F9;
  --font:          'DM Sans', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --radius-btn:    9px;
}

/* ============================================================
   HEADER
============================================================ */
.tbp-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250, 250, 250, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tbp-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: 1160px; margin: 0 auto; padding: 0 24px; gap: 24px;
}
.tbp-header__logo {
  font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px; letter-spacing: -0.4px; text-decoration: none;
}
.tbp-header__nav { display: flex; align-items: center; gap: 4px; }
.tbp-header__nav a {
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 7px; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tbp-header__nav a:hover { background: var(--surface-2); color: var(--accent); }
.tbp-header__nav a.active { color: var(--accent); background: var(--surface-2); }
.tbp-header__actions { display: flex; align-items: center; gap: 10px; }
.tbp-header__actions .btn-ghost,
.tbp-header__actions .btn-primary { font-size: 13px; padding: 8px 16px; }
.tbp-header__burger {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer; padding: 10px;
}
.tbp-header__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.tbp-header__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tbp-header__burger.open span:nth-child(2) { opacity: 0; }
.tbp-header__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.tbp-header__drawer {
  display: none; position: fixed; top: 60px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 16px 20px 20px; z-index: 999; flex-direction: column; gap: 4px;
}
.tbp-header__drawer.open { display: flex; }
.tbp-header__drawer a {
  font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--text);
  padding: 10px 4px; text-decoration: none;
}
.tbp-header__drawer a.active { color: var(--accent); }
.tbp-header__drawer .btn-primary { color: #fff; width: 100%; margin-top: 4px; justify-content: center; }
.tbp-header__drawer-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.tbp-page-wrap { padding-top: 60px; }

@media (max-width: 860px) {
  .tbp-header__nav,
  .tbp-header__actions .btn-ghost,
  .tbp-header__actions .btn-primary { display: none; }
  .tbp-header__burger { display: flex; }
}

/* ============================================================
   FOOTER
============================================================ */
.tbp-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 40px; }
.tbp-footer__inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 32px; }
.tbp-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; }
.tbp-footer__brand { display: flex; flex-direction: column; }
.tbp-footer__logo {
  font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: -0.4px; display: flex; align-items: center; gap: 8px;
}
.tbp-footer__tagline { font-family: var(--font); font-size: 13px; color: var(--muted-2); margin-top: 6px; line-height: 1.5; max-width: 220px; }
.tbp-footer__col-title {
  font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text);
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 12px;
}
.tbp-footer__col-links { display: flex; flex-direction: column; gap: 10px; }
.tbp-footer__col-links a { font-family: var(--font); font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.tbp-footer__col-links a:hover { color: var(--text); }
.tbp-footer__bottom {
  border-top: 1px solid var(--border); padding-top: 24px; text-align: center;
  font-size: 12px; color: var(--muted-2); font-family: var(--font-mono);
}

@media (max-width: 768px) { .tbp-footer__cols { grid-template-columns: 1fr 1fr; gap: 32px 24px; } }
@media (max-width: 480px) { .tbp-footer__cols { grid-template-columns: 1fr; } }
