/* Inspired by this pen by Pieter Biesemans https://codepen.io/pieter-biesemans/pen/BQBWXX and My Mother Before Me project http://mymotherbeforeme.com/ */

html, body {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  margin: 0;
  font-family: Hepta Slab, sans-serif;
  font-weight: 500;
  background: #efecdb;
  color: #5D4037;
}
* {
  box-sizing: border-box;
}

/* hide scrollbar */
::-webkit-scrollbar {
  width: 1px;
  height: 1px;
}

::-webkit-scrollbar-button {
  width: 1px;
  height: 1px;
}
.external {
  overflow: hidden;
  height: 100vh;
}

.row-container {
  position: relative;
  overflow: visible !important;
}
.horizontal-scroll-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vh;
  transform: rotate(-90deg) translate3d(0,-100vh,0);
  transform-origin: right top;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  height: 100vw;
  perspective: 1px;
	transform-style: preserve-3d;
  padding-bottom: 10rem;
  
}
.img-wrapper {
  transform: rotate(90deg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  transform-origin: 50% 50%;
  transform: rotate(90deg) translateZ(.1px) scale(0.9) translateX(0px) translateY(-3vh);
  transition: 1s;
}

.img-wrapper:hover {
 min-height: 65vh;
}
.kapitel {
  transform: rotate(90deg) translateZ(-.2px) scale(1.1) translateX(0%) translateY(-10vh);
}
.slower {
  transform: rotate(90deg) translateZ(-.2px) scale(1.1) translateX(0%) translateY(-10vh);
}
.slower1 {
  transform: rotate(90deg) translateZ(-.25px) scale(1.05) translateX(0%) translateY(8vh);
}
.slower2 {
  transform: rotate(90deg) translateZ(-.3px) scale(1.3) translateX(0%) translateY(2vh);
}
.slower-up {
  transform: rotate(90deg) translateZ(-.2px) scale(1.1) translateX(0%) translateY(-15vh) ;
}
.faster {
  transform: rotate(90deg) translateZ(.15px) scale(0.8) translateX(0%) translateY(-10vh) ;
}
.faster1 {
  transform: rotate(90deg) translateZ(.05px) scale(0.8) translateX(0%) translateY(10vh) ;
}
.fastest {
  transform: rotate(90deg) translateZ(.22px) scale(0.7) translateX(-10vh) translateY(-15vh) ;
}
.vertical {
   transform: rotate(90deg) translateZ(-.15px) scale(1.15) translateX(0%) translateY(0%) ;
}
.last {
  transform: rotate(90deg) translateZ(-.2px) scale(1.1) translateX(25vh) translateY(-8vh) ;
}
.scroll-info, header {
  position: absolute;
  left: 1rem;
}


header {
  bottom: 3rem;
}
.scroll-info {
  top: 1rem;
  font-size: 2.2rem; /* or any size you prefer */
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif;
}
h1 {
  font-weight: 300;
  font-size: 1rem;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif;

}

.img-wrapper a {

}
img {
  overflow: hidden;
  display: block;
  padding: 1vh ;
  background: #efecdb;
  box-shadow: 0 10px 50px #5f2f1182;
  max-width: 60vh;
  max-height: 65vh;
  transition: .5s;
  vertical-align: top;
  filter: saturate(40%) sepia(30%) hue-rotate(5deg);
}
a:hover img {
  filter: none;
}
.img-wrapper:hover img {
  filter: none;
}
p {
  margin: 0;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif;

}
.scroll-info {
  display: flex;
  align-items: center;
}
.icon svg {
    width: 50px;
    fill: currentcolor;
}

/* full screen overlay */
.img-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.img-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.img-overlay-content img {
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  margin-bottom: 18px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.img-overlay-text {
  color: #bbb;      /* light grey */
  font-size: 1.1em;
  margin-top: 0.5em;
  font-family: Didot,Didot LT STD,Hoefler Text,Garamond,Times New Roman,serif; 
  font-weight: normal;
}

.img-overlay-text,
.img-overlay-text a {
  color: #bbb !important;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif !important;
}

.img-overlay .img-overlay-content .img-overlay-text {
  color: #bbb !important;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif !important;

}

#img-overlay .img-overlay-content .img-overlay-text,
#img-overlay .img-overlay-content .img-overlay-text a {
  color: #bbb !important;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif !important;

}
#img-overlay,
#img-overlay * {
  color: #bbb !important;
}
#img-overlay-text, #img-overlay-text * {
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif !important;
}
#scroll-slider {
  position: fixed;
  left: 5vw;
  bottom: 32px;
  width: 90vw;
  z-index: 100;
  accent-color: #bfa76f; /* or any color you like */
}
.img-overlay-content img {
  filter: none !important;
}
.img-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.img-overlay-text {
  max-width: 80vw;
  width: 70%;
  box-sizing: border-box;
  text-align: left; /* or center, as you prefer */
  word-break: break-word;
  margin: 0 auto;
  padding: 0 8px;
}
/* Center text if it's short (less than 40 characters) */
.img-overlay-text.centered {
  text-align: center;
}
.img-overlay-content img {
  display: block;
  max-width: 80vw;
  height: auto;
  margin: 0 auto 18px auto;
}
.img-nav-btn {
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: #fff;
  font-size: 2rem;
  z-index: 10001;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.img-nav-btn:hover {
  color: #bfa76f; /* highlight color on hover */
  background: none;
}
.img-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.img-overlay-content img {
  margin: 0 0 18px 0;
}
.chapter-nav {
  display: flex;
  gap: 0.5rem; /* reduced spacing between buttons */
  justify-content: center;
  margin: 0 0 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent !important;
  box-shadow: none !important;
  padding-top: 1.8rem; /* slightly less padding */
}
.chapter-nav button {
  background: transparent;
  border: none;
  outline: none;
  color: #5D4037;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif;
  font-size: 0.95rem;
  padding: 0.3em 0.8em;
  border-radius: 2em;
  cursor: pointer;
  transition: background 0.3s, color 0.2s;
}

.chapter-nav button:hover,
.chapter-nav button:focus {
  background: transparent; /* Remove or keep for clarity */
  color: #8b3631;          /* Highlight text color */
  outline: none;
  transition: color 0.2s;
}
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
html {
  scroll-behavior: smooth;
}
.bottom-header {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 2vw; /* or e.g. 24px, adjust as needed */
  text-align: center;
  background: transparent;
  z-index: 100;
  pointer-events: none; /* So it doesn't block clicks */
}
.bottom-header p, .bottom-header h1 {
  margin: 0;
  pointer-events: auto;
}
.site-title {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  padding: 1rem 2rem 1rem 1rem;
  font-family: Didot, Didot LT STD, Hoefler Text, Garamond, Times New Roman, serif;
  font-size: 2rem;
  color: #5D4037;
  background: transparent;
  pointer-events: none; /* So it doesn't block clicks */
}



/* Mobile styles: stack images vertically, remove rotation */
@media (max-width: 700px) {
  .horizontal-scroll-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100vw;
    height: auto;
    transform: none !important;
    overflow-y: visible;
    overflow-x: visible;
    padding-bottom: 0;
    perspective: none;
  }
  .img-wrapper,
  .img-wrapper.slower,
  .img-wrapper.faster,
  .img-wrapper.slower1,
  .img-wrapper.slower2,
  .img-wrapper.slower-up,
  .img-wrapper.faster1,
  .img-wrapper.fastest,
  .img-wrapper.vertical,
  .img-wrapper.last {
    transform: none !important;
    min-height: unset;
    margin-bottom: 2rem;
    width: 100%;
    justify-content: flex-start;
  }
  .img-wrapper {
    background: none;
    padding-left: 0;
    padding-right: 0;
  }
  .img-wrapper {
    background: #efecdb;
    padding-left: 6vw;
    padding-right: 6vw;
    box-sizing: border-box;
  }
  .img-wrapper img {
    max-width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px #5f2f1115;
    display: block;
    margin: 0 auto;
    padding: 0;
    border-left: 3vw solid #efecdb;
    border-right: 3vw solid #efecdb;
    border-top: 3vw solid #efecdb;
    border-bottom: 3vw solid #efecdb;
  }
  .chapter-nav {
    position: static;
    top: auto;
    z-index: 1000;
    background: #efecdb;
    padding-top: 1rem;
  }
  .site-title {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 3000;
    background: #efecdb;
    font-size: 1.3rem;
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 8px #0001;
  }
  body {
    padding-top: 3.2rem; /* adjust if title height changes */
  }
  .bottom-header {
    font-size: 0.9rem;
    bottom: 0.5rem;
  }
  .external {
    height: auto !important;
    overflow: visible !important;
  }
  .chapter-nav {
    display: none;
  }
  .chapter-dropdown {
    display: block;
    position: fixed;
    top: 3.2rem; /* below the title */
    left: 0;
    width: 100vw;
    z-index: 2500;
    background: #efecdb;
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
    border: none;
    box-shadow: 0 2px 8px #0001;
  }
  .chapter-menu-btn {
    display: block;
    position: fixed;
    top: 0.0rem;           /* Move closer to the top */
    right: 1rem;
    z-index: 3500;
    background: transparent; /* Make background transparent */
    border: none;
    font-size: 1.4rem;
    color: #5D4037;
    padding: 0.2em 0.6em;
    border-radius: 0.5em;
    box-shadow: none;        /* Remove box-shadow for transparency */
    cursor: pointer;
  }
  .chapter-dropdown {
    display: none;
    position: fixed;
    top: 3.2rem;
    right: 1rem;
    width: calc(100vw - 2rem);
    z-index: 3400;
    background: #efecdb;
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
    border: none;
    box-shadow: 0 2px 8px #0001;
  }
  .chapter-dropdown.show {
    display: block;
  }
  .chapter-dropdown-list {
    display: none;
    position: fixed;
    top: 3.2rem;
    right: 1rem;
    width: calc(100vw - 2rem);
    background: #efecdb;
    z-index: 3400;
    list-style: none;
    margin: 0;
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 8px #0001;
    border-radius: 0.5em;
  }
  .chapter-dropdown-list.show {
    display: block;
  }
  .chapter-dropdown-list li {
    margin: 0.5em 0;
  }
  .chapter-dropdown-list a {
    color: #5D4037;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 0.5em 0;
  }
  .chapter-dropdown-list a:hover {
    color: #8b3631;
    background: #e5dbc6;
    border-radius: 0.3em;
  }
  [id^="chapter-"] {
    scroll-margin-top: 3.5rem; /* Adjust to match your .site-title height + spacing */
  }
  #chapter-1 {
    margin-top: 0.5rem;
  }
  .img-nav-btn {
    position: fixed;
    bottom: -20rem;
    top: auto;
    z-index: 10001;
    background: none;
    color: #fff;
    font-size: 2rem;
    box-shadow: none;
  }
  #img-prev {
    left: 0.5rem;
    right: auto;
    transform: none;
  }
  #img-next {
    right: 0.5rem;
    left: auto;
    transform: none;
  }
  .img-overlay-text {
    max-width: 96vw;
    width: 96vw;
    font-size: 0.95em;
    padding: 0 2vw;
    text-align: left;
  }
  .img-nav-btn {
    position: fixed;
    bottom: 2.5rem;   /* adjust as needed */
    top: auto;
    left: unset;
    right: unset;
    z-index: 10001;
    background: none;
    color: #fff;
    font-size: 1.8rem;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    box-shadow: none;
    transform: none;
  }
  #img-prev {
    left: 1rem;
    right: auto;
  }
  #img-next {
    right: 1rem;
    left: auto;
  }
  .bottom-header {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    z-index: 3000;
    background: #efecdb;
    font-size: 0.95rem;
    padding: 0.7rem 0.5rem 0.7rem 0.5rem; /* less horizontal padding */
    box-shadow: 0 -2px 8px #0001;
    text-align: center;
    white-space: normal;      /* allow wrapping */
    overflow-x: visible;      /* allow content to fit */
    text-overflow: unset;
  }
  .bottom-header p {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.7em;
    word-break: break-word;
    min-width: 0;
  }
  .bottom-header p span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .spotify-play-btn {
    flex-shrink: 0;
  }
}
@media (min-width: 701px) {
  .chapter-menu-btn,
  .chapter-dropdown-list {
    display: none !important;
  }
  .img-nav-btn {
    position: fixed;
    top: 50%;
    background: none;
    color: #fff;
    font-size: 2rem;
    z-index: 10001;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transform: translateY(-50%);
  }
  #img-prev {
    left: 2vw;
    right: auto;
    transform: translateY(-50%);
  }
  #img-next {
    right: 2vw;
    left: auto;
    transform: translateY(-50%);
  }
}
.img-overlay-img-fade {
  opacity: 0;
  transition: opacity 0.4s;
}
#img-overlay-img {
  transition: opacity 0.4s;
}
.bottom-header {
  pointer-events: auto !important;
}
.spotify-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, box-shadow 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 8px #0002;
  margin-left: 0.2em;
}
.spotify-play-btn:hover,
.spotify-play-btn:focus {
  transform: scale(1.08);
  box-shadow: 0 4px 16px #bfa76f55;
  outline: none;
  background: #f5e9d6; /* subtle background on hover */
}