/* ============================================================
   Fortera Nova — shared site enhancements
   Rich dropdown navigation · partner gate · video media bands
   Loaded on every page in addition to the page's own styles.
   ============================================================ */

/* ---------- Rich dropdown navigation ---------- */
.nav-group{position:relative;display:flex;align-items:center;}
.nav-group > .nav-top{
  background:none;border:0;padding:0;cursor:pointer;
  font-family:'Inter',sans-serif;font-size:.8rem;letter-spacing:.04em;
  color:var(--cream);opacity:.85;transition:opacity .2s ease;
  display:inline-flex;align-items:center;gap:6px;
}
.nav-group > .nav-top:hover,
.nav-group.open > .nav-top{opacity:1;}
.nav-group > .nav-top .caret{transition:transform .25s ease;}
.nav-group.open > .nav-top .caret{transform:rotate(180deg);}

.nav-panel{
  position:absolute;top:calc(100% + 16px);left:50%;
  transform:translateX(-50%) translateY(8px);
  min-width:264px;
  background:rgba(11,24,48,.97);
  backdrop-filter:blur(16px) saturate(1.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.2);
  border:1px solid rgba(198,154,99,.20);
  box-shadow:0 30px 70px rgba(5,12,26,.5);
  padding:10px;
  display:flex;flex-direction:column;gap:2px;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .22s ease, transform .22s ease, visibility .22s;
  z-index:200;
}
/* hover-bridge so the gap between trigger and panel doesn't close it */
.nav-panel::before{content:"";position:absolute;top:-18px;left:0;right:0;height:18px;}
.nav-group:hover .nav-panel,
.nav-group:focus-within .nav-panel,
.nav-group.open .nav-panel{
  opacity:1;visibility:visible;pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}
.nav-panel a{
  display:flex;flex-direction:column;gap:3px;
  padding:11px 15px;border-radius:2px;
  transition:background .2s ease;
}
.nav-panel a:hover{background:rgba(198,154,99,.10);}
.nav-panel a .np-t{font-size:.86rem;color:#fff;display:flex;align-items:center;gap:8px;}
.nav-panel a .np-d{font-size:.68rem;line-height:1.4;color:rgba(255,255,255,.5);letter-spacing:.01em;}
.nav-panel a .np-lock{
  font-size:.54rem;text-transform:uppercase;letter-spacing:.12em;
  color:var(--gold-dim);border:1px solid rgba(198,154,99,.35);
  padding:1px 6px;border-radius:2px;
}
.nav-panel .np-head{
  padding:6px 15px 8px;font-size:.6rem;text-transform:uppercase;
  letter-spacing:.16em;color:var(--gold-dim);
  border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:4px;
}

@media (max-width:960px){
  .nav-group{width:100%;flex-direction:column;align-items:flex-start;}
  .nav-group > .nav-top{width:100%;justify-content:space-between;font-size:.92rem;padding:6px 0;}
  .nav-panel{
    position:static;transform:none;opacity:1;visibility:visible;pointer-events:auto;
    background:none;border:0;box-shadow:none;backdrop-filter:none;
    min-width:0;width:100%;padding:2px 0 8px 12px;
    max-height:0;overflow:hidden;transition:max-height .3s ease;
  }
  .nav-panel::before{display:none;}
  /* The open/hover state above sets transform:translateX(-50%) to centre the DESKTOP dropdown.
     Media queries add no specificity, so `.nav-group.open .nav-panel` (0,3,0) beat the mobile
     reset `.nav-panel{transform:none}` (0,1,0) and the submenu was dragged 108px left — 76px
     outside the 280px drawer, over the page. Re-state the reset at matching specificity. */
  .nav-group.open .nav-panel,
  .nav-group:hover .nav-panel,
  .nav-group:focus-within .nav-panel{transform:none;}
  .nav-group:not(.open) .nav-panel{max-height:0;}
  .nav-group.open .nav-panel{max-height:600px;transform:none;}
  .nav-panel a{padding:8px 6px;}
  .nav-panel a .np-d{display:none;}
}

/* ---------- Video media bands (imagery filler) ---------- */
.media-band{
  position:relative;min-height:74vh;display:flex;align-items:flex-end;
  overflow:hidden;background:#0b1830;color:#fff;isolation:isolate;
}
.media-band video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;
}
.media-band .veil{
  position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg,rgba(11,24,48,.30) 0%,rgba(11,24,48,.55) 55%,rgba(11,24,48,.90) 100%);
}
.media-band .wrap{position:relative;z-index:2;padding:0 32px 74px;}
.media-band .eyebrow{color:var(--gold-light);}
.media-band h2{
  font-family:'Poppins',sans-serif;font-weight:300;color:#fff;
  font-size:clamp(1.6rem,3.4vw,2.7rem);line-height:1.2;max-width:820px;margin-top:16px;
}
.media-band .credit{margin-top:20px;font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.42);}
@media (max-width:768px){ .media-band{min-height:60vh;} .media-band .wrap{padding-bottom:48px;} }

/* small inline video tile for use inside grids */
.media-tile{position:relative;overflow:hidden;background:#0b1830;aspect-ratio:16/9;border:1px solid var(--navy-line);}
.media-tile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}

