/* ============================================================
   NINTAI — Talents directory (team + partner studios)
   Filterable by category tabs, sortable. Inherits styles.css.
   ============================================================ */

.tal-main { padding-top: clamp(60px, 7.5vh, 76px); }

/* ── Filter / sort bar ───────────────────────────────────── */
.tal-bar {
  position: sticky; top: clamp(50px, 7vh, 60px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px 20px; flex-wrap: wrap;
  margin: 0 calc(-1 * var(--gutter));
  padding: 11px var(--gutter);
  background: oklch(0.967 0.006 85 / 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.tal-tabs {
  display: flex; align-items: center; gap: clamp(6px, 0.8vw, 14px);
  flex-wrap: wrap;
}
.tal-tab {
  appearance: none; cursor: pointer; background: none; border: 1px solid transparent;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint);
  padding: 7px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .25s, background .25s, border-color .25s;
}
.tal-tab:hover { color: var(--fg); }
.tal-tab .tt-count {
  font-size: 0.62rem; letter-spacing: 0.05em; color: var(--faint);
  opacity: 0.7;
}
.tal-tab[aria-pressed="true"] {
  color: var(--fg); border-color: var(--line-2);
  background: oklch(1 0 0 / 0.5);
}
.tal-tab[aria-pressed="true"] .tt-count { color: var(--accent); opacity: 1; }

.tal-sort {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint);
}
.tal-sort .ts-label { white-space: nowrap; }
.tal-sort button {
  appearance: none; cursor: pointer; background: none;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: inherit; letter-spacing: 0.12em; color: var(--fg);
  padding: 6px 12px; display: inline-flex; align-items: center; gap: 9px;
  transition: border-color .25s, color .25s;
}
.tal-sort button:hover { border-color: var(--accent); color: var(--accent); }
.tal-sort button svg { width: 14px; height: 14px; }

/* ── List ────────────────────────────────────────────────── */
.tal-list { display: flex; flex-direction: column; }
.tal-card {
  display: grid;
  grid-template-columns: minmax(180px, 230px) 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: clamp(16px, 2vw, 24px) 0;
  border-bottom: 1px solid var(--line);
}
.tal-card.is-hidden { display: none; }
.tal-card:last-child { border-bottom: 0; }

/* entrance — visible by default; only below-fold cards are armed (hidden)
   then revealed on scroll, mirroring site.js's robust rect-based pattern. */
.tal-card.armed { opacity: 0; transform: translateY(18px); }
.tal-card.armed.in { opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .tal-card.armed { opacity: 1 !important; transform: none !important; }
}

/* ── Identity column ─────────────────────────────────────── */
.tal-id { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.tal-avatar {
  --av: clamp(72px, 6.5vw, 92px);
  width: var(--av); height: var(--av); margin-bottom: 14px;
  border-radius: 50%; position: relative;
}
.tal-avatar::after { /* accent ring */
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid color-mix(in oklch, var(--mc) 55%, transparent);
  pointer-events: none;
}
.tal-avatar image-slot { width: 100%; height: 100%; }
.tal-studio-badge {
  width: var(--av, clamp(72px,6.5vw,92px)); height: clamp(72px, 6.5vw, 92px);
}

.tal-name {
  font-family: var(--display); font-weight: var(--d-weight);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.05;
  letter-spacing: var(--d-track); text-transform: var(--d-transform);
  color: var(--fg); margin: 0;
}
.tal-role {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mc); margin: 7px 0 0;
  font-weight: 700;
}
.tal-loc {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin: 7px 0 0;
  display: inline-flex; align-items: center; gap: 7px;
}
.tal-loc::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mc); }

.tal-socials { display: flex; justify-content: flex-start; gap: 8px; margin-top: 14px; }
.tal-socials a {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--muted);
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease);
}
.tal-socials a:hover {
  color: var(--accent-ink); background: var(--mc); border-color: var(--mc);
  transform: translateY(-2px);
}
.tal-socials a svg { width: 15px; height: 15px; }
.tal-socials a .tri {
  width: 0; height: 0; margin-left: 2px;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.tal-socials a .in {
  font-family: var(--mono); font-weight: 700; font-size: 0.72rem; letter-spacing: 0;
}

/* ── Work gallery ────────────────────────────────────────── */
.tal-gallery-wrap { position: relative; min-width: 0; }
.tal-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: 1fr 1fr;
  grid-auto-columns: clamp(220px, 26vw, 296px) clamp(147px, 17.4vw, 197px) clamp(220px, 26vw, 296px);
  gap: 8px;
  min-width: 0;
  height: clamp(168px, 17vw, 212px);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.tal-gallery::-webkit-scrollbar { display: none; }
.tal-gallery .tal-shot {
  position: relative;
  display: flex; flex-direction: column;
  scroll-snap-align: start;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
  margin: 0;
  background: oklch(0.16 0.02 264);
}
.tal-gallery .tal-shot.big { grid-row: span 2; }
/* tiles without a recovered image still show the title in the caption strip below */

/* ── Slider arrows ───────────────────────────────────────── */
.tal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: oklch(0.99 0.004 85 / 0.92);
  border: 1px solid var(--line-2); color: var(--fg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px oklch(0.2 0.02 264 / 0.16);
  z-index: 8; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), opacity .2s;
}
.tal-arrow[hidden] { display: none; }
.tal-arrow:hover { background: var(--mc); border-color: var(--mc); color: var(--accent-ink); }
.tal-arrow svg { width: 18px; height: 18px; }
.tal-arrow-prev { left: -10px; }
.tal-arrow-next { right: -10px; }
.tal-gallery image-slot {
  flex: 1 1 auto; min-height: 0;
  width: 100%;
  display: block;
}
.tal-cap {
  flex: 0 0 auto;
  padding: 7px 10px 8px;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: #fff; line-height: 1.22;
  background: oklch(0.18 0.022 264);
  text-wrap: pretty;
  pointer-events: none;
}

/* empty state */
.tal-empty {
  display: none; padding: clamp(60px, 10vw, 120px) 0; text-align: center;
}
.tal-empty.show { display: block; }
.tal-empty p {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 880px) {
  .tal-card { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .tal-id { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 18px; }
  .tal-avatar { margin-bottom: 0; }
  .tal-id .tal-id-text { display: flex; flex-direction: column; }
  .tal-socials { margin-top: 4px; margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
  .tal-gallery { height: clamp(200px, 44vw, 280px);
    grid-auto-columns: clamp(232px, 58vw, 320px) clamp(150px, 36vw, 210px) clamp(232px, 58vw, 320px); }
}
@media (max-width: 560px) {
  .tal-head .tal-intro { text-align: left; }
  .tal-gallery { height: clamp(190px, 52vw, 240px);
    grid-auto-columns: 72vw 46vw 72vw; }
  .tal-arrow { width: 34px; height: 34px; }
  .tal-arrow-prev { left: 4px; }
  .tal-arrow-next { right: 4px; }
}
