/* About page: leadership cards, team stats, filterable flip cards. Uses the --pg-* theme tokens. */
.tm-stats { list-style: none; margin: 8px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tm-stats li { border: 1px solid var(--pg-line); border-radius: 18px; padding: 16px 18px; background: var(--pg-surface); display: grid; gap: 2px; }
.tm-stats b { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--pg-hl); font-variant-numeric: tabular-nums; }
.tm-stats li > span { color: var(--pg-muted); font-size: .88rem; }

.tm-leads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tm-lead { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: start; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 26px; padding: 22px; box-shadow: 0 14px 34px rgba(0, 0, 0, .06); transition: transform .35s ease, box-shadow .35s ease; }
.tm-lead:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0, 0, 0, .1); }
.tm-lead-face { position: relative; width: 132px; height: 132px; }
.tm-lead-face .tm-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.tm-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed var(--pg-hl); opacity: .45; animation: tm-spin 24s linear infinite; }
.tm-lead-body h3 { margin: 2px 0 8px; font-size: 1.3rem; }
.tm-lead-body p { margin: 0; color: var(--pg-muted); font-size: .95rem; }
.tm-role { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-hl) !important; }
.tm-photo.tm-initials { background: var(--pg-panel); border: 2px dashed var(--pg-line); color: var(--pg-muted); font-weight: 700; font-size: 1.6rem; }
.team-li, .tm-card .team-li { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .88rem; color: var(--pg-hl); }

.tm-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.tm-chip { font: inherit; font-size: .86rem; font-weight: 600; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--pg-line); background: var(--pg-surface); color: var(--pg-text); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.tm-chip[aria-pressed="true"] { background: var(--pg-text); color: var(--pg-surface); border-color: var(--pg-text); }
.tm-chip:focus-visible, .tm-card:focus-visible { outline: 3px solid var(--pg-hl); outline-offset: 3px; }

.tm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tm-card { perspective: 1000px; min-height: 300px; border-radius: 22px; transition: opacity .35s ease, transform .35s ease; }
.tm-card[hidden] { display: none; }
.tm-card-in { position: relative; height: 100%; min-height: 300px; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.tm-front, .tm-back { position: absolute; inset: 0; border-radius: 22px; border: 1px solid var(--pg-line); background: var(--pg-surface); padding: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; }
.tm-front { align-items: center; justify-content: center; text-align: center; gap: 4px; }
.tm-front .tm-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .12); }
.tm-front h3 { margin: 0; font-size: 1.1rem; }
.tm-back { transform: rotateY(180deg); justify-content: center; background: linear-gradient(160deg, var(--pg-panel), var(--pg-surface)); }
.tm-back h3 { margin: 4px 0 8px; font-size: 1.1rem; }
.tm-back p { margin: 0; color: var(--pg-muted); font-size: .95rem; }
/* Tap, click, Enter or Space toggles .is-flipped (team.js). Hover only flips on devices that really hover,
   so a second tap on a touch screen flips the card back. A focused LinkedIn link on the back keeps it visible. */
.tm-card.is-flipped .tm-card-in, .tm-card:focus-within:not(:focus) .tm-card-in { transform: rotateY(180deg); }
@media (hover: hover) { .tm-card:hover .tm-card-in { transform: rotateY(180deg); } }

/* Values: centered rows so five cards sit 3 + 2 instead of leaving an orphan */
.pg-cards.tm-values { display: flex; flex-wrap: wrap; justify-content: center; }
.pg-cards.tm-values > * { flex: 0 1 calc((100% - 32px) / 3); }

/* Slow staggered entrance once on screen (content is visible without JS) */
.tm-js [data-team-reveal]:not(.tm-on) > * { opacity: 0; transform: translateY(18px); }
[data-team-reveal] > * { transition: opacity .8s ease calc(var(--i, 0) * 90ms), transform .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 90ms); }

@keyframes tm-spin { to { transform: rotate(360deg); } }
@media (max-width: 960px) { .pg-cards.tm-values > * { flex-basis: calc((100% - 16px) / 2); } .tm-leads { grid-template-columns: 1fr; } .tm-grid { grid-template-columns: repeat(2, 1fr); } .tm-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pg-cards.tm-values > * { flex-basis: 100%; } .tm-grid { grid-template-columns: 1fr; } .tm-lead { grid-template-columns: 1fr; justify-items: start; } }
@media (prefers-reduced-motion: reduce) {
  .tm-ring { animation: none; }
  .tm-card-in, [data-team-reveal] > *, .tm-lead { transition: none; }
  .tm-js [data-team-reveal]:not(.tm-on) > * { opacity: 1; transform: none; }
}
