/* v10: personal contact card. Layout rules are confined to #contacts.
   The two existing photos receive hover-only paint effects at the end. */

#contacts .contact__grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 64px;
}
#contacts .contact__copy,
#contacts .contact__details { min-width: 0; }
#contacts .contact__copy > p {
  font-size: 1.0625rem;
  line-height: 1.65;
}
#contacts .contact__details { display: grid; gap: 20px; }
#contacts .contact-person {
  min-width: 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 28px;
  background: rgba(255, 255, 255, .045);
  box-shadow: 0 20px 48px rgba(3, 20, 21, .15);
}
#contacts .contact-person__head {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
#contacts .contact-person__portrait {
  width: 168px;
  height: 168px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 12px 32px 12px 32px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
#contacts .contact-person__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#contacts .contact-person__identity { min-width: 0; }
#contacts .contact-person__identity h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  transform-origin: left center;
}
#contacts .contact-person__role {
  margin: 0;
  color: #d1e0da;
  font-size: 1rem;
  line-height: 1.5;
}
#contacts .contact-person__label {
  margin: 8px 0 0;
  color: #c4d8cf;
  font-size: .9375rem;
  line-height: 1.5;
}
#contacts .contact-person__availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid rgba(243, 179, 105, .35);
  border-radius: 999px;
  color: #f3b369;
  background: rgba(230, 135, 35, .08);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
#contacts .contact-person__availability::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
#contacts .contact-person__description {
  margin: 24px 0;
  color: #d1e0da;
  font-size: 1.0625rem;
  line-height: 1.65;
}
#contacts .contact-person__direct {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}
#contacts .contact__cards > a,
#contacts .contact__cards > button[data-copy-email] {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 18px 20px;
  text-align: left;
  transform: none;
}
#contacts .contact__cards small { letter-spacing: .05em; }
#contacts .contact__cards strong {
  min-width: 0;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.4;
}
#contacts .contact__cards span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
#contacts .contact__notice {
  margin: 0;
  color: #c4d8cf;
  font-size: .9375rem;
  line-height: 1.6;
}
#contacts .contact__prompt > span { font-size: .875rem; line-height: 1.4; }

@media (min-width: 821px) and (max-width: 1040px) {
  #contacts .contact__grid { gap: 32px; }
  #contacts .contact-person { padding: 24px; }
  #contacts .contact-person__head { grid-template-columns: 148px minmax(0, 1fr); gap: 20px; }
  #contacts .contact-person__portrait { width: 148px; height: 148px; }
  #contacts .contact-person__identity h3 { font-size: 1.375rem; }
}
@media (max-width: 1040px) {
  #contacts .contact__cards > a,
  #contacts .contact__cards > button[data-copy-email] { grid-template-columns: minmax(0, 1fr); }
  #contacts .contact__cards span { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
@media (max-width: 820px) {
  #contacts .contact__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 560px) {
  #contacts .contact__details { gap: 18px; }
  #contacts .contact-person { padding: 24px 20px; border-radius: 22px; }
  #contacts .contact-person__head { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #contacts .contact-person__portrait { width: 160px; height: 160px; }
  #contacts .contact-person__identity h3 { font-size: 1.5rem; }
  #contacts .contact-person__description { margin: 20px 0 24px; font-size: 1rem; }
  #contacts .contact__copy > p { font-size: 1rem; }
  #contacts .contact__cards > a,
  #contacts .contact__cards > button[data-copy-email] { padding: 16px; border-radius: 16px; }
  #contacts .contact__prompt { padding: 18px; }
}

/* A fine pointer and normal motion are required. Scaling changes only
   painting, leaving the photo frames, captions and surrounding layout intact. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #contacts .contact-person__portrait {
    transition: transform .3s ease, box-shadow .3s ease;
  }
  #contacts .contact-person__identity h3 {
    transition: transform .3s ease;
  }
  #contacts .contact-person__head:hover .contact-person__portrait {
    transform: scale(1.03);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .25);
  }
  #contacts .contact-person__head:hover .contact-person__identity h3 { transform: scale(1.02); }
  #contacts .contact__cards > a:hover,
  #contacts .contact__cards > button[data-copy-email]:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .09);
  }
  .hero__image-wrap > img,
  .team__photo > img,
  .hero__image-label p,
  .team__photo > span { transition: transform .3s ease; }
  .hero__image-wrap { transition: box-shadow .3s ease; }
  /* Preserve the team's existing reveal transition on the same element. */
  .team__photo { transition: opacity .65s ease, transform .65s ease, box-shadow .3s ease; }
  .hero__image-label p { transform-origin: left center; }
  .hero__image-wrap:hover > img,
  .team__photo:hover > img { transform: scale(1.03); }
  .hero__image-wrap:hover .hero__image-label p,
  .team__photo:hover > span { transform: scale(1.02); }
  .hero__image-wrap:hover,
  .team__photo:hover { box-shadow: 0 28px 76px rgba(14, 45, 46, .2); }
}

@media print {
  #contacts .contact__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  #contacts .contact-person { break-inside: avoid; color: #000; background: #fff; border-color: #777; box-shadow: none; }
  #contacts .contact-person__identity h3,
  #contacts .contact-person__role,
  #contacts .contact-person__label,
  #contacts .contact-person__description,
  #contacts .contact-person__direct,
  #contacts .contact-person__availability,
  #contacts .contact__copy > p,
  #contacts .contact__notice,
  #contacts .contact__prompt span,
  #contacts .contact__prompt p,
  #contacts .contact__cards small,
  #contacts .contact__cards span { color: #000; }
  #contacts .contact-person__availability,
  #contacts .contact__prompt { background: #fff; border-color: #777; }
  #contacts .contact-person__portrait { box-shadow: none; }
}
