/* Notebook scroll prototypes - path-following + segment-based */

* {
  box-sizing: border-box;
}

body.notebook-scroll-page {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  background: #0a0a0a;
}

/* ----- Toggle / nav ----- */
.notebook-prototype-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.notebook-prototype-nav a {
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.notebook-prototype-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notebook-prototype-nav a.active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* ----- Shared viewport ----- */
.notebook-viewport {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #000;
}

.notebook-viewport.hidden {
  display: none;
}

/* Path-only: stage has fixed aspect ratio (1.55:1), centered; clips when window is smaller */
.notebook-viewport--path {
  display: flex;
  align-items: center;
  justify-content: center;
}

.path-stage {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

/* ----- Prototype 1: Path-following scroll ----- */
.path-scroll-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.path-scroll-image-wrap {
  position: absolute;
  will-change: transform;
  /* Image size: use same as actual image or scale; we position by transform */
}

.path-scroll-image-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.path-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  pointer-events: none;
}

/* ----- Prototype 2: Segment-based scroll ----- */
.segment-scroll-wrap {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.segment-scroll-track {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: max-content;
}

.segment-scroll-segment {
  flex: 0 0 auto;
  width: 100vw;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
}

.segment-scroll-segment img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.segment-nav-dots {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 999px;
}

.segment-nav-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.segment-nav-dots button:hover {
  background: rgba(255, 255, 255, 0.7);
}

.segment-nav-dots button.active {
  background: #fff;
  transform: scale(1.2);
}

.segment-scroll-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  pointer-events: none;
}
