/* ========================================
   SHARED NAV & FOOTER — Single source of truth
   ======================================== */

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  background: linear-gradient(180deg, #1a1d2e 0%, #161929 100%);
}

.nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(168,85,247,0.25) 35%, rgba(56,189,248,0.2) 65%, transparent 100%);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo-img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(168,85,247,0.25));
}

.nav-logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-tagline {
  display: none;
}

.nav-heart {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 6px 10px;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.06);
}

.nav-links a.active {
  color: rgba(255,255,255,0.95);
}

/* NAV — CLARITY PLATFORM (special treatment) */
.nav-clarity {
  position: relative;
  color: #C084FC !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(168,85,247,0.4), 0 0 24px rgba(168,85,247,0.15);
  transition: color 0.2s ease, text-shadow 0.3s ease, background 0.2s ease !important;
}

.nav-clarity:hover {
  color: #D8B4FE !important;
  text-shadow: 0 0 16px rgba(168,85,247,0.6), 0 0 32px rgba(168,85,247,0.25);
  background: rgba(168,85,247,0.08) !important;
}

.nav-clarity.active {
  color: #E9D5FF !important;
  text-shadow: 0 0 16px rgba(168,85,247,0.5), 0 0 32px rgba(168,85,247,0.2);
}

/* NAV — FREE RESOURCES (prominent, distinct from Clarity) */
.nav-free {
  position: relative;
  color: #34D399 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(52,211,153,0.3);
  transition: color 0.2s ease, text-shadow 0.3s ease, background 0.2s ease !important;
}

.nav-free:hover {
  color: #6EE7B7 !important;
  text-shadow: 0 0 16px rgba(52,211,153,0.6), 0 0 32px rgba(52,211,153,0.25);
  background: rgba(52,211,153,0.08) !important;
}

.nav-free.active {
  color: #A7F3D0 !important;
  text-shadow: 0 0 16px rgba(52,211,153,0.5), 0 0 32px rgba(52,211,153,0.2);
}


/* NAV DROPDOWNS */
.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-trigger {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  background: none;
  border: none;
  padding: 6px 10px;
  white-space: nowrap;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown-trigger:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.06);
}

.nav-dropdown-trigger.active {
  color: rgba(255,255,255,0.95);
}

.nav-chevron {
  transition: transform 0.25s ease;
  opacity: 0.5;
}

.nav-dropdown.open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 180px;
  background: linear-gradient(180deg, #1e2235 0%, #171a2c 100%);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
  z-index: 300;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown-menu a:hover {
  color: #fff;
  background: rgba(168,85,247,0.12);
}

.nav-dropdown-menu a.active {
  color: rgba(255,255,255,0.95);
  background: rgba(168,85,247,0.08);
}

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #A855F7 0%, #8B2FD9 100%) !important;
  border: none !important;
  padding: 9px 24px !important;
  border-radius: 8px !important;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(147,51,234,0.25) !important;
}

.nav-cta:hover {
  background: linear-gradient(180deg, #B87CF7 0%, #9333EA 100%) !important;
  box-shadow: 0 4px 16px rgba(147,51,234,0.35) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* NAV HAMBURGER */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s ease, background 0.3s ease;
  position: relative;
}

.nav-hamburger span::before,
.nav-hamburger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.3s ease, top 0.3s ease, background 0.3s ease;
}

.nav-hamburger span::before { top: -7px; }
.nav-hamburger span::after { top: 7px; }

.nav-hamburger.open span { background: transparent; }
.nav-hamburger.open span::before { top: 0; transform: rotate(45deg); }
.nav-hamburger.open span::after { top: 0; transform: rotate(-45deg); }

/* FOOTER */
.footer {
  background: #0f1119;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 56px 0 40px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand-col {}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
}

.footer-brand span { color: #fff; }

.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.footer-col-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-bottom {
  padding-top: 24px;
}

.footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.18);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover { color: rgba(255,255,255,0.65); }

/* BACK BUTTON (shared across sub-pages) */
.back-btn {
  position: fixed;
  top: 80px;
  right: max(24px, calc(50% - 700px + 48px));
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1a1a2e;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.back-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.back-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* RESPONSIVE — 1024px: switch to hamburger */
@media (max-width: 1024px) {
  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: none !important;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 64px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 48px 40px 60px;
    background: #161929;
    z-index: 199;
    overflow-y: auto;
  }

  .nav-links.open { display: flex !important; }

  .nav-links li { list-style: none; text-align: left; }

  /* Top-level links (Clarity Platform, Free Resources) */
  .nav-links > li > a {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    padding: 14px 0;
    background: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links > li > a::after {
    content: '\2192';
    font-size: 16px;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
  }

  .nav-links > li > a:hover { color: #fff; }
  .nav-links > li > a:hover::after { opacity: 1; transform: translateX(4px); }

  /* Active state for current page */
  .nav-links > li > a.active,
  .nav-dropdown-menu a.active {
    color: #A855F7 !important;
  }

  .nav-links .nav-cta {
    margin-top: 24px;
    padding: 16px 48px !important;
    font-size: 17px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    justify-content: center !important;
    border-bottom: none !important;
  }

  .nav-links .nav-cta::after { display: none !important; }

  /* Dropdown groups — always expanded */
  .nav-dropdown {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-dropdown-trigger {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    padding: 0 0 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
    text-align: left;
  }

  .nav-chevron { display: none; }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible !important;
    max-height: none !important;
    overflow: visible;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    min-width: auto;
    width: 100%;
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  .nav-dropdown-menu::before { display: none; }

  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:hover.open .nav-dropdown-menu {
    visibility: visible !important;
    max-height: none !important;
    opacity: 1;
    transform: none;
  }

  .nav-dropdown-menu a {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    text-align: left;
    padding: 6px 16px 6px 0;
    letter-spacing: -0.01em;
    width: 50%;
  }

  .nav-dropdown-menu a:hover { color: #fff; }

}

/* RESPONSIVE — 768px: footer stacks */
@media (max-width: 768px) {
  .footer { padding: 40px 24px; }
  .footer-inner { padding: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-bottom { text-align: center; }
  .back-btn { top: 74px; right: 16px; padding: 6px 12px; font-size: 12px; }
}
