/* ============================================================
   Section navigation band (.ss-secnav)
   A dark "on this page" bar under the main nav that jump-scrolls
   to each section. Sticks just below the sticky site nav.
   Behaviour + offsets are wired in /js/section-nav.js.
   ============================================================ */

:root {
  /* Overwritten at runtime by section-nav.js from the live nav height.
     Fallbacks keep the layout sane before/without JS. */
  --ss-nav-h: 64px;
  --ss-secnav-h: 50px;
  --ss-scroll-off: 118px; /* nav + band + a little breathing room */
}

/* Any anchor target on these pages clears the sticky nav + band when jumped to. */
section[id],
main[id],
[data-secnav-target] {
  scroll-margin-top: var(--ss-scroll-off);
}

.ss-secnav {
  position: sticky;
  top: var(--ss-nav-h);
  z-index: 90; /* below .ss-nav (100) / .ss-util (101) */
  background: #0e1116;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  /* thin brand gradient rule along the top edge */
  background-image: linear-gradient(90deg,
      #e76f51 0%, #e9c46a 38%, #f4a261 62%, #2a9d8f 100%);
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 0;
}

.ss-secnav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.ss-secnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}

.ss-secnav-item { display: flex; }

.ss-secnav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--ss-secnav-h);
  padding: 0 16px;
  color: #aeb4c0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.ss-secnav-link:hover,
.ss-secnav-link:focus-visible {
  color: #fff;
  outline: none;
}

/* the small warm dot/marker, hidden until the item is active */
.ss-secnav-ico {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4a261;
  transform: scale(0);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}

.ss-secnav-link.is-active {
  color: #f4c66a;
  border-bottom-color: #f4a261;
}

.ss-secnav-link.is-active .ss-secnav-ico {
  transform: scale(1);
  opacity: 1;
}

/* ---- Responsive: horizontal scroll strip on smaller screens ---- */
@media (max-width: 900px) {
  .ss-secnav-inner { padding: 0 16px; }
  .ss-secnav-list {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ss-secnav-list::-webkit-scrollbar { display: none; }
  .ss-secnav-link { padding: 0 13px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-secnav-link,
  .ss-secnav-ico { transition: none; }
}
