

/* ==================================================
   About Dan
   ================================================== */

.about-dan {
  overflow: hidden;
  background: var(--surface-soft);
}

.about-dan__grid {
  display: grid;
  grid-template-columns:
    minmax(300px, 0.82fr)
    minmax(0, 1.18fr);

  align-items: center;

  gap: clamp(48px, 7vw, 90px);
}

.about-dan__visual {
  min-width: 0;
}


/* ==================================================
   Dan / Character comparison slider
   ================================================== */

.image-compare {
  --position: 60%;

  position: relative;

  overflow: hidden;

  width: 100%;

  aspect-ratio: 4 / 5;

  border: 2px solid var(--ink);
  border-radius: var(--radius);

  background: var(--ink);

  isolation: isolate;
}


/* Both images always remain full-size */

.image-compare__image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  user-select: none;
  pointer-events: none;
}


/* Real photo sits underneath */

.image-compare__image--real {
  z-index: 1;
}


/* Character sits on top and is clipped */

.image-compare__image--character {
  z-index: 2;

  clip-path: inset(
    0
    calc(100% - var(--position))
    0
    0
  );
}


/* Divider line */

.image-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--position);

  z-index: 4;

  width: 3px;

  background: rgba(255, 255, 255, 0.95);

  transform: translateX(-50%);

  pointer-events: none;
}


/* Slider handle */

.image-compare__handle {
  display: grid;
  place-items: center;

  position: absolute;
  top: 50%;
  left: var(--position);

  z-index: 5;

  width: 56px;
  height: 56px;

  border: 3px solid #fff;
  border-radius: 50%;

  background: var(--ink);
  color: #fff;

  transform: translate(-50%, -50%);

  box-shadow:
    0 5px 18px rgba(0, 0, 0, 0.24);

  pointer-events: none;
}


/* Left arrow */

.image-compare__handle::before {
  width: 10px;
  height: 10px;

  position: absolute;
  left: 12px;

  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;

  transform: rotate(45deg);

  content: "";
}


/* Right arrow */

.image-compare__handle::after {
  width: 10px;
  height: 10px;

  position: absolute;
  right: 12px;

  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;

  transform: rotate(45deg);

  content: "";
}


/* Labels */

.image-compare__label {
  position: absolute;
  top: 16px;

  z-index: 6;

  padding: 8px 11px;

  border-radius: 999px;

  background: rgba(35, 51, 71, 0.9);
  color: #fff;

  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;

  backdrop-filter: blur(8px);

  pointer-events: none;
}

.image-compare__label--character {
  left: 16px;
}

.image-compare__label--real {
  right: 16px;
}


/*
  Invisible range control gives us:
  - mouse support
  - touch support
  - keyboard support
  - accessibility
*/

.image-compare__range {
  position: absolute;
  inset: 0;

  z-index: 10;

  width: 100%;
  height: 100%;

  margin: 0;

  opacity: 0;

  cursor: ew-resize;
}

.image-compare__focus {
  position: absolute;
  inset: 0;

  z-index: 9;

  border-radius: inherit;

  pointer-events: none;
}

.image-compare__range:focus-visible
  + .image-compare__focus {

  outline: 4px solid var(--orange);
  outline-offset: -7px;
}


/* Small explanation under slider */

.about-dan__visual-note {
  display: flex;
  align-items: center;
  gap: 9px;

  margin: 14px 0 0;

  color: var(--muted);

  font-size: 0.78rem;
  font-weight: 600;
}

.about-dan__visual-note::before {
  width: 7px;
  height: 7px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--orange);

  content: "";
}


/* ==================================================
   About copy
   ================================================== */

.about-dan__copy {
  min-width: 0;
}

.about-dan__copy .section-title {
  margin-bottom: 26px;
}

.about-dan__lead {
  max-width: 700px;
  margin: 0 0 18px;

  color: var(--ink);

  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.65;
}

.about-dan__text {
  max-width: 680px;
  margin: 0;

  color: var(--muted);

  font-size: 1rem;
  line-height: 1.75;
}



/* ==================================================
   CTA
   ================================================== */

.about-dan__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin: 2rem 0;
}


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

@media (max-width: 950px) {

  .about-dan__grid {
    grid-template-columns:
      minmax(250px, 0.8fr)
      minmax(0, 1.2fr);

    gap: 42px;
  }

  .about-dan__trust {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 720px) {

  .about-dan__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-dan__visual {
    width: min(100%, 500px);
  }

  .about-dan__trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


@media (max-width: 520px) {

  .image-compare__handle {
    width: 48px;
    height: 48px;
  }

  .image-compare__handle::before {
    left: 9px;
  }

  .image-compare__handle::after {
    right: 9px;
  }

  .image-compare__label {
    top: 12px;

    padding: 7px 9px;

    font-size: 0.64rem;
  }

  .image-compare__label--character {
    left: 12px;
  }

  .image-compare__label--real {
    right: 12px;
  }

  .about-dan__trust {
    grid-template-columns: 1fr;
  }

  .about-dan__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .about-dan__actions .button {
    width: 100%;
  }

}
