/* ============================================
   CUSTOM SQUARESPACE SINGLE-PAGE NAV
   - Transparent → solid on scroll (sticky)
   - Smooth scroll anchors
   - Scroll-to-top button
   ============================================ */

/* ---------- NAV BAR ---------- */
.corenzwit-custom-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 2rem;
  width: 100%;
  z-index: 9999;
  transition: background 0.3s ease, box-shadow 0.3s ease;

  /* starts transparent */
  background: transparent;
}

/* solid state once sticky */
.corenzwit-custom-nav.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* placeholder keeps layout from jumping when nav becomes fixed */
.corenzwit-custom-nav-spacer {
  display: none;
  width: 100%;
}
.corenzwit-custom-nav-spacer.active {
  display: block;
}

/* nav links */
.corenzwit-custom-nav a {
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  position: relative;
  transition: opacity 0.2s ease;
}

.corenzwit-custom-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width 0.25s ease;
}

.corenzwit-custom-nav a:hover::after,
.corenzwit-custom-nav a.active::after {
  width: 100%;
}

.corenzwit-custom-nav a:hover {
  opacity: 0.85;
}

/* ---------- SCROLL-TO-TOP BUTTON ---------- */
.corenzwit-scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
              background 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.corenzwit-scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.corenzwit-scroll-to-top:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* chevron arrow */
.corenzwit-scroll-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 680px) {
  .corenzwit-custom-nav {
    gap: 1rem;
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
  }

  .corenzwit-custom-nav a {
    font-size: 0.8rem;
  }

  .corenzwit-scroll-to-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
  }
}
