/* Section navigator (see section-nav.js): pill stack in the bottom-right corner */
.snav {
  --snav-bg: rgba(236, 236, 238, 0.92);
  --snav-ink: #1d1d1f;
  position: fixed; right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px); z-index: 60;
  display: flex; align-items: flex-end; gap: 10px;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.snav button { font: inherit; color: var(--snav-ink); border: 0; cursor: pointer; }
.snav button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #1d1d1f; } /* shows on light and dark sections */

/* the stack: list of pills above the toggle */
.snav-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.snav-list { list-style: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-height: calc(100vh - 140px); max-height: calc(100svh - 140px); overflow-y: auto; padding: 4px; margin: -4px; }
.snav-list li {
  opacity: 0; transform: translateY(10px) scale(0.96); pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i) * 18ms);
}
.snav.is-open .snav-list li { opacity: 1; transform: none; pointer-events: auto; }
.snav:not(.is-open) .snav-list { visibility: hidden; transition: visibility 0s 0.3s; }
.snav.no-anim, .snav.no-anim * { transition: none !important; }

.snav-pill, .snav-toggle {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 9px 16px 9px 11px; border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1;
  background: var(--snav-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, color 0.2s ease;
}
.snav-pill:hover { background: #fff; }
/* the toggle is red so it's easy to spot on any section */
.snav .snav-toggle { background: #D92D20; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); } /* .snav prefix beats the ink colour set on all .snav buttons */
.snav .snav-toggle:hover { background: #B8231A; }
.snav-pill.is-active { background: var(--snav-ink); color: #fff; }

/* the ⊕ icon; turns into × on the open toggle */
.snav-plus { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.snav-plus::before, .snav-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 1.6px; border-radius: 1px; background: currentColor; transform: translate(-50%, -50%); }
.snav-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.snav.is-open .snav-toggle .snav-plus { transform: rotate(45deg); }
.snav-pill.is-active .snav-plus::after { opacity: 0; } /* current section shows a minus */

@media (max-width: 820px) {
  .snav-pill, .snav-toggle { font-size: 14px; padding: 9px 15px 9px 10px; }
  .snav-current { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .snav-list li, .snav-plus, .snav-pill, .snav-toggle { transition: none; }
}
