/* Team page — local styles + first-screen critical */

*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat/montserrat_normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat/montserrat_bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Montserrat Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 107%;
  ascent-override: 92%;
  descent-override: 23%;
  line-gap-override: 0%;
}

.team-page .rk-section--contacts {
  background-image: none;
}

.team-page {
  margin: 0;
  min-width: 320px;
  color: #111;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif;
  background: #fff;
}

.team-page .rk-container {
  width: min(100% - 32px, 1400px);
  margin-inline: auto;
}

.team-page .rk-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e8e8ef;
}

.team-page .rk-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}

.team-page .rk-nav,
.team-page .rk-header__contacts,
.team-page .rk-mobile-nav[hidden] {
  display: none;
}

.team-page .rk-logo,
.team-page .rk-logo:link,
.team-page .rk-logo:visited {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.team-page .rk-logo img {
  display: block;
  width: 180px;
  height: auto;
  max-width: 100%;
  aspect-ratio: 211 / 49;
  object-fit: contain;
}

.team-page .rk-nav a,
.team-page .rk-nav a:link,
.team-page .rk-nav a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  color: #111;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.team-page .rk-nav a[aria-current="page"],
.team-page .rk-nav a[aria-current="page"]:link,
.team-page .rk-nav a[aria-current="page"]:visited {
  color: #7f3ff2;
}

.team-page .rk-header__phone,
.team-page .rk-header__phone:link,
.team-page .rk-header__phone:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #004f9a;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.team-page .rk-wa,
.team-page .rk-wa:link,
.team-page .rk-wa:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.team-page .rk-header a:focus-visible,
.team-page .rk-burger:focus-visible {
  outline: 2px solid #7f3ff2;
  outline-offset: 2px;
}

.team-page .rk-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.team-page .rk-burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0;
  background: #151a26;
}

.team-page .rk-mobile-nav a,
.team-page .rk-mobile-nav a:link,
.team-page .rk-mobile-nav a:visited {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  color: #111;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f5;
}

.team-page .rk-mobile-nav a[aria-current="page"],
.team-page .rk-mobile-nav a[aria-current="page"]:link,
.team-page .rk-mobile-nav a[aria-current="page"]:visited {
  color: #7f3ff2;
}

@media (min-width: 1100px) {
  .team-page .rk-nav,
  .team-page .rk-header__contacts {
    display: flex;
    align-items: center;
  }

  .team-page .rk-nav {
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .team-page .rk-header__contacts {
    justify-content: flex-end;
    gap: 10px;
  }

  .team-page .rk-nav a,
  .team-page .rk-nav a:link,
  .team-page .rk-nav a:visited {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 8px 3px;
  }

  .team-page .rk-logo img {
    width: 211px;
  }

  .team-page .rk-burger {
    display: none;
  }
}

@media (min-width: 1440px) {
  .team-page .rk-nav a,
  .team-page .rk-nav a:link,
  .team-page .rk-nav a:visited {
    font-size: 15px;
  }
}

.team-page .rk-breadcrumbs {
  width: min(100% - 32px, 1400px);
  margin: 12px auto 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b6b6b;
}

.team-page .rk-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-page .rk-breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.team-page .rk-breadcrumbs li:not(:last-child)::after {
  content: "→";
  margin: 0 8px;
  color: #b0b0b0;
}

.team-page .rk-breadcrumbs a {
  color: #5a5a5a;
  text-decoration: none;
}

.team-page .team-hero {
  position: relative;
  padding: 12px 0 28px;
  overflow: hidden;
}

.team-page .team-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 92% 18%, rgba(127, 63, 242, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 8% 90%, rgba(32, 132, 214, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f4ff 0%, #ffffff 72%);
}

.team-page .team-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  align-items: center;
}

.team-page .team-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5b2bc7;
  background: #f1e9ff;
  border: 1px solid rgba(127, 63, 242, 0.18);
}

.team-page .team-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.18;
  color: #151a26;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif;
}

.team-page .team-hero__lead {
  margin: 0;
  max-width: 40em;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: #596174;
  font-family: Montserrat, "Montserrat Fallback", Arial, sans-serif !important;
}

.team-page .team-lead a,
.team-page .rk-consent a {
  color: #3d2a8a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.team-page .team-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.team-page .team-hero__media {
  width: min(100%, 560px);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #f3eefc;
  border: 1px solid rgba(127, 63, 242, 0.1);
  box-shadow: 0 18px 40px rgba(21, 26, 38, 0.1);
}

.team-page .team-hero__media picture,
.team-page .team-hero__media img {
  display: block;
  width: 100%;
  height: auto;
}

.team-page .team-hero__media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
}

.team-page .team-section {
  padding: 36px 0;
}

.team-page .team-section--muted {
  background: linear-gradient(180deg, #f7f8fc 0%, #ffffff 100%);
}

.team-page .team-h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: #151a26;
}

