/* ───── References / testimonials ───── */
.ref-quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 5vw, 56px);
}

.ref-section__foot {
  margin-top: clamp(40px, 5vw, 56px);
}

.ref-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: clamp(32px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--c-line);
  --corner-cut: 18px;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--corner-cut)),
    calc(100% - var(--corner-cut)) 100%,
    0 100%
  );
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.ref-quote:hover {
  transform: translateY(-3px);
  border-color: rgba(235, 35, 71, 0.24);
  box-shadow: 0 18px 44px rgba(15, 15, 18, 0.08);
}

.ref-quote__mark {
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: clamp(56px, 8vw, 80px);
  line-height: 0.85;
  color: var(--c-accent);
  opacity: 0.14;
  pointer-events: none;
}

.ref-quote__index {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent-deep);
}

.ref-quote__text {
  position: relative;
  z-index: 1;
  flex: 1;
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--c-ink);
  text-wrap: pretty;
}

.ref-quote__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line);
}

.ref-quote__footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 52px;
  height: 2px;
  background: var(--c-accent);
}

.ref-quote__name {
  display: block;
  font-style: normal;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--c-ink);
}

.ref-quote__role {
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.05em;
  color: var(--c-text-2);
}

/* Avatar placeholder — ready for real portrait photos */
.ref-avatar {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  overflow: visible;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(235, 35, 71, 0.1) 0%, transparent 48%),
    linear-gradient(145deg, #f0eeea 0%, #e2ded6 100%);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px var(--c-line),
    0 6px 16px rgba(15, 15, 18, 0.1);
}

.ref-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    linear-gradient(rgba(15, 15, 18, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 15, 18, 0.05) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.ref-avatar__photo-slot {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  border-radius: 50%;
  overflow: hidden;
}

.ref-avatar__photo-slot svg {
  width: 72%;
  height: auto;
  fill: rgba(15, 15, 18, 0.26);
}

.ref-avatar__initials {
  position: absolute;
  z-index: 3;
  right: -3px;
  bottom: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
  box-shadow:
    0 0 0 2px #fff,
    0 2px 8px rgba(235, 35, 71, 0.32);
}

.ref-avatar__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ref-avatar:has(.ref-avatar__img) .ref-avatar__photo-slot,
.ref-avatar:has(.ref-avatar__img) .ref-avatar__initials {
  display: none;
}

.ref-quotes--page {
  margin-top: 0;
}

@media (max-width: 820px) {
  .ref-quotes {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ref-quote {
    min-height: 0;
    padding: 28px 24px;
  }

  .ref-quote__text {
    font-size: var(--fs-body-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ref-quote {
    transition: none;
  }

  .ref-quote:hover {
    transform: none;
  }
}
