/* /redesigns/ index: before/after cards. Builds on tokens.css and home.css. */

.rd-hero {
  padding-block: clamp(56px, 9vw, 112px) clamp(32px, 5vw, 64px);
}

.rd-hero__title {
  max-width: 15ch;
  margin: var(--s-4) 0 0;
  font-size: var(--t-3xl);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.rd-hero__title span {
  color: var(--green-ink);
}

.rd-hero__lead {
  max-width: 60ch;
  margin: var(--s-5) 0 0;
  color: var(--ink-2);
  font-size: var(--t-lg);
  line-height: 1.55;
}

.rd-hero__note {
  max-width: 68ch;
  margin: var(--s-5) 0 0;
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.6;
}

.rd-hero__note strong {
  color: var(--ink);
}

.rd-list {
  padding-bottom: var(--section);
}

.rd-list .wrap {
  display: grid;
  gap: clamp(72px, 10vw, 136px);
}

.rd-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.rd-card:nth-child(even) .rd-card__shots {
  order: 2;
}

/* Before sits behind and up-left; after overlaps it; the phone overlaps the after. */
.rd-card__shots {
  position: relative;
  padding: 0 7% 12% 0;
}

.rd-shot {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--sh-lg);
}

.rd-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.rd-shot figcaption {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--night);
  color: var(--on-night);
  font: 600 var(--t-xs) / 1.4 var(--font-ui);
}

.rd-shot--before {
  position: relative;
  width: 78%;
  filter: saturate(0.55);
  opacity: 0.9;
}

.rd-shot--after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80%;
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(12, 14, 18, 0.06), 0 36px 80px -28px rgba(12, 14, 18, 0.45);
}

.rd-shot--after figcaption {
  background: var(--rd-accent, var(--green));
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.rd-phone {
  position: absolute;
  right: -2%;
  bottom: -6%;
  width: 22%;
  height: auto;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  border: 5px solid var(--night);
  border-radius: 22px;
  background: var(--night);
  box-shadow: var(--sh-lg);
}

.rd-card__kind {
  margin: 0;
  color: var(--ink-3);
  font: 400 var(--t-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rd-card__body h2 {
  margin: var(--s-3) 0 0;
  font-size: var(--t-2xl);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.rd-card__body h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: var(--s-4);
  border-radius: 2px;
  background: var(--rd-accent, var(--green));
}

.rd-card__summary {
  margin: var(--s-4) 0 0;
  color: var(--ink-2);
  font-size: var(--t-md);
  line-height: 1.6;
}

.rd-card__changes {
  margin-top: var(--s-5);
}

.rd-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.rd-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
}

.rd-cta__inner > div {
  max-width: 40rem;
}

.rd-cta h2 {
  margin: var(--s-3) 0 0;
  font-size: var(--t-2xl);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.rd-cta p:not(.eyebrow) {
  margin: var(--s-4) 0 0;
  font-size: var(--t-md);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .rd-card {
    grid-template-columns: 1fr;
  }

  .rd-card:nth-child(even) .rd-card__shots {
    order: 0;
  }

  .rd-phone {
    right: 0;
  }
}
