/* ==========================================================================
   JP Web Solutions - Website Revamp landing page
   Builds on page-cro.css and page-wdd.css. Sections unique to this page
   are prefixed rev-.
   ========================================================================== */

/* ---------- Hero ---------- */
.rev-hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 214px 0 110px;
  border-radius: 20px;
  background: var(--jp-secondary);
  color: var(--jp-text);
}
.rev-hero-title {
  margin: 0 0 24px;
  font-size: 70px;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--jp-dark);
}
.rev-hero-title span {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.rev-hero-title span::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 6px;
  z-index: -1;
  height: 0.38em;
  border-radius: 6px;
  background: var(--jp-primary);
}
.rev-hero-text {
  max-width: 560px;
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.6;
}
.rev-hero .cro-hero-points {
  margin-bottom: 30px;
}
.rev-hero-compare {
  margin: 0;
}
.rev-hero-compare .rev-ba {
  box-shadow: 0 40px 80px rgba(5, 5, 5, 0.18);
}
.rev-hero-compare figcaption,
.rev-pair figcaption {
  margin-top: 16px;
  font-size: 14px;
}
.rev-hero-compare figcaption strong,
.rev-pair figcaption strong {
  margin-right: 8px;
  color: var(--jp-dark);
}

/* ---------- Before and after slider ---------- */
.rev-ba {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border: 6px solid var(--jp-white);
  border-radius: 16px;
  background: var(--jp-white);
  aspect-ratio: 1100 / 611;
  user-select: none;
  touch-action: pan-y;
}
.rev-ba-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
.rev-ba > .rev-ba-img {
  position: absolute;
  inset: 0;
}
.rev-ba-before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.rev-ba-before .rev-ba-img {
  filter: saturate(0.85);
}
.rev-ba::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--jp-primary);
  box-shadow: 0 0 12px rgba(5, 5, 5, 0.3);
  pointer-events: none;
}
.rev-ba-handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--jp-primary);
  color: var(--jp-dark);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(5, 5, 5, 0.3);
  pointer-events: none;
  transition: transform 0.2s;
}
.rev-ba:hover .rev-ba-handle {
  transform: scale(1.08);
}
.rev-ba-tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.rev-ba-tag-before {
  left: 14px;
  background: rgba(5, 5, 5, 0.75);
  color: var(--jp-white);
}
.rev-ba-tag-after {
  right: 14px;
  background: var(--jp-primary);
  color: var(--jp-dark);
}
.rev-ba-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.rev-ba:has(.rev-ba-range:focus-visible) .rev-ba-handle {
  outline: 3px solid var(--jp-dark);
  outline-offset: 3px;
}

