/* The home page: a before-and-after slider hero and the "Made for" strip, on top of
   /css/site.css. (Started as the /it1 iteration.) */

/* The slider sweep is this page's one motion, so the headline bar is simply there. The
   word under it takes the app's accent. */
.hero-home .covered-word { color: var(--tangerine); }
.hero-home .covered-word::after { animation: none; transform: rotate(-5deg); }
.hero-home h1 { font-size: clamp(46px, 4.7vw, 72px); }
.nowrap { white-space: nowrap; }

.compare { margin: 0; }
.compare-frame {
  --pos: 100%;   /* share of the photo, from the left, that shows the covered copy */
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--graphite);
  box-shadow: 0 0 0 1px var(--hairline), 0 50px 90px -40px rgb(0 0 0 / 0.9);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.compare.is-live .compare-frame { cursor: ew-resize; }
.compare-frame:has(.compare-range:focus-visible) { outline: 3px solid var(--tangerine); outline-offset: 3px; }
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare-original { clip-path: inset(0 0 0 var(--pos)); }

.compare-handle, .compare-tag { display: none; }
.compare.is-live .compare-handle, .compare.is-live .compare-tag { display: block; }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 0;
  pointer-events: none;
}
.compare-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 14px rgb(0 0 0 / 0.45);
}
/* The grip: the app's gradient pill with left and right chevrons. */
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -26px;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 50%;
  background:
    url("/img/slider-arrows.svg") center / 26px no-repeat,
    var(--accent);
  box-shadow: 0 0 0 3px #fff, 0 10px 26px rgb(0 0 0 / 0.5);
}
.compare-tag {
  position: absolute;
  bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgb(10 10 13 / 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  font: 700 14px/1 var(--display);
  pointer-events: none;
}
.compare-tag-covered { left: 14px; }
.compare-tag-original { right: 14px; }

.compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-top: 18px;
}
.compare-hint { font-size: 15px; color: var(--text-2); }
.compare figcaption { margin-top: 14px; font-size: 14px; color: var(--text-3); }

/* Made for: four situations, each shown in a different style */

.made-for {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-space);
}
.cases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}
.case img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  background: var(--graphite);
  box-shadow: 0 0 0 1px var(--hairline);
}
.case h3 { margin-top: 18px; font-size: 22px; }
.case p { margin-top: 8px; font-size: 16px; color: var(--text-2); }

@media (max-width: 1000px) {
  /* One column: headline, then the slider, then the copy (as on the home page). */
  .hero-home .compare { order: 2; margin-top: 32px; }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .compare-controls { flex-direction: column; align-items: stretch; }
  .compare-hint { text-align: center; }
  .cases {
    display: flex;
    gap: 14px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .cases::-webkit-scrollbar { display: none; }
  .case { flex: none; width: 72vw; scroll-snap-align: start; }
}
