/* Codenixo Team Premium Redesign V1
   Approved direction:
   - premium hero
   - four team cards per desktop row
   - only real team members from team_catalog
   - filler quote card occupies only the remaining empty grid cells
   - actual social links only, with Facebook support
   - premium CTA above existing footer
*/

.team-premium {
  --tm-ink: #071127;
  --tm-copy: #60708f;
  --tm-line: rgba(148, 163, 184, .18);
  --tm-card: #fff;
  color: var(--tm-ink);
  background: #fff;
}

html.dark .team-premium {
  --tm-ink: #f8fafc;
  --tm-copy: #cbd5e1;
  --tm-line: rgba(255, 255, 255, .10);
  --tm-card: #0f172a;
  background: #020617;
}

.team-premium p {
  color: var(--tm-copy);
}

.team-premium a {
  text-decoration: none;
}

.tm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.tm-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .08);
}

html.dark .tm-eyebrow {
  color: var(--brand-light);
}

/* Keep navbar consistent with Home/About/Projects */
@media (min-width: 1181px) {
  body[data-page="team"] .navbar:not(.scrolled) {
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Hero */
.tm-hero {
  overflow: hidden;
  padding: 134px 0 60px;
  background:
    radial-gradient(circle at 78% 14%, rgba(99, 102, 241, .11), transparent 31%),
    linear-gradient(180deg, #fbfcff 0%, #fff 100%);
}

html.dark .tm-hero {
  background:
    radial-gradient(circle at 78% 14%, rgba(99, 102, 241, .16), transparent 31%),
    linear-gradient(180deg, #020617 0%, #07101f 100%);
}

.tm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .90fr) minmax(470px, 1.10fr);
  gap: clamp(48px, 6vw, 82px);
  align-items: center;
}

.tm-hero__title {
  margin: 0 0 18px;
  color: var(--tm-ink);
  font-family: var(--font-display);
  font-size: clamp(58px, 6.1vw, 88px);
  font-weight: 800;
  line-height: .91;
  letter-spacing: -.064em;
}

.tm-hero__lead {
  max-width: 610px;
  margin: 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.62;
}

.tm-strengths {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin-top: 28px;
}

.tm-strengths span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: none;
  color: #53627f;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

html.dark .tm-strengths span {
  color: #cbd5e1;
}

.tm-strengths i {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 10px;
  color: var(--brand);
  background: rgba(99, 102, 241, .09);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

.tm-hero__visual {
  position: relative;
  min-height: 430px;
}

.tm-hero__photo {
  position: absolute;
  inset: 2% 5% 4% 4%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 35px 35px 92px 35px;
  background: #eef2ff;
  box-shadow: 0 32px 74px -42px rgba(15, 23, 42, .42);
}

.tm-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-hero__badge {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 18px 45px -28px rgba(15, 23, 42, .34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .tm-hero__badge {
  background: rgba(15, 23, 42, .94);
}

.tm-hero__badge--count {
  right: 0;
  top: 8%;
  max-width: 195px;
}

.tm-hero__badge--passion {
  left: 2%;
  bottom: 3%;
  max-width: 190px;
}

.tm-hero__badge-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: none;
  border-radius: 11px;
  color: var(--brand);
  background: rgba(99, 102, 241, .10);
}

.tm-hero__badge-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tm-hero__badge strong,
.tm-hero__badge small {
  display: block;
}

.tm-hero__badge strong {
  color: var(--tm-ink);
  font-size: 12px;
  line-height: 1.22;
}

.tm-hero__badge small {
  margin-top: 4px;
  color: var(--tm-copy);
  font-size: 9px;
  line-height: 1.35;
}

.tm-hero__scribble {
  position: absolute;
  right: 1%;
  bottom: 4%;
  z-index: 4;
  color: #27385f;
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: italic;
  transform: rotate(-7deg);
}

html.dark .tm-hero__scribble {
  color: #9fb0d3;
}

/* Team */
.tm-experts {
  padding: 48px 0 66px;
  background: #fff;
}

html.dark .tm-experts {
  background: #020617;
}

.tm-experts__head {
  display: grid;
  grid-template-columns: minmax(0, .80fr) minmax(340px, .70fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 24px;
}

.tm-experts__head h2 {
  margin: 0;
  color: var(--tm-ink);
  font-family: var(--font-display);
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.055em;
}

.tm-experts__head > p {
  max-width: 560px;
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.62;
}

.tm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tm-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--tm-line);
  border-radius: 16px;
  background: var(--tm-card);
  box-shadow: 0 20px 52px -42px rgba(15, 23, 42, .30);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tm-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, .25);
  box-shadow: 0 28px 68px -48px rgba(79, 70, 229, .36);
}

.tm-card__portrait {
  position: relative;
  overflow: hidden;
  height: 248px;
  background: #eef2ff;
  border-bottom: 1px solid var(--tm-line);
}

html.dark .tm-card__portrait {
  background: #111827;
}

.tm-card__blob {
  display: none;
}

.tm-card__portrait img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.015);
}

