/* ============================================================
   Scroll Split Card - WordPress Vanilla CSS
   ============================================================ */

/* -- Intro Section -- */
.ssc-intro {
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  background: #131314;
}
.ssc-intro h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.03em;
  color: #fff;
}
.ssc-intro-arrow {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  animation: ssc-bounce 1.4s ease-in-out infinite;
  color: rgba(255, 255, 255, 0.3);
}
@keyframes ssc-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}



/* -- Sticky viewport -- */
.ssc-wrapper {
  position: relative;
  width: 100%;
  height: 500vh;
  perspective: 1200px;
}

.ssc-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  /* contain:size breaks sticky — kills scroll contribution of parent */
  contain: style;
}

/* -- "Scroll down" label -- */
.ssc-scroll-label {
  position: absolute;
  top: 20%;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  will-change: opacity, transform;
}
.ssc-scroll-label p {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* -- Stage: 3-panel flex container -- */
.ssc-stage {
  display: flex;
  height: 540px;
  width: 100%;
  max-width: 75.6rem;
  padding: 0 1rem;
  position: relative;
  transform-style: preserve-3d; /* will-change removed */
  /* iOS Safari: compositing layer on child, not sticky parent */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* -- Individual panel -- */
.ssc-panel {
  position: relative;
  height: 100%;
  flex: 1;
  transform-style: preserve-3d; /* will-change removed */
}
.ssc-panel[data-index="0"] { z-index: 0; }
.ssc-panel[data-index="1"] { z-index: 1; }
.ssc-panel[data-index="2"] { z-index: 2; }

/* -- Front face -- */
.ssc-front {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 2;
  /* will-change removed — reduces GPU layer pressure */
}

/* Image strip: 300% wide, offset per panel */
.ssc-front-image {
  position: absolute;
  top: 0;
  height: 100%;
  width: 300%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-image: var(--ssc-image);
}
.ssc-panel[data-index="0"] .ssc-front-image { left: 0%; }
.ssc-panel[data-index="1"] .ssc-front-image { left: -100%; }
.ssc-panel[data-index="2"] .ssc-front-image { left: -200%; }

/* -- Back face -- */
.ssc-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-image: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -24px 48px rgba(0, 0, 0, 0.2);
  /* will-change removed */\n}

/* -- Noise overlay -- */
.ssc-noise {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
  background-image: url("https://framerusercontent.com/images/6mcf62RlDfRfU61Yg5vb2pefpi4.png?width=256&height=256");
  background-repeat: repeat;
}

/* -- Back face typography -- */
.ssc-title {
  position: relative;
  z-index: 10;
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}
.ssc-desc {
  position: relative;
  z-index: 10;
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}

/* -- "So cool, right?" end label -- */
.ssc-end-label {
  position: absolute;
  bottom: 20%;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  will-change: opacity, transform;
}
.ssc-end-label p {
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
}

/* -- Responsive -- */
@media (max-width: 640px) {
  .ssc-wrapper {
    perspective: 800px;
  }
  .ssc-sticky {
    overflow: clip;
  }
  .ssc-stage {
    flex-direction: column;
    height: auto;
    aspect-ratio: 9 / 16;
    max-width: 90vw;
    padding: 0;
    gap: 0;
    transform-style: preserve-3d;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .ssc-panel {
    width: 100%;
    flex: 1;
    height: auto;
    transform-style: preserve-3d;
    will-change: transform;
  }
  /* Mobile image strip: 100% wide, 300% tall — one image split across 3 rows */
  .ssc-front-image {
    width: 100%;
    height: 300%;
    background-size: 100% 100%;
    background-image: var(--ssc-image-mobile, var(--ssc-image));
    left: 0;
  }
  .ssc-panel[data-index="0"] .ssc-front-image { top: 0%;    left: 0; }
  .ssc-panel[data-index="1"] .ssc-front-image { top: -100%; left: 0; }
  .ssc-panel[data-index="2"] .ssc-front-image { top: -200%; left: 0; }
  .ssc-back          { padding: 1rem; }
  .ssc-title         { font-size: 1.125rem; }
  .ssc-desc          { font-size: 0.75rem; }
  .ssc-end-label p   { font-size: 1.25rem; }
}
