:root{
  --bg: #050608;
  --line: rgba(255,255,255,0.92);
  --handle-bg: #fa4e00;
  --handle-ring: rgba(255,255,255,0.9);
  --shadow: rgba(0,0,0,0.45);
}

*{ box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body{
  background: var(--bg);
  overflow: hidden;
  font-family: var(--font-inter);
}

.five-compare{
  width: 100%;
  height: 100vh;
  position: relative;
  --scroll-label-bg: rgba(255, 255, 255, 0.9);
  --scroll-label-color: #0f1114;
  --scroll-arrow-color: #ffffff;
}

.five-compare__stage{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.five-compare__headline{
  position: absolute;
  top: clamp(1rem, 3vh, 2.5rem);
  left: 0;
  right: 0;
  z-index: 12;
  width: 100%;
  text-align: center;
  font-family: var(--font-anton);
  font-size: clamp(1.6rem, 6vw, 4.6rem);
  letter-spacing: 0.04em;
  color: #ffffff;
  pointer-events: none;
}

/* frames fill the section */
.five-compare__frame{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* AFTER clip wrapper: we control width via JS */
.five-compare__afterClip{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 calc(100% - var(--after-pct, 90%)) 0 0);
  will-change: clip-path;
}

/* divider sits at the clip boundary */
.five-compare__divider{
  position: absolute;
  top: 0;
  left: 90%;         /* default; JS updates */
  height: 100%;
  width: 0;
  z-index: 10;
  outline: none;
  user-select: none;
  touch-action: none; /* important for mobile dragging */
}

/* the vertical line */
.five-compare__line{
  position: absolute;
  top: 0;
  left: -1px;
  width: 2px;
  height: 100%;
  background: var(--line);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

/* handle button */
.five-compare__handle{
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid var(--handle-ring);
  background: var(--handle-bg);
  display: grid;
  place-items: center;
  cursor: grab;
  box-shadow: 0 14px 30px var(--shadow);
  padding: 0;
}

.five-compare__handle:active{
  cursor: grabbing;
}
.five-compare__handle:focus-visible{
  outline: 3px solid rgba(255,255,255,0.35);
  outline-offset: 4px;
}

/* chevrons inside */
.five-compare__chev{
  position: absolute;
  width: 10px;
  height: 10px;
  border-right: 3px solid rgba(255,255,255,0.95);
  border-bottom: 3px solid rgba(255,255,255,0.95);
  opacity: 0.95;
}

.five-compare__chev--left{
  left: 17px;
  transform: rotate(135deg);
}

.five-compare__chev--right{
  right: 17px;
  transform: rotate(-45deg);
}

/* small labels near the line (optional) */
.five-compare__labels{
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.five-compare__label{
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  margin-top: 40px;
}

.five-compare__label--before{
  transform: translateX(5px);
}

.five-compare__label--after{
  transform: translateX(50px);
}

.five-compare .scroll-indicator{
  position: absolute;
  left: 50%;
  bottom: var(--scroll-indicator-bottom, clamp(1.6rem, 4vh, 2.8rem));
  transform: translate(-50%, 8px) scale(var(--scroll-indicator-scale, 1));
}

.five-compare .scroll-indicator.revealed{
  transform: translate(-50%, 0) scale(var(--scroll-indicator-scale, 1));
}

/* slightly smaller handle on small screens */
@media (max-width: 520px){
  .five-compare__handle{
    width: 48px;
    height: 48px;
  }
  .five-compare__chev--left{ left: 14px; }
  .five-compare__chev--right{ right: 14px; }
}

@media (max-width: 900px){
  .five-compare__headline{
    font-size: clamp(1.4rem, 7vw, 3rem);
    top: 1rem;
  }

  .five-compare__labels{
    top: clamp(3.5rem, 9vh, 5.5rem);
    gap: 6px;
  }

  .five-compare__label{
    font-size: 0.6rem;
    letter-spacing: 0.22em;
  }
}

@media (max-width: 600px){
  .five-compare__labels{
    display: none;
  }
}