/* ============================================================================
   LUTS  —  the "luts." before/after gallery
   Normal scrolling page, one section per LUT.
   ========================================================================== */

.page-luts {
  --compare-ratio: 16 / 9;  /* JS overrides this from config.js */

  min-height: 100vh;
  padding-block: 4vmin 12vmin;
}

.page-luts .top-bar {
  margin-bottom: 6vmin;
}

.luts__intro {
  margin-bottom: 8vmin;
}

.luts__title {
  font-size: clamp(4rem, 14vmin, 12rem);
}

.luts__lede {
  max-width: 64ch;
  margin-top: 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.luts__list {
  display: flex;
  flex-direction: column;
  gap: 12vmin;
}

/* --- One LUT ------------------------------------------------------------- */

.lut {
  display: flex;
  flex-direction: column;
  gap: 2.5vmin;
}

.lut__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3vmin;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.6vmin;
}

.lut__meta {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.lut__index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--text-ghost);
}

.lut__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vmin, 4rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
}

.lut__description {
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* Sits right of the heading. Wraps rather than squashing the buttons when
   the header runs out of room. */
.lut__downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.lut__download {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-color: var(--accent-line);
  padding: 0.75rem 1.2rem;
  white-space: nowrap;
}

/* --- Before / after slider ----------------------------------------------- */

.compare {
  position: relative;
  width: 100%;
  aspect-ratio: var(--compare-ratio);
  overflow: hidden;
  background: var(--surface);
  cursor: ew-resize;
  user-select: none;

  /* pan-y instead of none: horizontal drags are captured by the slider,
     vertical swipes still scroll the page on a phone. */
  touch-action: pan-y;

  /* Each LUT sets its own border tint via --lut-accent. */
  border: 0.4vmin solid var(--lut-accent, var(--accent-line));
}

.compare__pane {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* The "before" layer sits on top and is clipped from the right. */
.compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.compare__tag {
  position: absolute;
  bottom: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-overlay);
  text-shadow: var(--shadow-text);
  pointer-events: none;
  z-index: 4;
}

.compare__tag--before { left: 1.2rem; }
.compare__tag--after  { right: 1.2rem; }

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-bright);
  transform: translateX(-0.5px);
  pointer-events: none;
  z-index: 5;
}

.compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.2rem;
  height: 3.2rem;
  margin: -1.6rem 0 0 -1.6rem;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.25);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text);
}
