/* ═══════════════════════════════════════════════════════════
   NAV + FOOTER — DARK THEME
   Separated from style.css. MUST load AFTER style.css.
   All dark colours live in the token block below — edit there.
   ═══════════════════════════════════════════════════════════ */

nav,
footer, .back-to-top {
  --nf-bg:         #0E0E10;             /* dark base */
  --nf-bg-glass:   rgba(14,14,16,0.85); /* translucent nav bg */
  --nf-surface:    #161719;             /* dropdown surface */
  --nf-surface-2:  #1E1F22;             /* hover on surface */
  --nf-text:       #F2F0EA;             /* near-white */
  --nf-text-2:     #ADA89E;             /* secondary text */
  --nf-muted:      #726D64;             /* muted labels */
  --nf-gold:       #C9A35A;             /* gold, lifted for dark bg */
  --nf-gold-hover: #DCB970;
  --nf-on-gold:    #0E0E10;             /* dark text on gold */
  --nf-border:     rgba(255,255,255,0.09);
  --nf-border-2:   rgba(255,255,255,0.18);
}

/* ═══════════ NAVIGATION ═══════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 56px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nf-bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--nf-border);
}

.nav-logo {
display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--nf-text);
  text-transform: uppercase;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nf-text-2);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--nf-gold);
  transition: width 0.4s ease;
}

.nav-links a:hover { color: var(--nf-text); }
.nav-links a:hover::after { width: 100%; }

/* ─── Active / current-page state ─── */
.nav-links .current-menu-item > a,
.nav-links .current-menu-parent > a,
.nav-links .current-menu-ancestor > a {
  color: var(--nf-text);
}
.nav-links .current-menu-item > a::after,
.nav-links .current-menu-parent > a::after,
.nav-links .current-menu-ancestor > a::after {
  width: 100%;
}

.nav-cta {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: var(--nf-gold);
  color: var(--nf-on-gold);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-cta:hover { background: var(--nf-gold-hover); }

/* ─── Ecosystem dropdown ─── */
.nav-links .menu-item-has-children { position: relative; }

.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--nf-surface);
  border: 1px solid var(--nf-border-2);
  padding: 8px 0;
  min-width: 220px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.nav-links .menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-links .sub-menu li { display: block; }

.nav-links .sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--nf-text-2);
}

.nav-links .sub-menu a::after { display: none; }

.nav-links .sub-menu a:hover {
  background: var(--nf-surface-2);
  color: var(--nf-gold);
}

/* ─── Mobile menu toggle ─── */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--nf-text);
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--nf-text);
  margin: 6px 0;
  transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════ FOOTER ═══════════ */
footer {
  padding: 80px 56px 36px;
  border-top: 1px solid var(--nf-border);
  background: var(--nf-bg);
  color: var(--nf-text-2);
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nf-text);
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--nf-text-2);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-email { font-size: 13px; color: var(--nf-gold); }

.footer-heading {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--nf-gold);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--nf-text-2);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--nf-gold); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--nf-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 11px;
  color: var(--nf-muted);
  letter-spacing: 0.06em;
}

.footer-socials { display: flex; gap: 24px; }

.footer-socials a {
  color: var(--nf-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: color 0.3s;
}

.footer-socials a:hover { color: var(--nf-gold); }

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
  transition: transform 0.3s;
}

.footer-socials a:hover svg {
  transform: translateY(-2px);
}

/* ═══════════ RESPONSIVE — NAV + FOOTER ═══════════ */
@media (max-width: 900px) {
  nav { padding: 0 20px; }

  .nav-cta { display: none; }

  .nav-logo { white-space: nowrap; font-size: 15px; }

  .nav-links { display: none; }

  .mobile-menu-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--nf-bg);
    border-bottom: 1px solid var(--nf-border);
    flex-direction: column;
    gap: 0;
    padding: 24px 0;
    transform: translateY(-120%);
    transition: transform 0.4s ease;
    display: flex;
  }

  .nav-links.mobile-open { transform: translateY(0); }

  .nav-links li { width: 100%; }

  .nav-links a { display: block; padding: 14px 24px; font-size: 13px; }

  .nav-links .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: var(--nf-surface);
    border: none;
    padding: 0;
    min-width: 0;
    box-shadow: none;
  }

  .nav-links .sub-menu a { padding: 10px 40px; font-size: 12px; color: var(--nf-muted); }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ─── Nav scroll state ─── */
nav {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
  background: rgba(14, 14, 16, 0.96);
  border-bottom-color: var(--nf-border-2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ─── Back to top ─── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;                       /* below the fixed nav (1000), opposite corner anyway */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nf-gold);
  color: var(--nf-on-gold);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, visibility 0.3s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--nf-gold-hover);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

@media (max-width: 600px) {
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 900px) {
  .nav-cta-mobile-item {
    width: 100%;
    border-top: 1px solid var(--nf-border);
    margin-top: 8px;
    padding: 16px 24px 4px;
  }
  .nav-cta-mobile-item .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 0;
    font-size: 12px;
    letter-spacing: 0.14em;
    background: var(--nf-gold);          /* force gold bg back */
    color: var(--nf-on-gold);            /* force dark text back */
  }
  .nav-cta-mobile-item .nav-cta:hover {
    background: var(--nf-gold-hover);
    color: var(--nf-on-gold);
  }
  /* kill the inherited menu-link underline on the button */
  .nav-cta-mobile-item .nav-cta::after {
    display: none;
  }
  .nav-links .current-menu-item > a,
  .nav-links .current-menu-parent > a,
  .nav-links .current-menu-ancestor > a {
    color: var(--nf-gold);
  }
  .nav-links .current-menu-item > a::after,
  .nav-links .current-menu-parent > a::after,
  .nav-links .current-menu-ancestor > a::after {
    display: none;
  }
}