/* =========================================================
   PEACH-REFERENCE V4 - VERTICAL 3D RIBBON
   Separate stylesheet for this section only.
   Prefix: pdr-
========================================================= */

.pdr-wrap,
.pdr-wrap * {
  box-sizing: border-box;
}

.pdr-wrap {
  position: relative;
  z-index: 30;

  /*
    Scroll runway for:
    1. collapsed stack
    2. diagonal fan opening
    3. travel through ribbon
    4. exit
  */
  height: 500vh;

  background: #000000;
  color: #f7f7f4;
}


/* =========================================================
   STICKY VIEWPORT
========================================================= */

.pdr-sticky {
  position: sticky;
  top: 0;

  width: 100%;
  height: 100vh;
  min-height: 620px;

  overflow: hidden;
  isolation: isolate;

  background:
    radial-gradient(
      circle at 73% 28%,
      rgba(63, 47, 145, 0.13),
      transparent 31%
    ),
    radial-gradient(
      circle at 42% 60%,
      rgba(8, 78, 104, 0.08),
      transparent 35%
    ),
    #000000;
}


/* =========================================================
   3D SCENE
========================================================= */

.pdr-scene {
  position: absolute;
  inset: 0;

  z-index: 3;

  perspective: 1600px;
  perspective-origin: 50% 45%;

  pointer-events: none;
}


.pdr-world {
  position: absolute;

  /*
    At scroll start JS keeps the stack centred.
    During fan-open JS shifts the world toward the left,
    recreating the reference composition.
  */
  left: 50%;
  top: 39%;

  /*
    Reference cards are narrow portrait screens.
    9:16 is the closest practical ratio.
  */
  width: min(14.6vw, 265px);
  aspect-ratio: 9 / 16;

  transform-style: preserve-3d;
  transform-origin: center center;

  will-change: transform;
}


.pdr-panel {
  position: absolute;
  inset: 0;

  margin: 0;

  overflow: hidden;

  border-radius: 24px;

  background: #0c1129;

  border:
    1px solid
    rgba(255, 255, 255, 0.16);

  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);

  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;

  will-change:
    transform,
    opacity,
    filter;
}


.pdr-panel::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      112deg,
      rgba(255,255,255,0.10),
      transparent 18%,
      transparent 73%,
      rgba(255,255,255,0.035)
    );

  opacity: 0.75;
}


.pdr-panel img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* =========================================================
   FIXED COPY - reference-like position
========================================================= */

.pdr-copy {
  position: absolute;

  z-index: 20;

  left: 50%;
  top: 72%;

  width: min(860px, 82vw);

  transform: translate(-50%, -50%);

  text-align: center;

  pointer-events: none;
}


.pdr-eyebrow {
  display: block;

  margin-bottom: 14px;

  color: #a9eee3;

  font:
    600 10px/1
    "Inter",
    Arial,
    sans-serif;

  letter-spacing: 0.24em;
}


.pdr-heading {
  margin: 0;

  color: #f7f7f4;

  font:
    400
    clamp(48px, 4.45vw, 82px) /
    0.98
    "Inter",
    Arial,
    sans-serif;

  letter-spacing: -0.052em;

  text-transform: none;
}


.pdr-heading span {
  display: block;
}


.pdr-description {
  max-width: 600px;

  margin: 20px auto 0;

  color:
    rgba(242, 244, 248, 0.60);

  font:
    400
    clamp(14px, 0.95vw, 17px) /
    1.55
    "Inter",
    Arial,
    sans-serif;
}


/* =========================================================
   RIGHT PROGRESS
========================================================= */

.pdr-counter {
  position: absolute;

  z-index: 25;

  right: clamp(17px, 2.2vw, 42px);
  top: 50%;

  display: grid;

  grid-template-rows:
    auto
    160px
    auto;

  justify-items: center;

  gap: 11px;

  transform: translateY(-50%);

  color:
    rgba(255,255,255,0.48);

  font:
    600 9px/1
    "Inter",
    Arial,
    sans-serif;

  letter-spacing: 0.15em;
}


