/* ═══════════════════════════════════════════════════════
   WINTER TRANSFORMATION CASE STUDY — Section Nav
   winter-transformation-case-study-nav.css

   z-index stack: site nav (100) › ticker (99) › this (98)
   Position: fixed, flush below ticker at top: 106px
═══════════════════════════════════════════════════════ */

/* Push body content below all three fixed layers */
body {
  padding-top: 144px !important; /* 68px nav + 38px ticker + 38px section nav */
}

/* ── STICKY SECTION NAV ── */
.cs-section-nav {
  position: fixed;
  top: 106px;   /* site nav (68px) + ticker (38px) = sits flush below the ticker */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 98;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.cs-section-nav::-webkit-scrollbar { display: none; }

.cs-section-nav-inner {
  display: inline-flex;
  align-items: stretch;
  padding: 0 12px;
  min-width: 100%;
  white-space: nowrap;
}

.cs-section-nav-inner a {
  display: inline-flex;
  align-items: center;
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 4px 4px 0 0;
}

.cs-section-nav-inner a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.cs-section-nav-inner a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(255,184,0,0.05);
}

/* Thin blue reading-progress bar at very bottom of the nav */
.cs-nav-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--blue);
  opacity: 0.5;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Offset every scroll target so it lands below the full fixed header stack */
#challenge, #solution, #impact, #linkedin {
  scroll-margin-top: 152px; /* 144px fixed stack + 8px breathing room */
}

/* ── LIGHT MODE ── */
@media (prefers-color-scheme: light) {
  .cs-section-nav {
    background: #f0f0f5;
    border-bottom-color: #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  .cs-section-nav-inner a          { color: #888; }
  .cs-section-nav-inner a:hover    { color: #111; background: rgba(0,0,0,0.04); }
  .cs-section-nav-inner a.active   { color: #1044CC; border-bottom-color: #1044CC; background: rgba(16,68,204,0.06); }
  .cs-nav-progress-bar             { background: #1044CC; }
}
