/* Cohen Lawyers - team-index template */
:root { --neutral-bg: #F9F8F6; }
body { font-size: 16px; line-height: 1.6; }
ul { list-style: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
.nav__link { transition: opacity var(--d-fast) var(--ease-out); }
.btn { font-family: var(--font-ui); min-height: 48px; }
.page-hero { position: relative; min-height: 68vh; display: flex; align-items: flex-end; overflow: hidden; background: #0a0a0a; }
.page-hero__bg { position: absolute; inset: 0; background-image: url('../assets/photography/team-groupshot-v3/groupshot.png'); background-size: cover; background-position: center 30%; transform: scale(1.04); transition: transform 8s var(--ease-cinematic); }
.page-hero__bg.is-loaded { transform: scale(1); }
.page-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.50) 45%, rgba(0,0,0,0.22) 100%); }
.page-hero__content { position: relative; z-index: 2; width: 100%; padding: 140px 48px 88px; max-width: 860px; }
.page-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: 10px; font-weight: 400; letter-spacing: 0.38em; text-transform: uppercase; color: var(--paper-40); margin-bottom: 24px; opacity: 0; animation: fadeUp 500ms var(--ease-cinematic) 200ms forwards; }
.page-hero__h1 { font-family: var(--font-ui); font-weight: 700; font-style: normal; font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.02em; line-height: 1.08; color: var(--white); margin-bottom: 22px; opacity: 0; animation: fadeUp 600ms var(--ease-cinematic) 500ms forwards; }
.page-hero__h1 em { font-style: normal; }
.page-hero__sub { font-family: var(--font-ui); font-weight: 300; font-size: clamp(15px, 1.6vw, 18px); color: var(--paper-60); line-height: 1.6; max-width: 520px; opacity: 0; animation: fadeUp 600ms var(--ease-cinematic) 800ms forwards; }
.breadcrumb__list { color: var(--ink-40); }
.people-intro { background: var(--white); text-align: center; }
.people-intro__inner { max-width: 760px; margin: 0 auto; }
.people-intro__h2 { font-family: var(--font-ui); font-weight: 700; font-style: normal; font-size: clamp(28px, 3.6vw, 48px); letter-spacing: -0.02em; line-height: 1.15; color: var(--black); margin-bottom: 24px; white-space: nowrap; }
.people-intro__h2 em { font-family: var(--font-display); font-weight: 400; font-style: normal; }
.people-intro__p { font-family: var(--font-ui); font-weight: 300; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.7; color: var(--ink-60); }
.team-section { background: var(--neutral-bg); }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.team-card { background: var(--white); overflow: hidden; display: flex; flex-direction: column; position: relative; cursor: pointer; }
.team-card.is-page-hidden, .team-card.is-search-hidden { display: none; }
.team__grid .team-card.reveal-up { opacity: 1; transform: none; }
.team-card.is-page-enter { animation: teamPageFade 320ms var(--ease-cinematic) both; }
.people-search { margin-bottom: 40px; }
.people-search__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.people-search__wrap { position: relative; flex: 1 1 480px; max-width: 480px; }
.people-search__pager { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.people-search__page { font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-40); white-space: nowrap; }
.people-search__input { width: 100%; padding: 13px 44px 13px 16px; font-family: var(--font-ui); font-size: 14px; font-weight: 300; color: var(--black); background: var(--neutral-bg); border: 1px solid var(--ink-08); outline: none; transition: border-color var(--d-fast) var(--ease-out); }
.people-search__input:focus { border-color: rgba(0,0,0,0.28); }
.people-search__input::placeholder { color: var(--ink-40); }
.people-search__icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-40); }
.people-search__count { font-family: var(--font-ui); font-size: 12px; font-weight: 300; color: var(--ink-40); margin-top: 8px; min-height: 18px; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1) opacity(0.4); cursor: pointer; }
.team-pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 40px; }
.team-pager__status { font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-40, rgba(0,0,0,0.5)); min-width: 96px; text-align: center; }
.team-nav-btn { width: 40px; height: 40px; border: 1px solid rgba(0,0,0,0.2); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--black); transition: background 200ms var(--ease-out), border-color 200ms, color 200ms; }
.team-nav-btn:hover:not(:disabled) { background: var(--black); color: #fff; border-color: var(--black); }
.team-nav-btn:disabled { opacity: 0.3; cursor: default; }
.team-nav-btn svg { width: 16px; height: 16px; pointer-events: none; }
.team-card__photo-wrap { aspect-ratio: 3/4; overflow: hidden; }
.team-card__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transition: transform 400ms var(--ease-cinematic); }
.team-card:hover .team-card__photo { transform: scale(1.04); }
.team-card__photo--placeholder { display: flex; align-items: center; justify-content: center; background: #ECEAE3; }
.team-card__photo--placeholder svg { width: 34%; height: auto; fill: rgba(38, 59, 54, 0.35); }
.team-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.team-card__role-tag { display: inline-block; font-family: var(--font-ui); font-size: 10px; font-weight: 400; letter-spacing: 0.38em; text-transform: uppercase; color: var(--ink-40); border: 1px solid rgba(0,0,0,0.12); padding: 4px 10px; margin-bottom: 14px; }
.team-card__name { font-family: var(--font-ui); font-weight: 700; font-style: normal; font-size: 17px; letter-spacing: -0.01em; color: var(--black); margin-bottom: 4px; }
.team-card__title { font-family: var(--font-ui); font-weight: 300; font-size: clamp(12px, 0.9vw, 14px); line-height: 1.7; color: var(--ink-60); margin-bottom: 12px; }
.team-card__bio { font-family: var(--font-ui); font-weight: 300; font-size: clamp(11px, 0.8vw, 12px); line-height: 1.6; color: var(--ink-60); margin-bottom: 14px; }
.team-card__link { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(0,0,0,0.2); padding-bottom: 2px; margin-top: auto; align-self: flex-start; transition: border-color var(--d-fast) var(--ease-out), gap var(--d-fast) var(--ease-cinematic); }
.team-card__link:hover { border-color: var(--black); gap: 10px; }
.team-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cta-section { border-top: 1px solid var(--paper-08); }
.cta__eyebrow { justify-content: center; }
.cta__h2 { font-style: normal; line-height: 1.05; }
.cta__h2 em { font-style: normal; }
.cta__phone { font-family: var(--font-ui); font-size: 14px; font-weight: 300; color: var(--paper-60); letter-spacing: 0.04em; }

@media (max-width: 720px) {
  .people-intro__h2 { white-space: normal; }
  .people-intro__line { display: block; }
}

@keyframes teamPageFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
  .nav { padding: 20px 32px; }
  .container { padding-inline: 32px; }
  .section { padding-block: 64px; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { padding: 16px 24px; }
  .container { padding-inline: 24px; }
  .section { padding-block: 48px; }
  .page-hero__content { padding: 110px 24px 64px; }
  .breadcrumb { padding: 14px 24px; }
  .team__grid { grid-template-columns: 1fr 1fr; }
  .cta__eyebrow { display: none; }
  .cta__h2 { margin-top: -16px; }
}

@media (max-width: 560px) {
  .people-search__row { flex-direction: column; align-items: stretch; gap: 16px; }
  .people-search__wrap { flex: 1 1 auto; max-width: none; }
  .people-search__pager { justify-content: center; gap: 20px; }
  .people-search__pager .js-team-prev { order: 1; }
  .people-search__page { order: 2; min-width: 96px; text-align: center; }
  .people-search__pager .js-team-next { order: 3; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .team-card__body { padding: 16px 14px; }
  .team-card__bio { display: none; }
  .team-card__role-tag { font-size: 9px; letter-spacing: 0.16em; padding: 3px 8px; margin-bottom: 10px; }
  .team-card__name { font-size: 15px; }
  .team-card__title { margin-bottom: 10px; }
}

@media (max-width: 480px) {
  .team__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up { transition-duration: 0.01ms !important; }
  .page-hero__eyebrow, .page-hero__h1, .page-hero__sub { opacity: 1 !important; animation: none !important; }
  .page-hero__bg { transform: scale(1) !important; transition: none !important; }
}



/* ── TEAM CARD ROW ALIGNMENT ──
   The new copy gives some people a dual role ("Director | Principal Solicitor")
   and a longer discipline line, so the role pill and the discipline wrap to a
   different number of lines on each card. Everything below them then starts at a
   different height and the row stops reading as a row.

   The floor goes on the ROW, not on the element. The card body becomes a grid
   whose pill and discipline tracks carry a minmax() floor, so a short pill keeps
   its natural height and its border still hugs its text - a min-height on the
   pill itself stretched it into a full-width box. The bio track takes 1fr and
   absorbs the slack, which lands the CTA on the card foot right across the row.
   minmax(_, auto) rather than a fixed height so an unusually long line can still
   grow instead of being clipped by the card's overflow:hidden. */
.team-card__body { display: grid; flex: 1;
  grid-template-rows:
    minmax(42px, auto)   /* role pill  - one or two lines */
    auto                 /* name       - always one line */
    minmax(72px, auto)   /* discipline - one to three lines */
    1fr                  /* bio        - absorbs the slack */
    auto;                /* CTA        - sits on the foot */
  align-items: start; }
.team-card__role-tag { display: inline-block; justify-self: start; min-height: 0; }
.team-card__title { min-height: 0; }
.team-card__link { justify-self: start; align-self: end; margin-top: 0; }

@media (max-width: 1300px) {
  .team-card__body { grid-template-rows: minmax(58px,auto) auto minmax(96px,auto) 1fr auto; }
}
@media (max-width: 1024px) {
  /* two columns - the cards are wide again, so far less wrapping */
  .team-card__body { grid-template-rows: minmax(42px,auto) auto minmax(48px,auto) 1fr auto; }
}
@media (max-width: 640px) {
  .team-card__body { grid-template-rows: minmax(34px,auto) auto auto 1fr auto; }
}

/* On the grid pages subgrid makes it exact at every width: the cards in a row
   share one set of tracks, so the floors above stop mattering there and no card
   carries dead space. The 2px row-gap moves onto the card as a border so the
   hairline seam between rows survives - with subgrid a row-gap would otherwise
   be inserted between all six tracks and split each card apart. */
@supports (grid-template-rows: subgrid) {
  .team__grid { row-gap: 0; }
  .team__grid .team-card { display: grid; grid-template-rows: subgrid; grid-row: span 6;
    border-bottom: 2px solid var(--neutral-bg, #F9F8F6); }
  .team__grid .team-card__body { grid-template-rows: subgrid; grid-row: span 5; }
}