/* ---------- Partner gate ---------- */
body.fn-locked{overflow:hidden;}
.fn-gate{
  position:fixed;inset:0;z-index:10000;
  /* W-5: expanding 'Request access' grows the card to ~863px. The overlay was
     centred with no scroll and body scrolling is locked, so the submit button and
     back link were unreachable on every phone. Scroll within the overlay and
     top-align once the content is tall. */
  overflow-y:auto;overscroll-behavior:contain;
  background:radial-gradient(120% 100% at 50% 0%, #122748 0%, #0b1830 60%);
  color:#fff;display:flex;align-items:flex-start;justify-content:center;padding:26px;
  animation:fnFade .5s ease both;
}
@keyframes fnFade{from{opacity:0}to{opacity:1}}
.fn-gate-card{max-width:480px;width:100%;text-align:center;margin:auto;}
.fn-gate-card .mark{justify-content:center;margin-bottom:26px;}
.fn-gate .eyebrow{color:var(--gold-dim);display:block;}
.fn-gate h2{font-family:'Poppins',sans-serif;font-weight:300;font-size:1.9rem;margin:12px 0 14px;color:#fff;}
.fn-gate p.sub{color:rgba(255,255,255,.62);font-size:.95rem;line-height:1.6;margin:0 auto 26px;max-width:400px;}
.fn-code{display:flex;gap:10px;}
.fn-code input{
  flex:1;background:rgba(255,255,255,.06);border:1px solid rgba(198,154,99,.32);
  color:#fff;padding:14px 16px;font-size:.9rem;letter-spacing:.18em;text-transform:uppercase;
}
.fn-code input:focus{outline:2px solid var(--gold);outline-offset:2px;}
.fn-err{color:#e9a98c;font-size:.8rem;min-height:1.3em;margin-top:12px;text-align:left;}
.fn-alt{margin-top:26px;padding-top:22px;border-top:1px solid rgba(255,255,255,.10);}
.fn-alt button.link{
  background:none;border:0;color:var(--gold-light);cursor:pointer;
  font-family:'Inter',sans-serif;font-size:.82rem;letter-spacing:.03em;text-decoration:underline;text-underline-offset:3px;
  /* Both gate text links measured 18px tall against the site's 44px touch
     minimum (drawer rows fixed to 44px in 71c1c7e; the overlay is touch-first).
     inline-flex keeps 'Request access' inline after its lead-in span, and
     keeps the back link's text centred like the UA button default it replaces. */
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:0 10px;
}
.fn-req{display:none;flex-direction:column;gap:12px;margin-top:20px;text-align:left;}
.fn-req.show{display:flex;animation:fnFade .35s ease both;}
.fn-req label{font-size:.66rem;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.55);margin-bottom:-6px;}
.fn-req input,.fn-req textarea{
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.16);
  color:#fff;padding:12px 14px;font-family:'Inter',sans-serif;font-size:.9rem;width:100%;
  min-height:44px; /* measured 43px — same 44px-minimum class as the text links */
}
.fn-req textarea{min-height:78px;resize:vertical;}
.fn-back{margin-top:16px;}
.fn-gate .btn{
  width:100%;justify-content:center;text-align:center;
  min-height:44px; /* 'Submit request' measured 42px natural height — same class;
                      'Enter' already sits at 46px via the flex row's stretch */
  align-items:center;display:inline-flex;
}
.fn-note{margin-top:18px;font-size:.66rem;color:rgba(255,255,255,.38);line-height:1.5;}

/* ============================================================
   MOBILE UX FIXES — 7 Aug 2026, from the design gauntlet.
   site.css loads last on every page, so these override both the
   inline <style> blocks (7 pages) and fortera.css (5 pages).
   ============================================================ */
@media (max-width:960px){

  /* W-1: the drawer was height:100vh with overflow-y:visible, so once its
     content exceeded the viewport the Log In link and the Enquire CTA sat
     below the fold with no way to reach them — on an iPhone SE, and on every
     phone in landscape. 100dvh also stops iOS's URL bar stealing the space. */
  nav.main-nav{
    height:100dvh;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    box-shadow:none;                 /* W-3: the closed drawer's shadow bled a
                                        ~40px dark band down every page edge */
  }
  nav.main-nav.open{box-shadow:-10px 0 30px rgba(0,0,0,.3);}

  /* W-2: the open drawer painted over the hamburger and swallowed its taps —
     the only close affordance became a dead zone. */
  .nav-toggle{
    position:relative; z-index:2;
    min-width:44px; min-height:44px;
    align-items:center; justify-content:center;
  }

  /* W-4: every row in the drawer was 16–39px tall against a 44px minimum. */
  .nav-group > .nav-top{min-height:44px; display:flex; align-items:center;}
  .nav-panel a{min-height:44px; display:flex; flex-direction:column; justify-content:center;}
  nav.main-nav a.nav-link{min-height:44px; display:flex; align-items:center;}
  /* W-4 sibling (found 9 Aug re-measure): the drawer's Enquire CTA is an a.btn,
     which the three rules above miss — it measured 28px tall. */
  nav.main-nav a.btn{min-height:44px; display:inline-flex; align-items:center; justify-content:center;}
}

/* fund.html "One house, two mandates": the grid was declared in an inline
   style attribute, which no media query can override, so it never collapsed —
   410px of content in a 331px column at every mobile width. The inline rule is
   kept for desktop; !important is the only way to beat an inline declaration. */
@media (max-width:760px){
  .mandate-grid{grid-template-columns:1fr !important;}
  .mandate-grid > *{min-width:0;}
}
