/* ============================================================================
 * BlueBay Brokers — public.css
 * Composants du site public : nav, tiroir mobile, heros, survols photo.
 * Reprend l'integralite de l'ancien /bbb.css, SANS son bloc :root — les
 * variables vivent desormais dans tokens.css, et lui seul.
 *
 * Ordre impose dans le <head>, AVANT tout <style> :
 *     <link rel="stylesheet" href="/css/tokens.css?v=1">
 *     <link rel="stylesheet" href="/css/public.css?v=1">
 * Deux <link>, pas de @import : deux requetes en serie retardent le rendu.
 *
 * L'ancien bbb.css portait un :root qui « refletait » celui des pages. Le
 * reflet arrivait AVANT le <style> inline, donc il perdait la cascade a tous
 * les coups : modifier bbb.css n'avait aucun effet visible. Le CSS partage
 * etait decoratif. C'est ce que ce decoupage corrige.
 * ==========================================================================*/

/* ============================================================
 * BlueBay Brokers — shared stylesheet
 * Loaded from every public page via <link rel="stylesheet" href="/bbb.css">
 * before each page's inline <style>, so page-specific rules can still
 * override these defaults via specificity / cascade order.
 *
 * Page-specific layouts (hero variants, building-card grids, simulator
 * forms, etc.) stay in each file's <style> block.
 * ============================================================ */


/* ---- Two-funnel nav buttons (Buy = gold / Manage = teal) ---- */
.nav-cta-pair { display: flex; gap: 8px; }
.nav-btn {
  padding: 9px 18px;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity .2s;
  border: 0;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.nav-btn-buy,
.nav-btn-invest { background: var(--gold); color: var(--navy); }
.nav-btn-buy:hover,
.nav-btn-invest:hover { opacity: .85; }
.nav-btn-manage { background: var(--teal); color: #fff; }
.nav-btn-manage:hover { opacity: .85; }
/* Book points off-site to the guest sub-domain — visually
 * distinct (outline navy) to read as "leaves the broker hub". */
.nav-btn-book {
  background: transparent;
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.35);
}
.nav-btn-book:hover { color: #fff; border-color: var(--gold); }
.nav-btn.active { outline: 2px solid rgba(255,255,255,.25); outline-offset: 1px; }
.nav-drawer ul li a.teal { color: var(--teal2); }
.nav-drawer ul li a.book { color: rgba(255,255,255,.85); }
@media (max-width: 900px) { .nav-cta-pair { display: none; } }

/* ---- Logo link chrome — applies to the injected bar on every page ----
 * public-nav.js renders the logo as <a class="nav-logo">, where the old
 * hand-written bars used a plain <div>. On the 27 pages that never set
 * text-decoration on it, the UA default took over: underlined, link-blue,
 * purple once visited, red while the mouse is held down.
 *
 * Scoped to #mainNav deliberately, against the rule stated for the
 * nav-default block below: this has to outrank a page's own
 * `.nav-logo { … }`, and no page has ever wanted an underlined logo.
 * It resets link chrome only — no layout, no colour of its own — so it
 * cannot fight a page's bar the way an id-scoped layout rule would.
 * The .brand / .sub spans keep supplying the actual colours. */
#mainNav .nav-logo,
#mainNav .nav-logo:link,
#mainNav .nav-logo:visited,
#mainNav .nav-logo:hover,
#mainNav .nav-logo:focus,
#mainNav .nav-logo:active {
  text-decoration: none;
  color: inherit;
}

/* ---- Default nav chrome, for pages that style no nav of their own ----
 * Opt-in via class="nav-default" on the <nav>. It is NOT applied to
 * #mainNav globally on purpose: the thirteen pages that already style
 * their bar do so with the bare `nav { … }` element selector, which an
 * id selector here would silently outrank. A class nobody else uses
 * cannot collide with them.
 *
 * Everything below is a plain default; a page that wants a taller bar or
 * a different background just declares it in its own <style>, which the
 * cascade puts after this file. */
nav.nav-default {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 6vw;
  min-height: 72px;
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: 'DM Sans', system-ui, sans-serif;
}
nav.nav-default .nav-logo {
  display: flex; flex-direction: column; line-height: 1;
  text-decoration: none; margin-right: auto;
}
nav.nav-default .nav-logo .brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem; color: var(--gold); letter-spacing: .04em;
}
nav.nav-default .nav-logo .sub {
  font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-top: 3px;
}
nav.nav-default .nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 40px; height: 40px; padding: 4px;
  background: none; border: 0; cursor: pointer;
}
nav.nav-default .nav-hamburger span {
  display: block; height: 1.5px; background: var(--gold);
  transition: transform .35s, opacity .35s, width .35s;
}
nav.nav-default .nav-hamburger span:nth-child(3) { width: 60%; }
@media (max-width: 900px) {
  nav.nav-default { min-height: 62px; padding: 0 5vw; }
  nav.nav-default .nav-logo .sub { display: none; }
  nav.nav-default .nav-hamburger { display: flex; }
}
/* The drawer is shared markup, so its default lives here too. Pages that
 * already ship drawer CSS keep theirs — again by cascade order, since
 * these are class selectors of the same weight declared earlier. */
