@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@800&display=swap');

/* ═══════════════════════════════════════════════
   FoldingDOM Demo 5 – namespaced under .folding-section
   ═══════════════════════════════════════════════ */

.folding-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  user-select: none;
  cursor: default;
  background: #b27348;
  font-family: turquoise, serif;
  --fs-color-text: #fff;
  --fs-color-link: #fff;
  --fs-color-bg: #b27348;
  z-index: 10;
  margin-top: 100vh;
  /* Push below the fixed products wall */
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35), 0 -4px 16px rgba(0, 0, 0, 0.2);
}

/* ── Screen (viewport overlay) ── */
.folding-section .fs-screen {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: grab;
}

.folding-section .fs-screen:active {
  cursor: grabbing;
}

/* ── Our Story headline ── */
.fs-our-story {
  position: absolute;
  top: 70vh;
  left: 16vw;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 96px;
  /* 72pt */
  line-height: 0.9;
  color: #ffffff;
  letter-spacing: -0.02em;
  pointer-events: none;
  z-index: 20;
  user-select: none;
  text-transform: uppercase;
}

/* ── Fold geometry ── */
.folding-section .fs-fold {
  overflow: hidden;
  width: calc(40vw + 1px);
  height: 50vh;
  will-change: transform;
  background: #4a2711;
}

.folding-section .fs-wrapper-3d {
  position: absolute;
  right: 0;
  perspective: 50vw;
  transform-style: preserve-3d;
}

/* ── Content layout ── */
.folding-section .fs-fold-content {
  display: flex;
  height: 100%;
  flex-direction: row;
  width: max-content;
  align-items: flex-end;
  pointer-events: all;
  flex: none;
}

.folding-section .fs-fold-scroller {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

.folding-section .fs-fold-size-fix {
  width: calc(100% + 1px);
  height: 100%;
  transform-origin: center center;
}

.folding-section #fs-base-content {
  display: none;
}

/* ── Fold transforms ── */
.folding-section .fs-fold-before {
  position: absolute;
  transform-origin: right center;
  transform: translate3d(-100%, 0, 0) rotateY(-10deg);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.folding-section .fs-fold-before-1 {
  transform: translate3d(-100%, 0, 0) rotateY(-35deg);
}

.folding-section .fs-fold-before-2 {
  transform: translate3d(-100%, 0, 0) rotateY(-35deg) translate3d(-100%, 0, 0) rotateY(35deg);
}

.folding-section .fs-fold-before-3 {
  transform: translate3d(-100%, 0, 0) rotateY(-35deg) translate3d(-100%, 0, 0) rotateY(35deg) translate3d(-100%, 0, 0) rotateY(110deg);
}

/* Scroller offsets per fold panel */
.folding-section .fs-fold-main .fs-fold-scroller {
  transform: translateX(-200%);
}

.folding-section .fs-fold-before-1 .fs-fold-scroller {
  transform: translateX(-100%);
}

.folding-section .fs-fold-before-2 .fs-fold-scroller {
  transform: translateX(0%);
}

.folding-section .fs-fold-before-3 .fs-fold-scroller {
  transform: translateX(100%);
}

/* Shading overlay on fold panel 1 */
.folding-section .fs-fold-before-1::after {
  content: '';
  background: rgba(0, 0, 0, 0.08);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
}

/* ── Content items ── */
.folding-section .fs-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  justify-content: center;
  align-items: center;
  -webkit-user-select: none;
  user-select: none;
}

.folding-section .fs-content__img {
  flex: none;
  display: block;
  height: 100%;
  pointer-events: none;
}

.folding-section .fs-content__text {
  padding: 2rem;
  margin: 0 10vw 0 5vw;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 25vw;
  flex: none;
}

.folding-section .fs-content__title {
  font-weight: 700;
  margin: 0;
  white-space: normal;
  font-size: 2rem;
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

.folding-section .fs-content__desc {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.8;
}

/* ── Loader ── */
.folding-section.fs-loading::before,
.folding-section.fs-loading::after {
  content: '';
  position: absolute;
  z-index: 1000;
}

.folding-section.fs-loading::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fs-color-bg);
}

.folding-section.fs-loading::after {
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  opacity: 0.4;
  background: var(--fs-color-link);
  animation: fsLoaderAnim 0.7s linear infinite alternate forwards;
}

@keyframes fsLoaderAnim {
  to {
    opacity: 1;
    transform: scale3d(0.5, 0.5, 1);
  }
}