/* ============================================================================
 * af-header.css — Aletheia shared PUBLIC-site top nav (namespace: af-nav)
 * ----------------------------------------------------------------------------
 * One component for every public page: the landing (hero variant, over the dark
 * carousel) and the light public pages (About Overview/Team, Product & Services).
 * The IN-APP pillar dashboards keep their own contextual nav and never use this.
 * Colours are explicit (not app CSS vars) so it looks identical on index.html
 * and the standalone subscription.html.
 * ==========================================================================*/

.af-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 1.1rem 2.2rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(35, 36, 31, 0.10);
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  position: relative;
  z-index: 40;
}
.af-nav-mark {
  display: inline-flex;
  align-items: center;
  color: #23241f;
  text-decoration: none;
  border-radius: 10px;
  outline: none;
}
.af-nav-mark:focus-visible { box-shadow: 0 0 0 2px #0474C4; }

/* Alythia prism logo (inline SVG, see af-header.js). Draws itself in once. */
.af-logo { display: block; height: 34px; width: auto; overflow: visible; }
.af-logo .afl-word {
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.af-logo .afl-ray  { stroke-dasharray: 220; stroke-dashoffset: 220; animation: afl-draw 1s ease-out forwards; }
.af-logo .afl-r2   { animation-delay: .12s; }
.af-logo .afl-r3   { animation-delay: .24s; }
.af-logo .afl-leg  { stroke-dasharray: 130; stroke-dashoffset: 130; animation: afl-draw .8s ease-out .45s forwards; }
.af-logo .afl-ar   { animation-delay: .55s; }
.af-logo .afl-dot  { opacity: 0; animation: afl-fade .35s ease-out 1.15s forwards; }
.af-logo .afl-beam { stroke-dasharray: 270; stroke-dashoffset: 270; animation: afl-draw 1.2s ease-out 1.35s forwards; }
.af-logo .afl-word { opacity: 0; animation: afl-fade .8s ease-out 1.6s forwards; }
@keyframes afl-draw { to { stroke-dashoffset: 0; } }
@keyframes afl-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .af-logo * { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
}
.af-nav-menu { display: flex; align-items: center; gap: 20px; }
.af-nav-link {
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 450;
  letter-spacing: -0.005em;
  color: rgba(35, 36, 31, 0.72);
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color .18s ease;
}
.af-nav-link:hover { color: #23241f; }

.af-nav-dd { position: relative; }
.af-nav-dd-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: #ffffff;
  border: 1px solid rgba(35, 36, 31, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  z-index: 60;
}
.af-nav-dd.open .af-nav-dd-menu { display: flex; }
.af-nav-dd-item--narrow { display: none; }
.af-nav-dd-item {
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.84rem;
  letter-spacing: -0.005em;
  text-align: left;
  color: rgba(35, 36, 31, 0.82);
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.af-nav-dd-item:hover { background: rgba(35, 36, 31, 0.06); color: #23241f; }

.af-nav .auth-slot { display: flex; align-items: center; }
.af-nav-login {
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.84rem;
  letter-spacing: -0.005em;
  color: #2f5d4d;
  border: 1px solid rgba(47, 93, 77, 0.5);
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}
.af-nav-login:hover { background: rgba(47, 93, 77, 0.08); }

/* ---- HERO variant: landing page — floating bar (flat, hairline; pinned while scrolling) ----
   Pinned at the top while the landing scrolls. Dark glass over the dark hero;
   af-header.js adds .af-nav--light once the hero has scrolled away, and the
   pill turns into light frosted glass over the light sections. */
.af-nav--hero {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 28px));
  z-index: 50;
  padding: 7px 24px 7px 20px;   /* right side matches the logo side now that Login is hidden */
  min-height: 52px;
  border-radius: 10px;
  background: rgba(11, 13, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: none;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.af-nav--hero .af-nav-mark { color: #ECDFD2; transition: color .35s ease; }
.af-nav--hero .af-nav-link { color: rgba(236, 223, 210, .72); transition: color .35s ease; }
.af-nav--hero .af-nav-link:hover { color: #ECDFD2; }
.af-nav--hero .af-nav-dd-menu {
  top: calc(100% + 14px);
  background: #12151C;
  border-color: rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.af-nav--hero .af-nav-dd-item { color: rgba(244, 241, 236, .82); }
.af-nav--hero .af-nav-dd-item:hover { background: rgba(244, 241, 236, .08); color: #F4F1EC; }
/* main.js fills .auth-slot with .primary-btn.outline (Login) or an avatar. */
.af-nav--hero .auth-slot .primary-btn.outline {
  font-family: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  border-radius: 6px;
  border-color: rgba(255, 255, 255, .3);
  color: #ECDFD2;
  transition: background .2s ease, border-color .35s ease, color .35s ease;
}
.af-nav--hero .auth-slot .primary-btn.outline:hover { background: #ECDFD2; color: #0B0D12; border-color: #ECDFD2; }

/* Light state: scrolled past the hero, over the light landing sections. */
.af-nav--hero.af-nav--light {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(11, 13, 18, 0.10);
  box-shadow: none;
}
.af-nav--hero.af-nav--light .af-nav-mark { color: #23241f; }
.af-nav--hero.af-nav--light .af-nav-link { color: rgba(35, 36, 31, 0.72); }
.af-nav--hero.af-nav--light .af-nav-link:hover { color: #23241f; }
.af-nav--hero.af-nav--light .af-nav-dd-menu {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(35, 36, 31, .10);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.af-nav--hero.af-nav--light .af-nav-dd-item { color: rgba(35, 36, 31, .82); }
.af-nav--hero.af-nav--light .af-nav-dd-item:hover { background: rgba(35, 36, 31, .06); color: #23241f; }
.af-nav--hero.af-nav--light .auth-slot .primary-btn.outline { border-color: rgba(11, 13, 18, .25); color: #0B0D12; }
.af-nav--hero.af-nav--light .auth-slot .primary-btn.outline:hover { background: #0B0D12; color: #fff; border-color: #0B0D12; }

@media (prefers-reduced-motion: reduce) {
  .af-nav--hero, .af-nav--hero * { transition: none; }
}

@media (max-width: 640px) {
  .af-nav { padding: 0.9rem 1.1rem; }
  .af-nav-menu { gap: 12px; }
  .af-nav--hero { top: 10px; width: calc(100% - 20px); padding: 5px 16px 5px 14px; border-radius: 8px; gap: 8px; }
  /* Phones: prism mark only (rays + A + start of the beam); the wordmark is clipped. */
  .af-nav-mark { width: 66px; overflow: hidden; flex-shrink: 0; }
  .af-logo { height: 26px; }
  .af-nav .af-nav-menu { gap: 10px; }
  .af-nav .af-nav-link { font-size: 0.68rem; letter-spacing: 0; }
  .af-nav .auth-slot .primary-btn.outline,
  .af-nav .af-nav-login { padding: 6px 10px; font-size: 0.72rem; border-radius: 6px; }
}

/* Narrow phones: "Product & Services" moves into the About menu so the bar fits. */
@media (max-width: 420px) {
  .af-nav-link--wide { display: none; }
  .af-nav-dd-item--narrow { display: block; }
}

/* Public nav: no Login button for signed-out visitors (the slot still shows the
   avatar / profile menu once someone is signed in). */
.af-nav .auth-slot:has(.js-login-btn),
.af-nav .auth-slot:has(.af-nav-login) { display: none; }