.team-page .team-lead {
  margin: 0 0 22px;
  max-width: 52em;
  font-size: 16px;
  line-height: 1.55;
  color: #596174;
}

.team-page .team-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-page .team-stats li {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 8px 20px rgba(21, 26, 38, 0.04);
}

.team-page .team-stats strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  color: #151a26;
}

.team-page .team-stats span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #596174;
}

.team-page .team-tag {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5b2bc7;
  background: #f1e9ff;
}

.team-page .team-tag--tech { color: #0b6bcb; background: #e8f4ff; }
.team-page .team-tag--seo { color: #0a7a4b; background: #e7f7ef; }
.team-page .team-tag--web { color: #9a3412; background: #fff1e8; }

.team-page .team-person-name {
  margin: 0 0 4px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: #151a26;
}

.team-page .team-person-role {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #5b2bc7;
}

.team-page .team-person-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #596174;
}

.team-page .team-grid {
  display: grid;
  gap: 14px;
}

.team-page .team-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 10px 28px rgba(21, 26, 38, 0.05);
}

.team-page .team-card__photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #eef1f6;
}

.team-page .team-card__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.team-page .team-card--stepan img { object-position: 50% 14%; }
.team-page .team-card--alexander img { object-position: 50% 18%; }
.team-page .team-card--kseniya img { object-position: 50% 20%; }

.team-page .team-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.25;
  color: #151a26;
}

.team-page .team-card .team-person-role {
  margin-bottom: 8px;
}

.team-page .team-card .team-person-text {
  font-size: 15px;
}

.team-page #leadership,
.team-page #tech-team {
  padding: 28px 0;
}

.team-page #leadership .team-h2,
.team-page #tech-team .team-h2 {
  margin-bottom: 8px;
}

.team-page #tech-team .team-lead {
  margin-bottom: 18px;
  max-width: 52em;
  font-size: 15px;
}

.team-page #leadership .team-h2 {
  margin-bottom: 14px;
}

/* Shared person cards: mobile photo | role+name, text full-width below */
.team-page #leadership .team-grid,
.team-page #tech-team .team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: none;
  margin-inline: 0;
  justify-content: start;
}

.team-page #leadership .team-card,
.team-page #tech-team .team-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "photo meta"
    "text text";
  align-items: start;
  column-gap: 12px;
  row-gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(21, 26, 38, 0.05);
}

.team-page #leadership .team-card__photo,
.team-page #tech-team .team-card__photo {
  grid-area: photo;
  width: 96px;
  max-width: 96px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #eef1f6;
}

.team-page #leadership .team-card__photo img,
.team-page #tech-team .team-card__photo img {
  display: block;
  width: 96px;
  height: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 16%;
}

.team-page #leadership .team-card--daniil img,
.team-page #tech-team .team-card--stepan img,
.team-page #tech-team .team-card--alexander img,
.team-page #tech-team .team-card--kseniya img {
  object-position: 50% 16%;
}

.team-page #leadership .team-card__meta,
.team-page #tech-team .team-card__meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.team-page #leadership .team-card h3,
.team-page #tech-team .team-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  order: 2;
}

.team-page #leadership .team-card .team-person-role,
.team-page #tech-team .team-card .team-person-role {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  order: 1;
}

.team-page #leadership .team-card .team-person-text,
.team-page #tech-team .team-card .team-person-text {
  grid-area: text;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 359px) {
  .team-page #leadership .team-card,
  .team-page #tech-team .team-card {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 10px;
    padding: 10px;
  }

  .team-page #leadership .team-card__photo,
  .team-page #leadership .team-card__photo img,
  .team-page #tech-team .team-card__photo,
  .team-page #tech-team .team-card__photo img {
    width: 84px;
    max-width: 84px;
    height: 84px;
  }

  .team-page #leadership .team-card h3,
  .team-page #tech-team .team-card h3 {
    font-size: 15px;
  }

  .team-page #leadership .team-card .team-person-role,
  .team-page #tech-team .team-card .team-person-role {
    font-size: 12px;
  }
}

.team-page .team-flow {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: team-flow;
}

.team-page .team-flow li {
  position: relative;
  min-width: 0;
  padding: 18px 18px 18px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8ecf4;
}

.team-page .team-flow strong {
  display: block;
  margin: 0 0 6px;
  font-size: 17px;
  color: #151a26;
}

.team-page .team-flow p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #596174;
}

.team-page .team-flow span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7f3ff2;
}

.team-page .team-comp {
  display: grid;
  gap: 10px;
}

