/* «Части Тела» — страница «Команда» (префикс tm-) */

main#page-root {
  position: relative;
  overflow-x: clip;
}

/* -------- заголовок страницы -------- */

.tm-hero {
  padding-top: clamp(130px, 18vh, 190px);
  padding-bottom: clamp(30px, 4vw, 50px);
}

.tm-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(16, 49, 47, .55);
  margin-bottom: 26px;
}
.tm-crumbs a {
  color: rgba(16, 49, 47, .55);
  text-decoration: none;
  transition: color .25s ease;
}
.tm-crumbs a:hover { color: var(--teal); }
.tm-crumbs__cur { color: var(--teal); }

.tm-hero__eyebrow { margin-bottom: 22px; }

.tm-hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.tm-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -.015em;
  max-width: 15ch;
}
.tm-hero__title em {
  font-style: italic;
  color: var(--gold);
}
.tm-hero__lede {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(16, 49, 47, .75);
  max-width: 38ch;
}

/* фильтры-пилюли */
.tm-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.tm-filter {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-25);
  background: none;
  color: rgba(16, 49, 47, .75);
  cursor: pointer;
  transition: all .25s ease;
}
.tm-filter.is-active {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--cream);
}

/* -------- сетка карточек -------- */

.tm-grid-sec { padding-bottom: clamp(70px, 9vw, 120px); }

.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 18px;
}

.tm-card {
  font-family: inherit;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}
.tm-card__photo {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  transition: transform .35s ease;
}
.tm-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}
.tm-card__initials {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 44px;
  opacity: .85;
}
.tm-card__cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.tm-card__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 50, 49, .82), rgba(11, 50, 49, 0) 55%);
  opacity: 0;
  transition: opacity .35s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.tm-card:hover .tm-card__veil,
.tm-card:focus-visible .tm-card__veil { opacity: 1; }
.tm-card__more {
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tm-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}
.tm-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}
.tm-card__role {
  font-size: 13px;
  color: rgba(16, 49, 47, .62);
}

/* -------- тёмная CTA -------- */

.tm-cta {
  background: var(--pine);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.tm-cta__glow {
  position: absolute;
  top: -220px;
  right: -120px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 150, 143, .25), rgba(59, 150, 143, 0));
  pointer-events: none;
}
.tm-cta__inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) var(--pad-x);
  text-align: center;
  position: relative;
}
.tm-cta__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.07;
}
.tm-cta__title em {
  font-style: italic;
  color: var(--gold);
}
.tm-cta__text {
  margin: 0 0 30px;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(247, 242, 233, .7);
}
.tm-cta__btn { font-size: 15.5px; }

/* -------- панель мастера (правый drawer) -------- */

.tm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(11, 50, 49, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.tm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tm-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1600;
  width: min(480px, 100vw);
  background: var(--cream);
  box-shadow: -30px 0 80px -30px rgba(11, 50, 49, .5);
  transform: translateX(105%);
  transition: transform .5s cubic-bezier(.76, 0, .24, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.tm-panel.is-open { transform: translateX(0); }

.tm-panel__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}
.tm-panel__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
}
.tm-panel__close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(16, 60, 58, .2);
  background: var(--ivory);
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
  transition: background .25s ease;
}
.tm-panel__close:hover { background: var(--teal-mist); }

.tm-panel__body {
  padding: 18px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tm-panel__photo {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background: var(--teal-mist);
}
.tm-panel__initials {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--teal);
  opacity: .85;
}
.tm-panel__cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(16, 49, 47, .55);
  background: rgba(252, 250, 244, .8);
  padding: 6px 10px;
  border-radius: 999px;
}
.tm-panel__level {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--pine);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tm-panel__name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
}
.tm-panel__role {
  margin: 0;
  font-size: 14px;
  color: rgba(16, 49, 47, .62);
}
.tm-panel__bio {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-80);
}
.tm-panel__sec {
  border-top: 1px solid rgba(16, 60, 58, .14);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tm-panel__sec-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--teal);
}
.tm-panel__skills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tm-skill {
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(23, 116, 112, .3);
  color: var(--teal);
  padding: 7px 14px;
  border-radius: 999px;
}
.tm-panel__exp-row {
  display: flex;
  gap: 14px;
  align-items: baseline;
  border-top: 1px solid rgba(16, 60, 58, .14);
  padding-top: 16px;
}
.tm-panel__exp {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  color: var(--pine);
}
.tm-panel__exp-cap {
  font-size: 13px;
  color: rgba(16, 49, 47, .62);
}
.tm-panel__book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: var(--pine);
  color: var(--cream);
  font-weight: 600;
  font-size: 15px;
  padding: 16px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .3s ease, color .3s ease;
  margin-top: 6px;
}
.tm-panel__book:hover {
  background: var(--gold);
  color: var(--pine);
}
