/* Trybe Assessments, ecosystem navbar.
 * VERBATIM port of the canonical bar in trybe-unified-site/src/styles/global.css
 * at main commit 8f46821 (18 Aug 2026), the one live on www.trybeinc.com.
 * The first port (16 Aug) was taken from a stale branch and froze the OLD bar:
 * 14.5px chips, dark plate .34, brightness .5. Sheldon then ruled 17 Aug that
 * nav type is 11.5px on every property ("match it across the board") and the
 * bar was lightened 18 Aug (plate .14, brightness .82, saturate 1.8). Sheldon
 * caught the drift from screenshots the same day. THIS FILE MUST TRACK MAIN:
 * if the unified bar changes, re-port it, do not re-tune it here.
 * No palette adaptation any more, values are identical on purpose.
 *
 * Load AFTER assessment.css and theme-trybe.css.
 */

:root { --nav-h: 85px; --nav-ease: cubic-bezier(.22, .9, .3, 1); }
@media (max-width: 640px) { :root { --nav-h: 67px; } }

/* Anchors land fully below the fixed strip, and the page starts below it. */
html { scroll-padding-top: var(--nav-h); }
body.has-nav { padding-top: var(--nav-h); }

.nav-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  /* Lightened glass, 18 Aug 2026: saturation makes the colour behind the bar
     read, brightness only tames the brightest content. Contrast re-measured on
     the unified site at these exact values; do not lighten further there
     without re-measuring, and do not diverge here. */
  background:
    linear-gradient(145deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%),
    var(--nav-strip-bg, rgba(11, 11, 13, .14));
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(.82);
  backdrop-filter: blur(24px) saturate(1.8) brightness(.82);
  border-bottom: 1px solid rgba(0, 178, 169, .4);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.7), 0 10px 20px -5px rgba(0,178,169,.15);
  pointer-events: none;
  font-family: var(--font-head, 'Poppins', system-ui, sans-serif);
}
.nav-bar > * { pointer-events: auto; }

.nav-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 18px; max-width: 1760px; margin: 0 auto; padding: 10px 26px; min-height: 84px;
}

.nav-brand { justify-self: start; display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.nav-name {
  font-weight: 900; font-size: 20px; letter-spacing: .155em; text-transform: uppercase;
  color: #fff; white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 4px 18px rgba(0,0,0,.6);
}
.nav-name .stroke-name {
  color: transparent;
  -webkit-text-stroke: .6px rgba(236,231,223,.92);
  text-shadow: none;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.8)) drop-shadow(0 4px 10px rgba(0,0,0,.5));
}
.nav-role {
  font-weight: 400; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: #fff; margin-top: 4px; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 3px 10px rgba(0,0,0,.6);
}

.nav-links {
  justify-self: stretch; display: flex; align-items: center; justify-content: space-evenly;
  gap: clamp(10px, 2.2vw, 40px); width: 100%; margin: 0; padding: 0 clamp(8px, 3vw, 48px);
}
/* Nav type matched to the mentorship site across every property
   (Sheldon 17 Aug 2026: 11.5px, "match it across the board"). */
.nav-links a {
  font-weight: 600; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  padding: 7px 10px; border-radius: 9px;
  border: 1px solid rgba(236,231,223,.16);
  /* the chip protects the label so the bar itself can stay glass */
  background: rgba(11, 11, 13, .62);
  transition: color .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap; text-shadow: 0 1px 10px rgba(0,0,0,.8);
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] {
  color: #06231f; background: var(--btn, #2dd4bf); border-color: var(--btn, #2dd4bf);
}

.nav-right { justify-self: end; display: flex; align-items: center; gap: 16px; }
/* the CTA is the unified site's .btn.btn-teal, nav-sized */
.btn-nav {
  display: inline-block; text-decoration: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 8px; white-space: nowrap;
  background: var(--btn, #2dd4bf); color: #06231f;
  box-shadow: 0 8px 26px rgba(45,212,191,.35), 0 3px 10px rgba(0,0,0,.4);
  transition: transform .3s ease, box-shadow .3s ease;
}
.btn-nav:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 36px rgba(45,212,191,.5), 0 5px 14px rgba(0,0,0,.5);
}
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(236,231,223,.25);
  border-radius: 8px; width: 44px; height: 44px;   /* 44px = Apple HIG / WCAG 2.5.5 floor */
  align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #ECE7DF; border-radius: 2px; transition: all .3s; }