.pdr-counter-line {
  position: relative;

  display: block;

  width: 1px;
  height: 160px;

  background:
    rgba(255,255,255,0.15);
}


.pdr-counter-line i {
  position: absolute;

  top: 0;
  left: 0;

  width: 1px;
  height: 100%;

  background: #a9eee3;

  transform: scaleY(0);
  transform-origin: top;
}


/* =========================================================
   SCROLL NOTE
========================================================= */

.pdr-scroll-note {
  position: absolute;

  z-index: 25;

  left: 28px;
  bottom: 24px;

  display: flex;
  align-items: center;

  gap: 10px;

  color:
    rgba(255,255,255,0.42);

  font:
    600 9px/1
    "Inter",
    Arial,
    sans-serif;

  letter-spacing: 0.22em;
}


.pdr-scroll-note i {
  width: 52px;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      #a9eee3,
      transparent
    );
}


/* =========================================================
   BACKGROUND GLOW
========================================================= */

.pdr-bg {
  position: absolute;
  inset: 0;

  overflow: hidden;
}


.pdr-orb {
  position: absolute;

  width: 34vw;
  height: 34vw;

  border-radius: 50%;

  filter: blur(110px);
}


.pdr-orb-a {
  left: 64%;
  top: 8%;

  background: #000000;
  opacity: 0.10;
}


.pdr-orb-b {
  left: 28%;
  top: 45%;

  background: #087c89;
  opacity: 0.07;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  .pdr-wrap {
    height: 450vh;
  }


  .pdr-world {
    top: 36%;

    width: min(25vw, 220px);
  }


  .pdr-copy {
    top: 73%;

    width:
      calc(100% - 74px);
  }


  .pdr-heading {
    font-size:
      clamp(40px, 7vw, 62px);
  }


  .pdr-counter {
    right: 12px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {

  .pdr-wrap {
    height: 420vh;
  }


  .pdr-sticky {
    min-height: 560px;
  }


  .pdr-world {
    top: 33%;

    /*
      Vertical cards stay large enough to read,
      while JS uses very tight spacing.
    */
    width: min(43vw, 185px);
  }


  .pdr-copy {
    top: 73%;

    width:
      calc(100% - 44px);
  }


  .pdr-eyebrow {
    margin-bottom: 10px;

    font-size: 8px;
  }


  .pdr-heading {
    font-size:
      clamp(31px, 9.5vw, 43px);

    line-height: 0.98;
  }


  .pdr-description {
    max-width: 340px;

    margin-top: 13px;

    font-size: 12px;
    line-height: 1.45;
  }


  .pdr-counter {
    right: 7px;

    grid-template-rows:
      auto
      105px
      auto;
  }


  .pdr-counter-line {
    height: 105px;
  }


  .pdr-scroll-note {
    left: 14px;
    bottom: 15px;

    font-size: 8px;
  }


  .pdr-scroll-note i {
    width: 35px;
  }

}






/* =========================================================
   PDR CLINIC VIDEO BACKGROUND
========================================================= */

#visual-journey {
  position: relative;
}


/* ---------------------------------------------------------
   STICKY VIEWPORT

   Keep your existing sticky behaviour.
   isolation prevents these z-indexes leaking into other
   website sections.
--------------------------------------------------------- */

#visual-journey .pdr-sticky {
  position: sticky;
  top: 0;

  width: 100%;
  height: 100vh;
 

  overflow: hidden;

  isolation: isolate;

  /*
   * IMPORTANT:
   * Don't use an opaque background here above the video.
   */
  background: #000;
}


/* =========================================================
   VIDEO: BOTTOM LAYER
========================================================= */

#visual-journey .pdr-clinic-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 0;

  overflow: hidden;

  pointer-events: none;
}


