/* ==========================================================================
   Sneak peek — before / after slider
   1:1 port of the .sneak-peek section on dsgnmate.webflow.io
   --------------------------------------------------------------------------
   The reference uses a stock Webflow slider (data-animation="slide",
   500ms ease, infinite, swipe on, autoplay off, 6px nav spacing). Its
   behaviour is reimplemented in js/peek-slider.js; the styles below are the
   Webflow slider defaults plus the site's overrides, flattened together.

   No scroll interactions here — neither the IX2 nor the IX3 payload
   references this section.

   Scoped to .section-peek so the shared .container / .section classes used
   by the other, not-yet-ported sections keep their current styling.
   ========================================================================== */

/* The reference's .section carries no padding at all — the slider sits flush
   against the section above it. Overrides the shared .section rule in main.css. */
.section-peek {
  display: block;
  height: auto;
  padding: 4rem 0 0;
}

/* --------------------------------------------------------------------------
   Section heading — same face and size as the hero headline
   -------------------------------------------------------------------------- */
.section-peek .peek-heading {
  margin: 0 0 2rem;
  color: var(--color-navy-primary);
  font-family: var(--font-family-display);
  font-size: 40px;
  font-weight: var(--font-weight-normal);
  line-height: 1.2;
  letter-spacing: -.03em;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Slider shell
   -------------------------------------------------------------------------- */
.sneak-peek {
  position: relative;
  height: 100%;
  background-color: #edecea;
  text-align: center;
  clear: both;
  -webkit-tap-highlight-color: transparent;
  /* Swipe/drag works via Pointer Events (js/peek-slider.js) on touch, mouse
     and pen. Set on the whole component, not just the mask: the arrow
     buttons don't opt into it themselves, and a touch starting on their
     hit area would otherwise be claimed by the browser for native
     scrolling and cancelled before our drag logic ever sees it. pan-y
     still leaves vertical page scroll to the browser. */
  touch-action: pan-y;
}

.sneak-peek .slider-mask {
  position: relative;
  z-index: 1;
  left: 0;
  right: 0;
  display: block;
  height: 100%;
  white-space: nowrap;
  overflow: hidden;
  cursor: grab; /* affordance — mouse users can drag too */
}

.sneak-peek .slider-mask:active { cursor: grabbing; }

.sneak-peek .peek-slide {
  position: relative;
  display: inline-block;
  vertical-align: top;
  width: 100%;
  height: 100%;
  white-space: normal;
  text-align: left;
}

/* The tall mobile crop is the default; the wide desktop artwork takes over
   from 768px up. The reference swaps at 479px instead, which leaves 480-767px
   rendering the desktop crop at ~424-712px wide — too small to read the
   before/after mockups. Move this back to 479px for literal parity. */
.sneak-peek .peek-image {
  display: none;
  width: 100%;
  /* Required: the imgs carry width/height attributes to reserve layout space,
     so the height must be released back to the intrinsic ratio. */
  height: auto;
  max-width: 100%;
  margin-bottom: 20px;
  -webkit-user-drag: none;
  user-select: none;
}

.sneak-peek .peek-image.mobile {
  display: block;
}

/* --------------------------------------------------------------------------
   Arrows — 80px hit areas pinned to the slider edges, full height
   -------------------------------------------------------------------------- */
.sneak-peek .slider-arrow {
  position: absolute;
  inset: 0;
  width: 80px;
  margin: auto;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.sneak-peek .slider-arrow.is-left  { z-index: 3; right: auto; }
.sneak-peek .slider-arrow.is-right { z-index: 4; left: auto; }

.sneak-peek .slider-arrow:focus-visible {
  outline: 2px solid var(--color-navy-primary);
  outline-offset: -4px;
}

.sneak-peek .icon {
  position: absolute;
  inset: 0;
  width: 1em;
  height: 1em;
  margin: auto;
  color: var(--color-sciops-blue);
}

.sneak-peek .icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------------------------------
   Dot navigation
   -------------------------------------------------------------------------- */
.sneak-peek .slide-nav {
  position: block;
  inset: auto 0 0;
  z-index: 2;
  height: 40px;
  margin: auto;
  padding-top: 10px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.sneak-peek .slider-dot {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  /* data-nav-spacing="6" on the reference */
  margin: 0 6px .5em;
  padding: 0;
  border: 0;
  background-color: rgba(255, 255, 255, .4);
  color: inherit;
  cursor: pointer;
  transition: background-color .1s, color .1s;
}

.sneak-peek .slider-dot.is-active {
  background-color: #fff;
}

.sneak-peek .slider-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff;
}

/* --------------------------------------------------------------------------
   480px and up — the heading steps up with the hero (40px -> 80px)
   -------------------------------------------------------------------------- */
@media (min-width: 480px) {
  .section-peek .peek-heading {
    margin-bottom: 3rem;
    font-size: 80px;
  }
}

/* --------------------------------------------------------------------------
   768px and up — swap in the wide desktop artwork
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .sneak-peek .peek-image { display: block; }
  .sneak-peek .peek-image.mobile { display: none; }
}

/* --------------------------------------------------------------------------
   992px and up
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .section-peek { padding-top: 6rem; }

  .section-peek .peek-heading {
    font-size: 64px;
  }
}

/* --------------------------------------------------------------------------
   Below 480px — arrows drop to the foot of the slider (reference behaviour)
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .sneak-peek .icon { margin-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Reduced motion — jump between slides instead of sliding
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sneak-peek .peek-slide { transition: none !important; }
  .sneak-peek .slider-dot { transition: none; }
}
