/* =========================================================================
   "In their words" — testimonials component
   Lifted from the earlier home page component. Depends on the design tokens in
   composed.css (--display, --body, --ink, --accent, --line, --ease, ...).
   ========================================================================= */

/* includes the experience row, then scales as more quotes arrive */
.tm-section { padding-top: clamp(44px, 5.6vw, 78px); }
.tm-section .clients {
  margin-top: 0;
  margin-bottom: clamp(88px, 10vw, 140px);
}
.tm-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.8fr);
  gap: clamp(38px, 6vw, 92px);
  align-items: start;
}
.tm-head .eyebrow { margin-bottom: clamp(20px, 2.5vw, 32px); }
.tm-deck {
  max-width: 12.5ch;
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(27px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
.tm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 4.2vw, 58px) clamp(28px, 4vw, 56px);
}
.tm {
  margin: 0;
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.tm-quote { margin: 0; position: relative; }
.tm-quote p {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(20px, 1.65vw, 25px); line-height: 1.38; letter-spacing: -0.006em;
  color: var(--ink); text-wrap: pretty; margin: 0;
}
.tm-quote p .em { color: var(--accent-deep); font-style: italic; }
.tm-cite {
  margin-top: clamp(18px, 2vw, 24px);
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: start;
}

/* the hover trigger: the person's name */
.tm-by {
  display: inline-flex; flex-direction: column; gap: 4px;
  cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent;
  color: inherit; text-decoration: none;
}
.tm-person { display: inline-flex; align-items: center; gap: 8px; width: fit-content; }
.tm-name {
  display: inline-flex; align-items: center; width: fit-content;
  font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  padding-bottom: 2px; transition: border-color .2s var(--ease);
}
.tm-by:hover .tm-name, .tm-by:focus-visible .tm-name { border-bottom-color: var(--accent); }
.tm-in {
  font-family: var(--body); font-weight: 700; font-size: 10px; line-height: 1;
  letter-spacing: -0.03em; color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  width: 18px; height: 18px; border-radius: 4px;
  display: inline-grid; place-items: center; text-transform: lowercase;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  flex: none;
}
.tm-by:hover .tm-in, .tm-by:focus-visible .tm-in {
  color: #fff;
  background: #0a66c2;
  border-color: #0a66c2;
  transform: translateY(-1px);
}
.tm-role { font-size: 14px; color: var(--ink-faint); letter-spacing: 0.005em; }
/* the LinkedIn badge popover */
.li-pop {
  position: absolute; left: -4px; bottom: 100%;
  padding-bottom: 13px;            /* bridges the gap so hover survives the trip */
  z-index: 40; width: max-content;
  opacity: 0; visibility: hidden; transform: translateY(7px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  pointer-events: none;
}
.tm-cite .li-pop:not(:has(iframe)):not(:has(.LI-badge-container)) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.tm-cite:hover .li-pop, .tm-by:focus-visible + .li-pop, .li-pop:hover {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
/* the popover frame sizes itself to the LinkedIn badge iframe */
.li-pop-inner {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(38,32,25,0.10), 0 26px 54px -26px rgba(38,32,25,0.5);
  width: max-content; min-width: 260px;
}
.li-pop-inner::after {
  content: ""; position: absolute; left: 26px; top: 100%;
  width: 14px; height: 14px; background: #fff;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}
.li-pop-inner .LI-profile-badge { margin: 0 auto; }
/* tidy fallback link shown while the badge loads (or if a blocker stops it) */
.li-pop-inner .badge-base__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  color: #0a66c2; text-decoration: none; padding: 11px 15px;
  border: 1px solid color-mix(in srgb, #0a66c2 34%, transparent); border-radius: 9px;
}
.li-pop-inner .LI-profile-badge:has(iframe) .badge-base__link,
.li-pop-inner .LI-profile-badge:has(.LI-badge-container) .badge-base__link {
  display: none;
}
.li-pop-inner .badge-base__link::after { content: "↗"; font-size: 13px; opacity: 0.8; }
.tm-note { margin-top: clamp(26px, 3vw, 40px); font-size: 13.5px; font-family: var(--mono); letter-spacing: 0.04em; }
@media (max-width: 880px) {
  .tm-layout { grid-template-columns: 1fr; gap: clamp(30px, 6vw, 46px); }
  .tm-deck { max-width: 20ch; }
}
@media (max-width: 680px) {
  .tm-grid { grid-template-columns: 1fr; gap: 34px; }
  .tm-quote p { font-size: clamp(21px, 6vw, 25px); line-height: 1.34; }
}
@media (hover: none) { .li-pop { left: 0; } }
