/* Curtain Slider - full-bleed drop-in image slider. Advancing runs a
   direction-aware clip-path curtain wipe on the incoming layer paired with a
   slide-in, while the outgoing layer counter-drifts and darkens. No Webflow -
   CSS variables + @font-face allowed. */

.cs_wrap {
  --cs-bg: #121212;
  --cs-tile: #1c1c1b;
  --cs-fg: #f2f2ef;
  --cs-grey: #7c7c78;
  --cs-line: rgba(255, 255, 255, 0.14);
  --cs-line-on: #f2f2ef;
  --cs-focus: rgba(255, 255, 255, 0.35);
  --cs-accent: #33452d;
  --cs-on-accent: #dee1da;
  --cs-margin: clamp(20px, 2.8vw, 48px);
  --cs-gutter: clamp(12px, 1.4vw, 24px);
  --cs-col: calc((100% - 2 * var(--cs-margin, 40px) - 11 * var(--cs-gutter, 20px)) / 12);
  --cs-display: clamp(40px, 4.2vw, 80px);
  --cs-label: clamp(18px, 1.4vw, 28px);
  --cs-sans: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
  --cs-serif: 'Geist Serif', Georgia, serif;
}

.cs_wrap {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--cs-bg, #121212);
  color: var(--cs-fg, #f2f2ef);
  font-family: var(--cs-sans, 'Switzer', sans-serif);
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
  outline: none;
}

.cs_slides {
  display: none;
}

.cs_stage {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---- Image layers: each layer is N column strips. A strip is an
   overflow-hidden mask; its inner is the full stage rect offset left so
   the strips reassemble one seamless cover-fit photo. Strip left/width
   and inner left/width are integer-snapped px, set by JS. ---- */
.cs_layers {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cs_layer {
  position: absolute;
  inset: 0;
}

/* No will-change here on purpose: promoting all strips to their own
   compositor layers caused tile-rasterization churn on 120Hz retina
   fullscreen (flashing rectangles during the wipe). The shipped
   wipe-slider/step-wipe clip wipes run clean with zero will-change. */
.cs_strip {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
}

.cs_strip_inner {
  position: absolute;
  top: 0;
  height: 100%;
}

.cs_layer_img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: 50% 50%;
}

/* Per-strip darkening overlay - dimming tweens THIS element's opacity
   (GPU-composited) instead of filter: brightness on the image (animated
   filters repaint per frame and flicker at fullscreen retina). */
.cs_shade {
  position: absolute;
  inset: 0;
  background: #121212;
  opacity: 0;
  pointer-events: none;
}

/* ---- Scrim for text legibility ---- */
.cs_scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.6) 0%, rgba(18, 18, 18, 0.05) 45%, rgba(18, 18, 18, 0.3) 100%);
  pointer-events: none;
}

/* ---- Label, top-left ---- */
.cs_label {
  position: absolute;
  left: var(--cs-margin);
  top: var(--cs-margin);
  z-index: 4;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: rgba(242, 242, 239, 0.7);
  pointer-events: none;
}

.cs_label_line {
  position: relative;
  display: block;
  white-space: nowrap;
  width: max-content;
  overflow: hidden;
}

/* ---- Display title, bottom-left ---- */
.cs_title {
  position: absolute;
  left: var(--cs-margin);
  bottom: var(--cs-margin);
  z-index: 4;
  margin: 0;
  font-family: var(--cs-serif, Georgia, serif);
  font-size: var(--cs-display, 60px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--cs-fg, #f2f2ef);
  width: max-content;
  max-width: calc(100% - var(--cs-margin) * 2);
  pointer-events: none;
}

.cs_title_line {
  position: relative;
  display: block;
  white-space: nowrap;
  width: max-content;
  overflow-x: visible;
  overflow-y: hidden;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}

.cs_title_char {
  position: relative;
  display: inline-block;
}

/* ---- Index roller, bottom-right ---- */
.cs_index {
  position: absolute;
  right: var(--cs-margin);
  bottom: var(--cs-margin);
  z-index: 4;
  display: flex;
  /* center, not baseline: an overflow-hidden digit box's flex baseline is
     its BOTTOM edge, which rides the rollers up relative to the divider */
  align-items: center;
  line-height: 1;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(242, 242, 239, 0.7);
  pointer-events: none;
}

.cs_digit_wrap {
  position: relative;
  display: inline-block;
  overflow-x: visible;
  overflow-y: hidden;
  height: 1em;
  width: 0.62em;
  vertical-align: top;
}

.cs_digit_roller {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
}

.cs_digit_roller span {
  display: block;
  height: 1em;
  line-height: 1;
}

.cs_index_divider {
  display: inline-block;
  margin: 0 0.25em;
  color: rgba(242, 242, 239, 0.4);
  line-height: 1;
}

.cs_index_total {
  display: inline-block;
  line-height: 1;
}

/* ---- Progress hairline, top edge ---- */
.cs_progress {
  position: absolute;
  left: var(--cs-margin);
  right: var(--cs-margin);
  top: 24px;
  z-index: 4;
  height: 1px;
  background: var(--cs-line, rgba(255, 255, 255, 0.14));
  overflow: hidden;
}

.cs_progress_fill {
  position: absolute;
  inset: 0;
  background: var(--cs-line-on, #f2f2ef);
  transform: scaleX(0);
}

/* ---- Control pill, bottom center ---- */
.cs_pill {
  position: absolute;
  left: 50%;
  bottom: 40px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--cs-gutter, 20px);
  transform: translateX(-50%);
}

.cs_arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--cs-line, rgba(255, 255, 255, 0.14));
  background: var(--cs-bg, #121212);
  color: var(--cs-fg, #f2f2ef);
  cursor: pointer;
  transition: background-color 0.35s cubic-bezier(0.3, 0.9, 0.1, 1), color 0.35s cubic-bezier(0.3, 0.9, 0.1, 1);
}

.cs_arrow:hover {
  background: var(--cs-fg, #f2f2ef);
  color: var(--cs-bg, #121212);
}

.cs_arrow:focus-visible {
  outline: 1px solid var(--cs-focus, rgba(255, 255, 255, 0.35));
  outline-offset: 2px;
}

.cs_arrow_icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

/* ---- Screen-reader-only live region ---- */
.cs_live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Outgoing text lines get lifted onto an absolute overlay inside the same
   element so the exit tween keeps running while the new line animates in.
   Declared LAST: it must win the cascade against the *_line rules above
   (equal specificity - source order decides). */
.cs_line_out {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  min-width: 100%;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
  .cs_title {
    font-size: clamp(36px, 12vw, 64px);
    max-width: calc(100% - var(--cs-margin) * 2 - 60px);
  }

  .cs_index {
    display: none;
  }

  .cs_progress {
    top: 16px;
  }

  .cs_pill {
    left: auto;
    right: var(--cs-margin, 20px);
    bottom: var(--cs-margin, 20px);
    transform: none;
  }
}
