/* =========================================================
   FindByValue — Global Header & Footer styles
   Upload to site root:  /header-footer.css
   Everything is scoped to .fbv-root so it never changes
   the styling of your page content.
   ========================================================= */

/* ---------- Design tokens (copied from homepage) ---------- */
.fbv-root {
  --fbv-onyx: #0A100D;
  --fbv-dust-grey: #D6D5C9;
  --fbv-brown-red: #A22C29;
  --fbv-bg: #F4F3ED;
  --fbv-bg-alt: #EAE8DE;
  --fbv-surface: #FFFFFF;
  --fbv-line: #D8D6C7;
  --fbv-line-subtle: #E6E4D8;
  --fbv-ink: #0A100D;
  --fbv-ink-soft: #383D36;
  --fbv-muted: #666C5E;
  --fbv-link: #A22C29;
  --fbv-link-hover: #902923;
  --fbv-accent: #A22C29;
  --fbv-shadow-md: 0 4px 8px -1px rgba(10, 16, 13, 0.07), 0 2px 4px -2px rgba(10, 16, 13, 0.06);
  --fbv-r-sm: 8px;
  --fbv-r-md: 14px;
  --fbv-serif: 'Fraunces', Georgia, serif;
  --fbv-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  font-family: var(--fbv-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fbv-ink);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

:root[data-theme="dark"] .fbv-root {
  --fbv-bg: #0C120F;
  --fbv-bg-alt: #131B17;
  --fbv-surface: #16201B;
  --fbv-line: #26342B;
  --fbv-line-subtle: #1F2C24;
  --fbv-ink: #EDECE4;
  --fbv-ink-soft: #B9BAA3;
  --fbv-muted: #8E9685;
  --fbv-link: #E58A86;
  --fbv-link-hover: #F2A9A5;
  --fbv-accent: #E58A86;
  --fbv-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- Scoped reset ---------- */
.fbv-root *, .fbv-root *::before, .fbv-root *::after { box-sizing: border-box; }
.fbv-root ul { list-style: none; margin: 0; padding: 0; }
.fbv-root li { margin: 0; padding: 0; }
.fbv-root p, .fbv-root h4 { margin: 0; padding: 0; }
.fbv-root a { text-decoration: none; transition: color 0.2s ease, transform 0.2s ease; }
.fbv-root button { font-family: inherit; }
.fbv-root :focus-visible { outline: 3px solid var(--fbv-accent); outline-offset: 2px; }

.fbv-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Skip link ---------- */
.fbv-skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--fbv-onyx);
  color: var(--fbv-dust-grey);
  padding: 0.6rem 1.2rem;
  border-radius: var(--fbv-r-sm);
  z-index: 100000;
  font-weight: 600;
}
.fbv-skip-link:focus { top: 1rem; color: var(--fbv-dust-grey); }

/* ---------- Announcement bar ---------- */
.fbv-announcement {
  background: var(--fbv-onyx);
  color: var(--fbv-dust-grey);
  font-size: 0.83rem;
  padding: 0.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fbv-announcement .fbv-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fbv-announcement strong { color: #FFFFFF; }
.fbv-announcement a {
  color: #E58A86;
  text-decoration: underline;
  font-weight: 600;
  margin-left: 0.3rem;
}
.fbv-announcement a:hover { color: #FFFFFF; }

/* ---------- Header ---------- */
.fbv-header {
  position: sticky;
  top: 0;
  z-index: 99990;
  background: var(--fbv-bg);
  border-bottom: 1px solid var(--fbv-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fbv-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 2rem;
}
.fbv-brand {
  font-family: var(--fbv-serif);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--fbv-ink);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.fbv-brand:hover { color: var(--fbv-ink); }
.fbv-brand span { color: var(--fbv-accent); }

.fbv-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 1rem;
}
.fbv-nav ul { display: flex; align-items: center; gap: 1.5rem; }
.fbv-nav a {
  color: var(--fbv-ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.4rem 0;
}
.fbv-nav a:hover,
.fbv-nav a[aria-current="page"] { color: var(--fbv-link); }
.fbv-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--fbv-accent);
  border-radius: 2px;
}

.fbv-actions { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.fbv-icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: var(--fbv-surface);
  border: 1px solid var(--fbv-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fbv-ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.fbv-icon-btn:hover {
  border-color: var(--fbv-accent);
  color: var(--fbv-accent);
  transform: scale(1.05);
}
.fbv-icon-btn svg { width: 18px; height: 18px; }
#fbv-burger { display: none; }

/* ---------- Mobile drawer ---------- */
.fbv-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  background: var(--fbv-bg);
  border-top: 1px solid var(--fbv-line);
  padding: 1.5rem;
  overflow-y: auto;
}
.fbv-drawer.open { display: block; }
.fbv-drawer ul { display: flex; flex-direction: column; gap: 1rem; }
.fbv-drawer a {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fbv-ink);
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--fbv-line-subtle);
}
.fbv-drawer a:hover { color: var(--fbv-link); }

/* ---------- Footer ---------- */
.fbv-footer {
  background: var(--fbv-surface);
  border-top: 1px solid var(--fbv-line);
  padding: clamp(3.5rem, 5vw, 5rem) 0 2rem;
  margin-top: 4rem;
  clear: both;
}
.fbv-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 3.5rem;
}
.fbv-footer-brand p {
  font-size: 0.88rem;
  color: var(--fbv-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0.8rem 0 1.2rem;
}
.fbv-footer-col h4 {
  font-family: var(--fbv-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.1rem;
  color: var(--fbv-ink);
}
.fbv-footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.fbv-footer-col a { font-size: 0.88rem; color: var(--fbv-ink-soft); display: inline-block; }
.fbv-footer-col a:hover { color: var(--fbv-link); transform: translateX(2px); }

.fbv-disclosure {
  background: var(--fbv-bg-alt);
  border: 1px solid var(--fbv-line);
  border-radius: var(--fbv-r-md);
  padding: 1.25rem 1.6rem;
  font-size: 0.82rem;
  color: var(--fbv-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}
.fbv-disclosure strong { color: var(--fbv-ink); }

.fbv-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 1.8rem;
  border-top: 1px solid var(--fbv-line);
  font-size: 0.84rem;
  color: var(--fbv-muted);
}
.fbv-footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.fbv-footer-legal a { color: var(--fbv-muted); }
.fbv-footer-legal a:hover { color: var(--fbv-link); }

/* ---------- Back to top ---------- */
.fbv-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--fbv-surface);
  border: 1px solid var(--fbv-line);
  color: var(--fbv-ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--fbv-shadow-md);
  z-index: 99980;
  transition: all 0.2s ease;
}
.fbv-top-btn:hover {
  background: var(--fbv-accent);
  color: #FFFFFF;
  border-color: var(--fbv-accent);
  transform: translateY(-3px);
}
.fbv-top-btn.visible { display: flex; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .fbv-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .fbv-footer-brand { grid-column: 1 / -1; }
  .fbv-nav { display: none; }
  #fbv-burger { display: inline-flex; }
}
@media (max-width: 768px) {
  .fbv-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fbv-root * { transition: none !important; }
}
