@import url("./common.css");

.red-dist-page {
  padding-bottom: 4rem;
}

.red-dist-intro {
  max-width: 58ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.red-dist-spacer {
  min-height: 115vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-bottom: 2.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 40%);
}

.red-dist-spacer p {
  margin: 0;
  max-width: 36ch;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.red-dist-stack {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ─── Card (from raggededge-scroll-distortion-effect.md) ─── */
.cs-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}

.cs-card__body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(70vh, 520px);
}

@media (min-width: 720px) {
  .cs-card__body {
    grid-template-columns: 36% 64%;
    min-height: min(65vh, 560px);
  }
}

.cs-card__text {
  position: relative;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  background: #fff;
  border-bottom-left-radius: 16px;
  order: 2;
}

@media (min-width: 720px) {
  .cs-card__text {
    order: 0;
    padding: 2rem 1.75rem;
  }
}

/* Concave notch: white quarter-circle overlays the image corner */
.cs-card__text::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -24px;
  width: 48px;
  height: 48px;
  background: #fff;
  border-bottom-left-radius: 48px;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 719px) {
  .cs-card__text::after {
    display: none;
  }
}

.cs-card__client {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.cs-card__tagline {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #3a3a3a;
  margin: 0;
  flex: 1;
}

.cs-card__stat {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.cs-card.is-revealed .cs-card__stat {
  opacity: 1;
  transform: translateY(0);
}

.cs-card__stat-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cs-card__stat-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.cs-card__image {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  order: 1;
  will-change: clip-path;
}

/* High-contrast panel (like ZOE) so the wavy bottom reads clearly */
.cs-card__image.re-demo-yellow {
  background: #ffd400;
}

@media (min-width: 720px) {
  .cs-card__image {
    order: 0;
    min-height: 0;
  }
}

.cs-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
  z-index: 1;
}

.cs-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  --re-float: 0;
  transform: translateY(calc(var(--re-float) * 1px)) scale(1.08);
  transform-origin: center 58%;
  will-change: transform;
}

.red-dist-note {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .cs-card__stat {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