.tm-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px 16px 17px;
}

.tm-card h3 {
  margin: 0 0 3px;
  color: var(--tm-ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.tm-card__role {
  min-height: 26px;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 8.8px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html.dark .tm-card__role {
  color: var(--brand-light);
}

.tm-card p {
  min-height: 60px;
  margin: 0;
  font-size: 11.8px;
  line-height: 1.54;
}

.tm-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.tm-socials__item {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border: 1px solid rgba(79, 70, 229, .10);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #6d6aff 0%, #5148ed 100%);
  box-shadow:
    0 9px 22px -15px rgba(79, 70, 229, .85),
    inset 0 1px 0 rgba(255, 255, 255, .26);
}

a.tm-socials__item {
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

a.tm-socials__item:hover {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.07);
  box-shadow:
    0 15px 28px -15px rgba(67, 56, 202, .82),
    0 0 0 4px rgba(99, 102, 241, .10);
}

a.tm-socials__item:focus-visible {
  outline: 0;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px rgba(79, 70, 229, .48),
    0 15px 28px -15px rgba(67, 56, 202, .82);
}

html.dark a.tm-socials__item:focus-visible {
  box-shadow:
    0 0 0 3px #020617,
    0 0 0 6px rgba(129, 140, 248, .62),
    0 15px 28px -15px rgba(67, 56, 202, .82);
}

.tm-socials svg {
  width: 14px;
  height: 14px;
  overflow: visible;
  fill: currentColor;
  stroke: none;
}

.tm-socials__item--portfolio svg {
  fill: currentColor;
  stroke: none;
}

@media (hover: none) {
  a.tm-socials__item:hover {
    transform: none;
    filter: none;
  }
}

/* Fill only the unused slots at the end of the final row. */
.tm-quote-card {
  grid-column: span var(--tm-filler-span);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(99, 102, 241, .11);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 5%, rgba(99, 102, 241, .16), transparent 30%),
    linear-gradient(135deg, #f7f8ff 0%, #eef1ff 100%);
  box-shadow: 0 20px 52px -42px rgba(79, 70, 229, .30);
}

html.dark .tm-quote-card {
  background:
    radial-gradient(circle at 92% 5%, rgba(99, 102, 241, .18), transparent 30%),
    linear-gradient(135deg, #0b1220 0%, #111b34 100%);
}

.tm-quote-card__mark {
  color: var(--brand);
  font-family: Georgia, serif;
  font-size: 52px;
  line-height: .65;
}

.tm-quote-card h3 {
  max-width: 330px;
  margin: 15px 0 10px;
  color: var(--tm-ink);
  font-family: var(--font-display);
  font-size: clamp(25px, 2.5vw, 36px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.tm-quote-card p {
  max-width: 320px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.tm-quote-card__scribble {
  align-self: flex-end;
  margin-top: 18px;
  color: #27385f;
  font-family: Georgia, serif;
  font-size: 16px;
  font-style: italic;
  transform: rotate(-7deg);
}

html.dark .tm-quote-card__scribble {
  color: #aab6d0;
}

/* CTA */
.tm-cta {
  padding: 0 0 68px;
  background: #fff;
}

html.dark .tm-cta {
  background: #020617;
}

.tm-cta__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  overflow: hidden;
  padding: 28px 32px;
  border: 1px solid rgba(99, 102, 241, .11);
  border-radius: 20px;
  background:
    radial-gradient(circle at 91% 35%, rgba(99, 102, 241, .20), transparent 28%),
    linear-gradient(118deg, #f9faff 0%, #eef2ff 100%);
  box-shadow: 0 24px 66px -48px rgba(79, 70, 229, .42);
}

html.dark .tm-cta__panel {
  background:
    radial-gradient(circle at 91% 35%, rgba(99, 102, 241, .24), transparent 28%),
    linear-gradient(118deg, #0b1220 0%, #101a31 100%);
}

.tm-cta__eyebrow {
  margin: 0 0 6px;
  color: var(--brand) !important;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.tm-cta h2 {
  margin: 0 0 7px;
  color: var(--tm-ink);
  font-family: var(--font-display);
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.tm-cta p {
  max-width: 650px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.tm-cta__button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 11px;
  color: #fff;
  background: #081126;
  box-shadow: 0 16px 30px -20px rgba(8, 17, 38, .65);
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}

html.dark .tm-cta__button {
  color: #071127;
  background: #fff;
}

.tm-cta__cubes {
  position: absolute;
  right: 24px;
  bottom: -4px;
  width: 110px;
  height: 100px;
  opacity: .55;
  pointer-events: none;
}

.tm-cta__cubes i {
  position: absolute;
  width: 38px;
  height: 38px;
  transform: rotate(30deg) skew(-4deg, -4deg);
  border-radius: 7px;
  background: linear-gradient(145deg, #9b94ff, #5548f0);
  box-shadow: 0 16px 28px -18px rgba(79, 70, 229, .68);
}

.tm-cta__cubes i:nth-child(1) {
  left: 30px;
  top: 4px;
}

.tm-cta__cubes i:nth-child(2) {
  left: 58px;
  top: 34px;
  opacity: .70;
}

.tm-cta__cubes i:nth-child(3) {
  left: 14px;
  top: 48px;
  opacity: .45;
}

/* Bangla */
html[lang="bn"] .tm-eyebrow,
html[lang="bn"] .tm-cta__eyebrow {
  font-family: var(--font-bn);
  letter-spacing: 0;
  text-transform: none;
}

html[lang="bn"] .tm-hero__title,
html[lang="bn"] .tm-experts__head h2,
html[lang="bn"] .tm-card h3,
html[lang="bn"] .tm-quote-card h3,
html[lang="bn"] .tm-cta h2 {
  font-family: var(--font-bn);
  letter-spacing: -.01em;
  line-height: 1.18;
}

/* Responsive */
@media (max-width: 1120px) {
  .tm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tm-quote-card {
    grid-column: span 1 !important;
  }
}

@media (max-width: 900px) {
  .tm-hero {
    padding: 116px 0 52px;
  }

  .tm-strengths {
    grid-template-columns: repeat(4, max-content);
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .tm-hero__grid,
  .tm-experts__head {
    grid-template-columns: 1fr;
  }

  .tm-hero__visual {
    min-height: 410px;
    max-width: 720px;
  }

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

  .tm-quote-card {
    grid-column: span 2 !important;
  }
}

@media (max-width: 620px) {
  .tm-hero__title {
    font-size: clamp(46px, 13vw, 62px);
  }

  .tm-hero__lead {
    font-size: 16px;
  }

  .tm-hero__visual {
    min-height: 340px;
  }

  .tm-hero__photo {
    inset: 2% 3% 6% 3%;
  }

  .tm-hero__badge--count {
    right: 0;
    max-width: 158px;
  }

  .tm-hero__badge--passion {
    left: 0;
    max-width: 155px;
  }

  .tm-hero__scribble {
    display: none;
  }

  .tm-grid {
    grid-template-columns: 1fr;
  }

  .tm-card__portrait {
    height: 310px;
  }

  .tm-card__portrait img {
    object-position: center 16%;
  }

  .tm-card p {
    min-height: 0;
  }

  .tm-quote-card {
    grid-column: span 1 !important;
  }

  .tm-cta__panel {
    grid-template-columns: 1fr;
    padding: 25px 22px;
  }

  .tm-cta__button {
    justify-self: start;
  }

  .tm-cta__cubes {
    right: 4px;
    opacity: .24;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-card,
  .tm-socials a {
    transition: none;
  }
}