#visual-journey .pdr-clinic-video__media {
  position: absolute;
  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  /*
   * Slight crop prevents edges appearing
   * while the viewport changes size.
   */
  transform: scale(1.025);

  /*
   * Start slightly visible.
   * Increase brightness to 0.70 if you want
   * the clinic to appear more clearly.
   */
  filter:
    brightness(0.58)
    contrast(1.08)
    saturate(0.72);

  opacity: 1;
}


/* =========================================================
   VIDEO DARK OVERLAY
========================================================= */

#visual-journey .pdr-clinic-video__overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:

    /*
     * Darken the lower centre because your title sits there.
     */
    radial-gradient(
      ellipse at 50% 70%,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.24) 40%,
      rgba(0, 0, 0, 0.08) 70%
    ),

    /*
     * Keep the outer edges cinematic.
     */
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.04) 25%,
      rgba(0, 0, 0, 0.36) 70%,
      rgba(0, 0, 0, 0.64) 100%
    ),

    /*
     * Smooth top/bottom transition.
     */
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.52) 0%,
      rgba(0, 0, 0, 0.08) 24%,
      rgba(0, 0, 0, 0.10) 68%,
      rgba(0, 0, 0, 0.63) 100%
    );
}


/* =========================================================
   EXISTING PDR BACKGROUND
========================================================= */

#visual-journey .pdr-bg {
  position: absolute;
  inset: 0;

  z-index: 2;

  pointer-events: none;

  /*
   * CRITICAL:
   * Your existing pdr-bg must not paint solid black
   * over the video.
   */
  background: transparent !important;
}


/*
 * Keep your existing orbs, but weaker because
 * we now have real movement in the background.
 */

#visual-journey .pdr-orb {
  opacity: 0.28;
}


/* =========================================================
   PORTRAIT PANEL SCENE
========================================================= */

#visual-journey .pdr-scene {
  position: absolute;
  inset: 0;

  z-index: 5;

  pointer-events: none;

  /*
   * CRITICAL:
   * Remove any existing solid background.
   */
  background: transparent !important;
}


#visual-journey .pdr-world {
  position: absolute;

  z-index: 1;
}


/*
 * Helps your cards separate from the moving clinic.
 */

#visual-journey .pdr-panel {
  filter:
    drop-shadow(
      0 26px 42px rgba(0, 0, 0, 0.46)
    );
}


/* =========================================================
   TITLE / DESCRIPTION
========================================================= */

#visual-journey .pdr-copy {
  z-index: 10;
}


/*
 * Optional subtle shadow so your existing white heading
 * remains readable over bright areas of the video.
 */

#visual-journey .pdr-heading {
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.50);
}


#visual-journey .pdr-description {
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.65);
}


/* =========================================================
   COUNTER + SCROLL INDICATOR
========================================================= */

#visual-journey .pdr-counter {
  z-index: 12;
}


#visual-journey .pdr-scroll-note {
  z-index: 12;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  #visual-journey .pdr-clinic-video__media {
    /*
     * Landscape source video will naturally crop on phones.
     * Change 55% depending on where the dentist appears.
     */
    object-position: 55% center;

    transform: scale(1.05);

    filter:
      brightness(0.46)
      contrast(1.08)
      saturate(0.66);
  }

#visual-journey .pdr-sticky {
  position: sticky;
  top: 0;

  width: 100%;
  height: 50vh;
 

  overflow: hidden;

  isolation: isolate;

  /*
   * IMPORTANT:
   * Don't use an opaque background here above the video.
   */
  background: #000;
}

  #visual-journey .pdr-clinic-video__overlay {
    background:

      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.12) 25%,
        rgba(0, 0, 0, 0.25) 52%,
        rgba(0, 0, 0, 0.78) 100%
      ),

      radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.05) 20%,
        rgba(0, 0, 0, 0.48) 100%
      );
  }


  #visual-journey .pdr-orb {
    opacity: 0.18;
  }

}


/* =========================================================
   SMALL PHONE
========================================================= */

@media (max-width: 390px) {

  #visual-journey .pdr-clinic-video__media {
    object-position: 58% center;

    filter:
      brightness(0.40)
      contrast(1.08)
      saturate(0.62);
  }

}