.team-page .team-comp a {
  display: block;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #e8ecf4;
  background: #fff;
  color: #151a26;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.team-page .team-comp a:hover,
.team-page .team-comp a:focus-visible {
  border-color: #7f3ff2;
  box-shadow: 0 10px 24px rgba(127, 63, 242, 0.1);
}

.team-page .team-comp a:focus-visible {
  outline: 2px solid #7f3ff2;
  outline-offset: 2px;
}

.team-page .team-academy {
  display: grid;
  gap: 20px;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 14px 36px rgba(21, 26, 38, 0.05);
}

.team-page .team-academy__faces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-page .team-academy__faces figure {
  margin: 0;
  min-width: 0;
}

.team-page .team-academy__faces img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: #eef1f6;
}

.team-page .team-academy__faces figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: #596174;
}

.team-page .team-academy__faces strong {
  display: block;
  color: #151a26;
}

.team-page .team-academy .support-btn {
  margin-top: 8px;
}

.team-page .support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.team-page .support-btn--primary {
  color: #fff;
  background: linear-gradient(90deg, #a855f7, #3b82f6);
  box-shadow: 0 10px 24px rgba(99, 102, 241, .28);
}

.team-page .support-cta-band {
  padding: 56px 0;
  background: linear-gradient(90deg, #a855f7, #3b82f6);
  color: #fff;
  text-align: center;
}

.team-page .support-cta-band h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
}

.team-page .support-cta-band p {
  margin: 0 auto 22px;
  max-width: 36em;
  color: rgba(255, 255, 255, .92);
  font-size: 16px;
  line-height: 1.5;
}

.team-page .support-cta-band .support-btn--light {
  color: #5b21b6;
  background: #fff;
  border-color: #fff;
}

@media (max-width: 700px) {
  .team-page .support-btn {
    width: 100%;
  }
}

.team-page .team-foot {
  padding: 22px 0 88px;
  background: #151a26;
  color: #c8ced8;
}

.team-page .team-foot .rk-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
}

.team-page .team-foot p {
  margin: 0;
  font-size: 14px;
}

.team-page .team-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.team-page .team-foot a {
  color: #e8ecf4;
  text-decoration: none;
  font-size: 14px;
}

.team-page .team-foot a:hover,
.team-page .team-foot a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 600px) {
  .team-page .team-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-page .team-grid,
  .team-page .team-comp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .team-page .team-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 28px;
  }

  .team-page .team-hero__media {
    width: min(100%, 560px);
    margin-inline: 0 0 auto;
  }

  .team-page .team-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .team-page .team-flow li {
    padding: 8px 18px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .team-page .team-flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 52px;
    right: -8px;
    height: 2px;
    background: linear-gradient(90deg, #7f3ff2, #c4b5fd);
  }
}

@media (min-width: 768px) {
  .team-page #leadership .team-grid {
    grid-template-columns: minmax(0, 280px);
    gap: 14px;
    max-width: 920px;
    justify-content: start;
  }

  .team-page #tech-team .team-grid {
    grid-template-columns: repeat(3, minmax(0, 280px));
    gap: 14px;
    max-width: 920px;
    justify-content: start;
  }

  .team-page #leadership .team-card,
  .team-page #tech-team .team-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "meta"
      "text";
    align-content: start;
    gap: 12px;
    padding: 14px;
  }

  .team-page #leadership .team-card__photo,
  .team-page #tech-team .team-card__photo {
    width: 120px;
    max-width: 120px;
    border-radius: 14px;
  }

  .team-page #leadership .team-card__photo img,
  .team-page #tech-team .team-card__photo img {
    width: 120px;
    height: 120px;
  }

  .team-page #leadership .team-card__meta,
  .team-page #tech-team .team-card__meta {
    gap: 4px;
  }

  .team-page #leadership .team-card h3,
  .team-page #tech-team .team-card h3 {
    font-size: 18px;
    order: 1;
  }

  .team-page #leadership .team-card .team-person-role,
  .team-page #tech-team .team-card .team-person-role {
    margin: 0;
    font-size: 14px;
    order: 2;
  }

  .team-page #leadership .team-card .team-person-text,
  .team-page #tech-team .team-card .team-person-text {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .team-page .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-page #leadership .team-grid {
    grid-template-columns: minmax(0, 280px);
    max-width: 920px;
    justify-content: start;
    margin-inline: 0;
  }

  .team-page #tech-team .team-grid {
    grid-template-columns: repeat(3, minmax(0, 280px));
    max-width: 920px;
    justify-content: start;
    margin-inline: 0;
  }

  .team-page .team-comp {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-page .team-academy {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    align-items: center;
    padding: 28px;
  }
}

@media (min-width: 1440px) {
  .team-page .team-hero__title,
  .team-page .team-h2,
  .team-page .team-person-text,
  .team-page .team-lead {
    max-width: 46rem;
  }

  .team-page .team-hero__media {
    width: min(100%, 580px);
  }
}

@media (max-width: 359px) {
  .team-page .team-hero__title {
    font-size: 26px;
  }

  .team-page .team-hero__lead,
  .team-page .team-person-text,
  .team-page .team-lead {
    font-size: 15px;
  }
}
