/* ============================================================================
   FOREFITTER — global suite bar (shared across the hub, Ball Lab, Shaft Lab)

   One consistent brand + cross-navigation strip on every site. Self-contained
   and theme-aware via :root[data-theme] so it matches whichever theme is active
   (theme choice is shared across all three — same origin, same localStorage).

   Served at /shared/forefitter-bar.css. The markup is mirrored inline in each
   site (hub index.html, shaftology index.html, golf-ball-selector layout.tsx);
   only the `data-ff-active` value differs. Keep the three copies in sync.
   ========================================================================== */

.ff-bar {
  --ff-h: 48px;
  --ff-bg: #0b0f0d;
  --ff-line: rgba(216, 255, 62, 0.14);
  --ff-ink: #eaf0ea;
  --ff-dim: #8b9a90;
  --ff-volt: #d8ff3e;
  --ff-active: rgba(216, 255, 62, 0.12);

  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--ff-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(14px, 4vw, 32px);
  background: var(--ff-bg);
  border-bottom: 1px solid var(--ff-line);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] .ff-bar {
  --ff-bg: #ffffff;
  --ff-line: rgba(80, 118, 12, 0.20);
  --ff-ink: #171c12;
  --ff-dim: #5c6553;
  --ff-volt: #5f8a00;
  --ff-active: rgba(95, 138, 0, 0.12);
}
.ff-bar * { box-sizing: border-box; }

/* ---- brand → hub ---- */
.ff-bar__brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.ff-bar__mark { display: block; }
.ff-bar__mark .ff-ring { fill: none; stroke: var(--ff-line); stroke-width: 1.4; }
.ff-bar__mark .ff-pole { stroke: var(--ff-dim); stroke-width: 1.5; stroke-linecap: round; }
.ff-bar__mark .ff-flag { fill: var(--ff-volt); }
.ff-bar__mark .ff-ball { fill: var(--ff-ink); }
.ff-bar__word {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.02rem;
  letter-spacing: -0.01em; color: var(--ff-ink); line-height: 1;
}
.ff-bar__word b { font-weight: 600; color: var(--ff-volt); }

/* ---- app switcher (the cross-navigation) ---- */
.ff-bar__switch {
  display: flex; align-items: center; gap: 3px;
  margin: 0 auto 0 4px; padding: 3px;
  border: 1px solid var(--ff-line); border-radius: 999px;
}
.ff-bar__switch a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ff-dim); text-decoration: none; white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}
.ff-bar__switch a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.4; flex: none; transition: opacity 0.18s, box-shadow 0.18s;
}
.ff-bar__switch a:hover { color: var(--ff-ink); }

/* active tab — driven by data-ff-active on the container */
.ff-bar[data-ff-active="overview"] a[data-ff="overview"],
.ff-bar[data-ff-active="ball"]     a[data-ff="ball"],
.ff-bar[data-ff-active="shaft"]    a[data-ff="shaft"] {
  color: var(--ff-volt); background: var(--ff-active);
}
.ff-bar[data-ff-active="overview"] a[data-ff="overview"]::before,
.ff-bar[data-ff-active="ball"]     a[data-ff="ball"]::before,
.ff-bar[data-ff-active="shaft"]    a[data-ff="shaft"]::before {
  opacity: 1; box-shadow: 0 0 8px var(--ff-volt);
}

/* ---- theme toggle ---- */
.ff-bar__theme {
  margin-left: auto; flex: none;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--ff-line); border-radius: 999px; background: transparent;
  color: var(--ff-dim); cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.ff-bar__theme:hover { color: var(--ff-volt); border-color: var(--ff-volt); transform: rotate(-18deg); }
.ff-bar__theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ff-bar__theme .ff-moon { fill: currentColor; stroke: none; }
:root[data-theme="dark"]  .ff-bar__theme .ff-sun  { display: none; }
:root[data-theme="light"] .ff-bar__theme .ff-moon { display: none; }

/* ---- responsive ---- */
@media (max-width: 620px) {
  .ff-bar { gap: 10px; padding: 0 12px; }
  .ff-bar__word { display: none; }
  .ff-bar__switch { margin-left: 0; gap: 2px; padding: 2px; }
  .ff-bar__switch a { padding: 6px 10px; font-size: 0.64rem; letter-spacing: 0.02em; gap: 5px; }
  .ff-bar__switch a::before { width: 5px; height: 5px; }
}
@media (max-width: 380px) {
  .ff-bar__switch a::before { display: none; }
  .ff-bar__switch a { padding: 6px 8px; }
}