/* ---------- Checklist ---------- */
.rev-check {
  padding: 120px 0;
}
.rev-check-intro {
  margin: 20px 0 28px;
}
.rev-check-result {
  margin-top: 20px;
  padding: 28px;
  border-radius: 16px;
  background: var(--jp-secondary);
  transition: background 0.3s;
}
.rev-check-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
.rev-check-result p {
  flex: 1 1 220px;
  margin: 0;
  color: var(--jp-dark);
  font-weight: 500;
}
.rev-check-score {
  color: var(--jp-text);
  font-family: var(--tj-ff-heading);
  font-size: 22px;
}
.rev-check-score strong {
  color: var(--jp-dark);
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.rev-check-result.is-mid {
  background: #fff4d6;
}
.rev-check-result.is-high {
  background: var(--cro-ink);
}
.rev-check-result.is-high p,
.rev-check-result.is-high .rev-check-score,
.rev-check-result.is-high .rev-check-score strong {
  color: var(--jp-white);
}
.rev-check-score {
  flex: 0 0 auto;
}
.rev-check-btn {
  flex: 0 0 auto;
}
.rev-check-btn[hidden] {
  display: none;
}
.rev-check-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}
.rev-check-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--jp-border);
  border-radius: 14px;
  background: var(--jp-white);
  color: var(--jp-dark);
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rev-check-item:hover {
  border-color: var(--jp-dark);
}
.rev-check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rev-check-box {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid #c9cac4;
  border-radius: 8px;
  color: transparent;
  font-size: 11px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.rev-check-item input:checked + .rev-check-box {
  border-color: var(--jp-dark);
  background: var(--jp-dark);
  color: var(--jp-primary);
}
.rev-check-item:has(input:checked) {
  border-color: var(--jp-primary);
  background: rgba(211, 237, 49, 0.12);
}
.rev-check-item input:focus-visible + .rev-check-box {
  outline: 3px solid var(--jp-dark);
  outline-offset: 2px;
}

/* ---------- Gallery ---------- */
.rev-gallery {
  padding: 120px 0;
  border-radius: 16px;
  background: var(--jp-secondary);
}
.rev-pair {
  margin: 0;
}
.row > .rev-pair-wide {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ---------- Keep and upgrade ---------- */
.rev-keep {
  padding: 120px 0;
}
.rev-keep-card {
  padding: 40px;
  border: 1px solid var(--jp-border);
  border-radius: 16px;
  background: var(--jp-white);
}
.rev-keep-card h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  font-size: 26px;
}
.rev-keep-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--jp-secondary);
  color: var(--jp-dark);
  font-size: 20px;
}
.rev-keep-card-dark {
  border-color: var(--cro-ink);
  background: var(--cro-ink);
}
.rev-keep-card-dark h3,
.rev-keep-card-dark .cro-check-list li {
  color: var(--jp-white);
}
.rev-keep-card-dark .rev-keep-icon {
  background: var(--jp-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Mobile */
@media (max-width: 767px) {
  .rev-hero {
    padding: 130px 0 60px;
    border-radius: 12px;
  }
  .rev-hero-title {
    font-size: 42px;
  }
  .rev-hero-text {
    font-size: 16px;
  }
  .rev-ba {
    border-width: 4px;
    border-radius: 12px;
  }
  .rev-ba-handle {
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    font-size: 11px;
  }
  .rev-ba-tag {
    top: 10px;
    padding: 4px 10px;
    font-size: 11px;
  }
  .rev-ba-tag-before {
    left: 10px;
  }
  .rev-ba-tag-after {
    right: 10px;
  }
  .rev-check,
  .rev-gallery,
  .rev-keep {
    padding: 70px 0;
  }
  .rev-gallery {
    border-radius: 12px;
  }
  .rev-check-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rev-check-item {
    padding: 14px 16px;
    font-size: 15px;
  }
  .rev-check-result {
    padding: 22px;
  }
  .rev-check-btn {
    width: 100%;
    justify-content: space-between;
  }
  .rev-keep-card {
    padding: 28px 22px;
  }
  .rev-keep-card h3 {
    font-size: 22px;
  }
}

/* ios */
@media (max-width: 340px) {
  .rev-hero-title {
    font-size: 34px;
  }
}

/* windows */
@media (min-width: 451px) and (max-width: 767px) {
  .rev-hero-title {
    font-size: 50px;
  }
  .rev-check-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* tab portrait view */
@media (min-width: 768px) and (max-width: 991px) {
  .rev-hero {
    padding: 160px 0 80px;
    border-radius: 12px;
  }
  .rev-hero-title {
    font-size: 58px;
  }
  .rev-check,
  .rev-gallery,
  .rev-keep {
    padding: 90px 0;
  }
  .rev-gallery {
    border-radius: 12px;
  }
}

/* tab landscape */
@media (min-width: 992px) and (max-width: 1199px) {
  .rev-hero {
    padding: 190px 0 90px;
  }
  .rev-hero-title {
    font-size: 54px;
  }
  .rev-check,
  .rev-gallery,
  .rev-keep {
    padding: 100px 0;
  }
  .rev-check-item {
    font-size: 15px;
  }
}

/* Laptop (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .rev-hero-title {
    font-size: 62px;
  }
}
