/* FirmForge shared site chrome: one header, one language picker, one page
   backdrop, used by every marketing page. Framework-independent on purpose:
   some pages run Tailwind, the paper pages run their own hand-written CSS,
   and this file must render identically on both. */

.ffnav, .ffnav * { box-sizing: border-box; }

.ffnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  font-family: 'Inter', system-ui, sans-serif;
}
.ffnav-in {
  max-width: 1152px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ffnav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.ffnav-logo img { width: 34px; height: 34px; display: block; }
.ffnav-word { font-family: 'Hanken Grotesk', 'Inter', sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: #0f172a; }
.ffnav-word b { font-weight: 800; color: #3b6ef8; }

.ffnav-links { display: none; align-items: center; gap: 26px; font-size: 14px; }
.ffnav-links > a, .ffnav-dd-btn {
  color: #475569; text-decoration: none; background: none; border: none; padding: 0;
  font-family: inherit; font-size: 14px; cursor: pointer; transition: color 0.15s;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.ffnav-links > a:hover, .ffnav-dd:hover .ffnav-dd-btn { color: #0f172a; }
.ffnav-dd { position: relative; padding: 10px 0; margin: -10px 0; }
.ffnav-dd-btn svg { width: 13px; height: 13px; transition: transform 0.15s; }
.ffnav-dd:hover .ffnav-dd-btn svg { transform: rotate(180deg); }
.ffnav-dd-menu {
  display: none; position: absolute; inset-inline-start: 0; top: 100%; padding-top: 8px; min-width: 216px; z-index: 60;
}
.ffnav-dd:hover .ffnav-dd-menu, .ffnav-dd.open .ffnav-dd-menu { display: block; }
.ffnav-dd-card {
  background: #fff; border: 1px solid rgba(15,23,42,0.1); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.12); padding: 8px; overflow: hidden;
}
.ffnav-dd-card a {
  display: block; padding: 9px 14px; border-radius: 8px; font-size: 13.5px;
  color: #475569; text-decoration: none; white-space: nowrap;
}
.ffnav-dd-card a:hover { color: #0f172a; background: #f1f5f9; }

.ffnav-cta { display: flex; align-items: center; gap: 10px; }
.ffnav-signin { display: none; font-size: 14px; color: #475569; text-decoration: none; transition: color 0.15s; white-space: nowrap; }
.ffnav-signin:hover { color: #0f172a; }
.ffnav-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 8px;
  color: #fff; text-decoration: none; transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ffnav-btn-demo { display: none; background: #10b981; box-shadow: 0 8px 24px -6px rgba(16,185,129,0.45); }
.ffnav-btn-demo:hover { background: #059669; box-shadow: 0 10px 30px -6px rgba(16,185,129,0.55); transform: translateY(-1px); }
.ffnav-btn-primary { background: #3b6ef8; box-shadow: 0 8px 24px -6px rgba(59,110,248,0.45); font-size: 13px; padding: 8px 12px; }
.ffnav-btn-primary:hover { background: #2563eb; box-shadow: 0 10px 30px -6px rgba(59,110,248,0.55); transform: translateY(-1px); }

.ffnav-burger { display: inline-flex; background: none; border: none; padding: 8px; cursor: pointer; color: #475569; }
.ffnav-burger:hover { color: #0f172a; }
.ffnav-burger svg { width: 20px; height: 20px; }

/* The language picker: same classes and ids on every page. index.html renders
   it with its own inline i18next engine; every other page gets it from
   collateral-i18n.js. Both output identical markup into these styles. */
.lang-picker { position: relative; display: none; }
.lang-btn {
  display: flex; align-items: center; gap: 5px; background: #fff;
  border: 1px solid rgba(15,23,42,0.08); border-radius: 7px; padding: 5px 10px;
  cursor: pointer; font-size: 12px; color: #475569; font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.lang-btn:hover { border-color: rgba(59,110,248,0.4); color: #0f172a; }
.lang-dropdown {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: #fff;
  border: 1px solid rgba(15,23,42,0.08); border-radius: 10px; padding: 6px;
  min-width: 148px; max-height: 60vh; overflow-y: auto; z-index: 999;
  box-shadow: 0 12px 32px rgba(15,23,42,0.14);
}
.lang-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px;
  cursor: pointer; font-size: 12px; color: #475569; transition: all 0.1s;
}
.lang-item:hover, .lang-item.active { background: rgba(59,110,248,0.1); color: #0f172a; }

/* Mobile panel */
#mobile-menu { display: none; border-top: 1px solid rgba(15,23,42,0.06); background: rgba(255,255,255,0.97); }
#mobile-menu.open { display: block; }
.ffnav-mob { padding: 14px 24px 20px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 64px); overflow-y: auto; }
.ffnav-mob a { display: block; padding: 9px 2px; font-size: 14px; color: #475569; text-decoration: none; }
.ffnav-mob a:hover { color: #0f172a; }
.ffnav-mob-group { margin-top: 10px; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.ffnav-mob .ffnav-btn { margin-top: 12px; }
.ffnav-mob .ffnav-btn-demo, .ffnav-mob .lang-picker { display: inline-flex; }
.ffnav-mob .lang-picker { margin-top: 12px; align-self: flex-start; }
#lang-picker-mobile .lang-dropdown { top: auto; bottom: calc(100% + 6px); inset-inline-end: auto; inset-inline-start: 0; }

@media (min-width: 1024px) {
  .ffnav-links { display: flex; }
  .ffnav-signin { display: inline; }
  .ffnav-btn-demo { display: inline-flex; }
  .ffnav-btn-primary { font-size: 14px; padding: 8px 16px; }
  .ffnav-cta .lang-picker { display: inline-block; }
  .ffnav-burger { display: none; }
  #mobile-menu { display: none !important; }
}

/* Page backdrop: a quiet architectural photo washed nearly to white plus two
   soft brand tints, fixed behind everything. Pages opt in via ff-canvas on
   body; sections with their own solid backgrounds simply cover it. */
body.ff-canvas { position: relative; }
body.ff-canvas::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: url('/collateral-bg.jpg');
  background-size: cover; background-position: center top;
  opacity: 0.06;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, rgba(0,0,0,0.55) 40%, transparent 78%);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0,0,0,0.55) 40%, transparent 78%);
}
body.ff-canvas::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 8% -10%, rgba(59,110,248,0.055), transparent 62%),
    radial-gradient(860px 520px at 94% 4%, rgba(16,185,129,0.04), transparent 60%);
}

/* Shared site footer, stamped into every marketing page by stamp-footer.py.
   Plain CSS for the same reason as the header: the paper pages have no Tailwind. */
.fffoot {
  background: #fff; border-top: 1px solid rgba(15,23,42,0.1);
  padding: 48px 24px 32px; font-family: 'Inter', system-ui, sans-serif; margin-top: 0;
}
.fffoot-in { max-width: 1152px; margin: 0 auto; }
.fffoot-top {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
}
.fffoot-brand { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.fffoot-word {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-family: 'Hanken Grotesk', 'Inter', sans-serif; font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; color: #0f172a;
}
.fffoot-word img { width: 28px; height: 28px; display: block; }
.fffoot-word b { color: #3b6ef8; font-weight: 800; }
.fffoot-social { display: flex; align-items: center; gap: 12px; }
.fffoot-social a { color: #94a3b8; transition: color 0.15s; display: inline-flex; }
.fffoot-social a:hover { color: #475569; }
.fffoot-social svg { width: 16px; height: 16px; fill: currentColor; }
.fffoot-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px 28px; font-size: 14px;
}
.fffoot-links a { color: #64748b; text-decoration: none; transition: color 0.15s; }
.fffoot-links a:hover { color: #1e293b; }
.fffoot-bottom {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 24px; border-top: 1px solid #e2e8f0;
  font-size: 12px; color: #94a3b8;
}
.fffoot-bottom p { margin: 0; }
.fffoot-legal { display: flex; align-items: center; gap: 24px; }
.fffoot-legal a { color: #94a3b8; text-decoration: none; transition: color 0.15s; }
.fffoot-legal a:hover { color: #475569; }
@media (min-width: 768px) {
  .fffoot-top { flex-direction: row; }
  .fffoot-bottom { flex-direction: row; }
}
