/* Horizontal chapter reel for the second page */
.chapter-reel {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(50% + 7vw);
  width: min(68vw, 134vh);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid rgba(238, 232, 220, 0.16);
  background: #080909;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 30px 90px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.chapter-track {
  display: flex;
  width: 300%;
  height: 100%;
  will-change: transform;
}

.chapter-panel {
  position: relative;
  flex: 0 0 33.333333%;
  height: 100%;
  overflow: hidden;
  color: #eee8dc;
  background: #090b0b;
}

.chapter-panel-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.chapter-panel-photo {
  filter: saturate(0.9) contrast(1.04);
}

.chapter-panel-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.chapter-panel-shade-about {
  background:
    linear-gradient(180deg, rgba(3, 10, 17, 0.54), rgba(3, 10, 17, 0.08) 45%, rgba(3, 10, 17, 0.72)),
    linear-gradient(270deg, rgba(2, 8, 15, 0.66), rgba(2, 8, 15, 0.26) 58%, rgba(2, 8, 15, 0.08));
}

.chapter-panel-photo-now {
  object-position: 50% 46%;
  filter: saturate(0.82) contrast(1.02) brightness(0.84);
}

.chapter-panel-shade-now {
  background:
    linear-gradient(180deg, rgba(1, 8, 10, 0.58) 0%, rgba(1, 8, 10, 0.3) 36%, rgba(1, 8, 10, 0.12) 64%, rgba(1, 8, 10, 0.72) 100%),
    linear-gradient(270deg, rgba(1, 7, 9, 0.64) 0%, rgba(1, 7, 9, 0.28) 60%, rgba(1, 7, 9, 0.08) 100%);
}

.chapter-panel-shade-listening {
  background:
    linear-gradient(180deg, rgba(3, 4, 4, 0.3), transparent 24%),
    linear-gradient(0deg, rgba(3, 4, 4, 0.46), transparent 38%);
}

.chapter-panel-now {
  background:
    radial-gradient(circle at 76% 34%, rgba(72, 112, 121, 0.32), transparent 35%),
    linear-gradient(125deg, #071417, #030708 72%);
}

.chapter-panel-now::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(238, 232, 220, 0.38) 0.34px, transparent 0.34px);
  background-size: 5px 5px;
  opacity: 0.045;
  pointer-events: none;
}

.chapter-panel-orbit {
  position: absolute;
  right: 7%;
  bottom: -54%;
  width: 67%;
  aspect-ratio: 1;
  border: 1px solid rgba(238, 232, 220, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(238, 232, 220, 0.02),
    0 0 0 108px rgba(238, 232, 220, 0.014);
}

.chapter-panel-body {
  position: absolute;
  z-index: 2;
  top: clamp(66px, 12vh, 106px);
  right: clamp(24px, 4vw, 54px);
  display: grid;
  width: min(43%, 380px);
  gap: clamp(12px, 1.8vh, 20px);
  font-family: var(--display);
  font-size: clamp(14px, 1.15vw, 19px);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.012em;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.28);
}

.chapter-panel-body p {
  margin: 0;
}

.chapter-panel-footer {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 18px;
  display: flex;
  gap: 18px;
  font-family: var(--display);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.56;
}

.chapter-panel-title {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 14px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 8vw, 140px);
  font-weight: 300;
  line-height: 0.78;
  letter-spacing: -0.065em;
}

.chapter-panel-caption {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.86;
}

.chapter-panel-listening .listening-track-index {
  left: clamp(28px, 4.2%, 58px);
  width: min(29%, 290px);
  top: 53%;
  transform: translateY(-40%);
}

.chapter-reel-ui {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  pointer-events: none;
}

.chapter-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(238, 232, 220, 0.26);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(5, 6, 6, 0.2);
  font: 16px/1 var(--display);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  transition: border-color 180ms ease, opacity 180ms ease;
}

.chapter-arrow:hover,
.chapter-arrow:focus-visible {
  border-color: rgba(238, 232, 220, 0.68);
}

.chapter-arrow:focus-visible {
  outline: 1px solid rgba(238, 232, 220, 0.82);
  outline-offset: 3px;
}

.chapter-arrow:disabled {
  opacity: 0.22;
  cursor: default;
}

.chapter-progress {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 12px;
  align-items: center;
  font-family: var(--display);
}

.chapter-label {
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.66;
}

.chapter-progress-line {
  position: relative;
  display: block;
  height: 1px;
  background: rgba(238, 232, 220, 0.2);
}

.chapter-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
}

.chapter-scroll-hint {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 18px;
  padding: 6px 9px;
  border: 1px solid rgba(238, 232, 220, 0.16);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.56;
  pointer-events: none;
}

.card-stack {
  display: none;
}

.whiteout {
  background:
    radial-gradient(circle at 58% 48%, #b4a49d 0%, #9a8b87 52%, #7f7271 100%) !important;
}

html:not(.js) .chapter-reel {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

html:not(.js) .chapter-track {
  display: grid;
  width: 100%;
  height: auto;
  transform: none !important;
}

html:not(.js) .chapter-panel {
  min-height: 100vh;
  min-height: 100svh;
}

html:not(.js) .chapter-reel-ui,
html:not(.js) .chapter-scroll-hint {
  display: none;
}

@media (min-width: 681px) and (max-width: 1199px) {
  .chapter-reel {
    left: calc(50% + 14vw);
    width: min(60vw, 118vh, 840px);
  }
}

@media (max-width: 680px) {
  .chapter-reel {
    top: 46%;
    left: 50%;
    width: min(80vw, 440px);
    aspect-ratio: 4 / 5;
  }

  .chapter-panel-body {
    top: clamp(64px, 12vh, 98px);
    right: 18px;
    width: calc(100% - 36px);
    font-size: clamp(14px, 3.8vw, 16px);
    line-height: 1.34;
  }

  .chapter-panel-title {
    left: 16px;
    bottom: 14px;
    font-size: clamp(54px, 17vw, 82px);
  }

  .chapter-panel-footer {
    right: 18px;
    bottom: 17px;
  }

  .chapter-panel-caption {
    top: 16px;
    left: 16px;
  }

  .chapter-panel-listening .listening-track-index {
    left: 14px;
    right: 12px;
    bottom: 52px;
    top: auto;
    width: auto;
    transform: none;
  }

  .chapter-reel-ui {
    right: 12px;
    bottom: 11px;
    left: 12px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .chapter-arrow {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .chapter-progress {
    grid-template-columns: auto minmax(42px, 1fr);
    gap: 7px;
  }

  .chapter-label {
    font-size: 6px;
    letter-spacing: 0.09em;
  }

  .chapter-scroll-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-reel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    aspect-ratio: auto;
    border: 0;
    transform: none;
  }

  .chapter-track {
    display: grid;
    width: 100%;
    height: auto;
    transform: none !important;
  }

  .chapter-panel {
    min-height: 100vh;
    min-height: 100svh;
  }

  .chapter-reel-ui,
  .chapter-scroll-hint {
    display: none;
  }
}
