/* ===========================================================
   BASR — shared site banner (top bar + mobile drawer)
   SINGLE SOURCE OF TRUTH for the header on every page.
   Loaded by both the home page and all inner pages so the
   ribbon never drifts. Pairs with header.js (markup + behaviour).
   =========================================================== */

:root{
  --tb-h: 64px;
  --arabic: "Amiri", Georgia, serif;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--tb-h);
  z-index: 100; display: flex; align-items: center;
  transition: background .5s ease, box-shadow .5s ease;
}
.topbar.scrolled {
  background: rgba(33, 26, 17, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-dark-gold);
}
.topbar .wrap { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); width: 100%; }

/* ---------- brand lockup (English mark + Arabic glyph, one line) ---------- */
.tb-brand { display: flex; flex-direction: column; gap: 5px; flex: none; }
.tb-en { align-items: flex-start; }
.tb-ar { align-items: flex-end; text-align: right; }
.lockup { display: flex; align-items: center; gap: 9px; }
.tb-logo { height: 22px; width: auto; display: block; }
.tb-brand .mark {
  font-family: var(--sans); font-weight: 600; font-size: 19px;
  letter-spacing: 0.30em; color: var(--cream); line-height: 1; padding-left: 2px;
}
.tb-brand .sub {
  font-family: var(--sans); font-weight: 400; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-softer);
  line-height: 1; display: block;
}
.tb-brand .sub .amp { color: var(--gold); }
.tb-ar:hover .tb-logo { opacity: .82; }
.tb-ar .tb-logo { transition: opacity .3s ease; }

/* ---------- primary nav — rounded pill buttons ---------- */
.tb-nav { display: none; align-items: center; justify-content: center; gap: clamp(7px, 0.9vw, 13px); }
@media (min-width: 900px){ .tb-nav { display: flex; flex: 1 1 auto; } }
.tb-nav a {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cream-soft);
  border: 1px solid var(--line-dark-gold); border-radius: 999px;
  padding: 8px 15px; white-space: nowrap;
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.tb-nav a:hover { color: var(--espresso-deep); background: var(--gold); border-color: var(--gold); }
.tb-nav a.active { color: var(--espresso-deep); background: var(--gold); border-color: var(--gold); }

/* Arabic translation pill (sits beside Let’s Talk) */
.tb-translate {
  display: inline-flex; align-items: center;
  font-family: var(--arabic); font-size: 15px; line-height: 1;
  color: var(--gold-light);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: 6px 16px; white-space: nowrap;
  transition: color .3s ease, background .3s ease;
}
.tb-translate:hover { color: var(--espresso-deep); background: var(--gold); }

.tb-actions { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); flex: none; }

/* ---------- mobile menu toggle ---------- */
.tb-menu {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px; margin-right: -8px;
}
@media (min-width: 900px){ .tb-menu { display: none; } }
.tb-menu span { width: 24px; height: 1.5px; background: var(--cream); transition: transform .35s ease, opacity .3s ease; }
body.menu-open .tb-menu span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
body.menu-open .tb-menu span:nth-child(2){ opacity: 0; }
body.menu-open .tb-menu span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: var(--espresso-deep);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
body.menu-open .drawer { opacity: 1; pointer-events: auto; }
.drawer a { font-family: var(--display); font-size: clamp(28px, 6vw, 38px); color: var(--cream); padding: 9px 0; }
.drawer a .i { font-family: var(--sans); font-size: 12px; color: var(--gold); letter-spacing: .18em; margin-right: 14px; }
.drawer a:hover { color: var(--gold-light); }
.drawer a.active { color: var(--gold-light); }
.dr-translate { font-family: var(--arabic) !important; color: var(--gold-light) !important; }
.dr-translate .ar { font-family: var(--arabic); }
