/* ═══════════════════════════════════════════════════════
   CASE STUDY — SCROLL HINTS & SECTION NAV
   case-study-nav.css
═══════════════════════════════════════════════════════ */

/* ── SCROLL HINT (overrides inline style block) ── */
.reveal {
  opacity: 1 !important;
  transform: none !important;
}

.scroll-hint {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  pointer-events: none;
  transition: opacity 0.4s ease;
  border-top: 1px solid rgba(255,255,255,0.15);
  /* Remove old gradient approach */
  background-image: none;
}

/* Mouse scroll icon */
.sh-mouse {
  width: 16px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 8px;
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  flex-shrink: 0;
}
.sh-mouse::after {
  content: '';
  width: 3px;
  height: 5px;
  background: #fff;
  border-radius: 2px;
  animation: sh-wheel 1.1s ease-in-out infinite;
}
@keyframes sh-wheel {
  0%   { transform: translateY(0);   opacity: 1; }
  60%  { transform: translateY(5px); opacity: 0.3; }
  100% { transform: translateY(0);   opacity: 1; }
}

/* Bouncing arrow */
.sh-arrow {
  display: inline-block;
  font-size: 15px;
  animation: sh-bounce 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes sh-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

.sh-text {
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* Fade out once the user has started scrolling */
.scroll-hint.faded { opacity: 0; }

/* Light mode */
@media (prefers-color-scheme: light) {
  .scroll-hint {
    background: #1044CC;
    border-top-color: rgba(255,255,255,0.2);
  }
}


/* ══════════════════════════════════════════════════════
   FIXED SECTION NAV
   z-index stack: site nav (100) › ticker (99) › this (98) › body (2)
   position mirrors the ticker exactly — fixed, full-width, stacked below it
══════════════════════════════════════════════════════ */

/* Push body content down to clear site nav + ticker + this nav */
body {
  padding-top: 144px !important; /* 68px nav + 38px ticker + 38px 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;  /* below ticker (99) and site nav (100) */
  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; /* aligns border with nav border-bottom */
  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;
}

/* Give the conclusion section enough bottom padding so it can
   scroll into the observer's detection zone before the page ends */
#conclusion {
  /* padding-bottom: 55vh; */
}

/* Offset every scroll target so it lands below the full fixed header stack.
   This is the browser-native way to handle fixed headers — no JS math needed. */
#summary, #background, #deliverables, #compare,
#ai-toolkit, #cost, #light-dark, #assessment, #conclusion {
  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; }
}