/* ---------- Explore More dropdown ---------- */
.nav-drop { position: relative; display: inline-flex; }
.nav-drop-btn {
  font-family: inherit; font-weight: 600; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  padding: 7px 10px; border-radius: 9px;
  border: 1px solid rgba(236,231,223,.16);
  background: rgba(11, 11, 13, .62);
  transition: color .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap; text-shadow: 0 1px 10px rgba(0,0,0,.8);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
}
.nav-drop-btn:hover, .nav-drop-btn:focus-visible,
.nav-drop.open .nav-drop-btn { color: #06231f; background: var(--btn, #2dd4bf); border-color: var(--btn, #2dd4bf); }
.nav-caret { transition: transform .25s var(--nav-ease); }
.nav-drop.open .nav-caret { transform: rotate(180deg); }

.nav-drop-menu {
  min-width: 460px; padding: 20px 22px;
  display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 8px 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 100%), rgba(11,11,13,.72);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(236,231,223,.16); border-radius: 16px;
  box-shadow: 0 26px 60px -14px rgba(0,0,0,.8), 0 10px 24px -8px rgba(0,0,0,.6);
  transition: opacity .25s var(--nav-ease), transform .25s var(--nav-ease), visibility .25s;
  z-index: 60;
}
/* Desktop-only positioning: scoped so the mobile drawer has nothing to undo
   (a `translate` reset is minifier bait, see the unified stylesheet). */
@media (min-width: 1025px) {
  .nav-drop-menu { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; }
}
.nav-drop:not(.open) .nav-drop-menu { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.nav-drop.open .nav-drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop-head {
  font-family: var(--font-sub, 'Playfair Display', Georgia, serif); font-style: normal;
  color: #FF7A18;
  font-size: .82rem; letter-spacing: .06em; margin: 0 0 8px;
}
.nav-drop-menu a {
  display: block; padding: 7px 9px; border-radius: 8px; border: 0; background: none;
  font-weight: 500; text-transform: none; text-decoration: none;
  font-size: .88rem; letter-spacing: .01em; color: rgba(236,231,223,.86);
  white-space: normal; text-shadow: none;
  transition: color .2s ease, background .2s ease;
}
.nav-drop-menu a:hover, .nav-drop-menu a:focus-visible {
  color: var(--btn, #2dd4bf); background: rgba(45,212,191,.10);
}

@media (max-width: 1480px) {
  .nav-links { gap: 9px; }
  .nav-links a { font-size: 10px; letter-spacing: .07em; padding: 6px 8px; }
  .nav-drop-btn { font-size: 10px; letter-spacing: .07em; padding: 6px 8px; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-brand { min-width: 0; overflow: hidden; }
  .nav-right { grid-column: 2; }
  .nav-bar.nav-open .nav-links {
    display: flex; flex-direction: column; gap: 12px;
    position: absolute; top: 100%; left: 0; right: 0;
    justify-self: stretch;
    background: rgba(11,11,13,.96);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(236,231,223,.1);
    padding: 26px 22px 30px; text-align: center;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-bar.nav-open .nav-links a { font-size: 13px; }

  /* inside the drawer the Explore More group is always expanded, in flow */
  .nav-drop { display: block; width: 100%; }
  .nav-drop-btn { display: none; }
  .nav-drop:not(.open) .nav-drop-menu,
  .nav-drop.open .nav-drop-menu {
    display: grid;
    /* `translate: 0`, NOT `none`: minifiers drop `none` as the initial value */
    position: static; translate: 0; transform: none; opacity: 1; visibility: visible;
    inset: auto; margin-left: 0; margin-right: 0;
    min-width: 0; width: 100%; grid-template-columns: 1fr; gap: 4px;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 0; border-top: 1px solid rgba(236,231,223,.14); border-radius: 0;
    box-shadow: none; padding: 14px 0 0; margin-top: 6px;
  }
  .nav-drop-menu a { text-align: center; font-size: 12.5px; }
  .nav-drop-head { text-align: center; margin-top: 10px; }
  /* drawer links measured 35px tall on the unified site: grow the hit box */
  .nav-links a, .nav-drop-menu a {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
  }
}
@media (max-width: 640px) {
  .nav-name { font-size: 15px; }
  .nav-role { font-size: 8.5px; margin-top: 3px; }
  .nav-inner { min-height: 66px; padding: 8px 16px; }
}

/* the header CTA hides on small screens; the drawer carries it instead */
.nav-drawer-cta { display: none; }
@media (max-width: 1240px) {
  .nav-drawer-cta { display: block; width: 100%; text-align: center; margin-top: 14px; }
}
@media (max-width: 900px) {
  .nav-right .btn-nav { display: none; }
}

/* the hub hero sits directly under the bar */
.has-nav .hub-hero { padding-top: 40px; }
@media (max-width: 640px) { .has-nav .hub-hero { padding-top: 26px; } }

@media (prefers-reduced-motion: reduce) {
  .nav-links a, .nav-drop-btn, .nav-drop-menu, .btn-nav, .nav-caret { transition: none; }
  .btn-nav:hover { transform: none; }
}