.nav-drawer.nav-drawer-default {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(7,14,26,.985);
  flex-direction: column; justify-content: center; align-items: center;
  padding: 2rem;
}
.nav-drawer.nav-drawer-default ul {
  list-style: none; text-align: center; width: 100%;
  max-width: 520px; margin: 0; padding: 0;
}
.nav-drawer.nav-drawer-default ul li {
  border-bottom: 1px solid rgba(201,169,110,.12);
}
.nav-drawer.nav-drawer-default ul li:first-child {
  border-top: 1px solid rgba(201,169,110,.12);
}
.nav-drawer.nav-drawer-default ul li a {
  display: block; padding: 1.1rem 0; text-decoration: none;
  font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
}
.nav-drawer.nav-drawer-default ul li a.gold { color: var(--gold); }

/* ---- Three-branch nav: dropdown under Invest / Manage -------
 * The three buttons above are the whole menu. Each one that has
 * children opens a single flat panel on hover — one level deep,
 * never two, so nothing is reachable only by keeping a cursor
 * steady across a diagonal.
 *
 * Built by public-nav.js. Book has no panel on purpose: it leaves
 * for the guest sub-domain and should read as an exit. */
.nav-branch { position: relative; }
.nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 290px;
  padding: 10px;
  background: var(--white);
  border-radius: var(--rl);
  box-shadow: var(--shh);
  z-index: 120;
}
/* Bridges the 8px gap so the panel survives the cursor crossing it. */
.nav-branch::after {
  content: '';
  position: absolute;
  top: 100%; left: 0; right: 0; height: 10px;
}
.nav-branch:hover .nav-sub,
.nav-branch:focus-within .nav-sub { display: block; }
.nav-sub-blurb {
  display: block;
  padding: 4px 12px 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text3);
}
.nav-sub-item {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background .18s;
}
.nav-sub-item:hover { background: var(--off); }
.nav-sub-item.on { background: var(--off2); }
.nav-sub-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.nav-sub-hint {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text3);
}
/* Sub-entries in the mobile drawer read as children of the branch
 * above them, without a second tap to reveal them. */
.nav-drawer ul li.drawer-sub a {
  padding: .7rem 0;
  font-size: .82rem;
  letter-spacing: .1em;
  color: rgba(255,255,255,.6);
}

/* ---- Homepage hero split (Buy / Manage cards) --------------- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 880px;
  margin-top: 1.5rem;
}
@media (max-width: 768px) { .hero-split { grid-template-columns: 1fr; } }
.hero-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.5rem 1.7rem;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  transition: transform .25s, background .25s, border-color .25s;
  color: #fff;
}
.hero-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.hero-card-buy { border-left: 3px solid var(--gold); }
.hero-card-buy:hover { border-color: var(--gold); }
.hero-card-manage { border-left: 3px solid var(--teal); }
.hero-card-manage:hover { border-color: var(--teal2); }
.hero-card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.hero-card-buy .hero-card-label { color: var(--gold2); }
.hero-card-manage .hero-card-label { color: var(--teal2); }
.hero-card-h {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.15;
}
.hero-card-h strong { font-weight: 600; }
.hero-card-buy .hero-card-h strong { color: var(--gold2); }
.hero-card-manage .hero-card-h strong { color: var(--teal2); }
.hero-card-sub { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.55; }
.hero-card-cta {
  margin-top: .35rem;
  font-size: 12px;
  letter-spacing: .06em;
  font-weight: 500;
}
.hero-card-buy .hero-card-cta { color: var(--gold2); }
.hero-card-manage .hero-card-cta { color: var(--teal2); }

/* ---- Photo hover reveal across the site --------------------- *
 * Applies to any card-style container with box-shadow whose child
 * <img> has the brand grayscale inline filter. On hover, the photo
 * pops to a warm, slightly desaturated look + a subtle zoom. */
img[style*="grayscale(100%)"] {
  transition: filter .4s, transform .4s !important;
}
div[style*="box-shadow"]:hover img[style*="grayscale(100%)"] {
  filter: grayscale(40%) sepia(15%) !important;
  transform: scale(1.04);
}
