/* Public team page. Builds on the shared standard-page shell in landing.css;
   typography and palette follow docs/design-system.md (Archivo only). */
.team-page main.team-card { --peek-w: min(720px, 100%); --peek-h: calc(var(--peek-w) * 902 / 1400); position: relative; z-index: 1; max-width: 1040px; margin-top: calc(var(--peek-h) * .694 - 30px); padding: clamp(24px, 4vw, 48px); padding-top: calc(var(--peek-h) * .306 + 12px); }
.team-page > header { position: relative; z-index: 3; }
.standard-page > header nav a[aria-current='page'] { background: var(--color-yellow); }

/* Lee Hung Sheng peers over the top edge of the card: bust behind it, hands in front. */
.peeker { position: absolute; left: 50%; bottom: 100%; width: var(--peek-w); aspect-ratio: 1400 / 902; transform: translate(-50%, 30.6%); pointer-events: none; }
.peeker-body { position: absolute; inset: 0; z-index: -1; clip-path: inset(-50% -50% calc(30.6% + 3px) -50%); /* stop above the card's 3px top border */ }
.peeker-body > * { position: absolute; inset: 0; width: 100%; height: 100%; animation: peek-up 900ms cubic-bezier(.2, 1.4, .4, 1) 150ms both; }
.peeker-hands { position: absolute; inset: 0; z-index: 2; width: 100%; height: auto; animation: grab 500ms cubic-bezier(.2, 1.5, .5, 1) both; }
.peeker-eyes { overflow: visible; }
.peeker-eyes .lid { fill: none; stroke: #160f11; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.peeker-eyes .iris { transition: transform 90ms linear; }
@keyframes peek-up { from { transform: translateY(32%); } }
@keyframes grab { from { transform: translateY(-6%); opacity: 0; } }

.team-card h1, .team-section > h2, .team-group h3, .person h4 { font-family: var(--font-ui); font-weight: 900; text-transform: uppercase; }
.team-card h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1; letter-spacing: -.055em; margin: 0; text-align: center; }
.team-section { margin-top: clamp(28px, 4vw, 44px); }
/* Section divider: the header's yellow box, centred on a heavy ink rule. */
.team-section > h2 { display: flex; align-items: center; gap: 18px; margin: 0; font-size: 17px; line-height: 1.15; letter-spacing: normal; }
.team-section > h2::before, .team-section > h2::after { content: ''; flex: 1; height: 3px; background: var(--color-ink); }
.team-section > h2 span { padding: 12px 18px; background: var(--color-yellow); border: 2px solid var(--color-ink); box-shadow: 4px 4px 0 var(--color-ink); transform: rotate(-2deg); }
.team-group { margin-top: clamp(36px, 5vw, 52px); }
.team-group h3 { display: inline-block; margin: 0 0 24px; padding: 6px 10px; background: var(--color-yellow); border: 2px solid var(--color-ink); font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .09em; transform: rotate(-2deg); }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 36px; margin: 0; padding: 0; list-style: none; }

/* Portraits: a newsprint halftone drawn in the browser from the colour photo (team.js), on a
   shared paper-grain tile. Hover/tap floods the colour back in as growing dots. Without JS,
   or before the halftone is ready, the colour photo shows as-is. */
.person { position: relative; container-type: inline-size; }
.person-photo { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--color-paper); border: 3px solid var(--color-ink); box-shadow: 5px 5px 0 var(--color-ink); touch-action: manipulation; transition: transform 220ms ease, box-shadow 220ms ease; }
.person-photo img, .person-photo canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person-photo canvas { pointer-events: none; }
.person-photo::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url('paper.webp') 0 0 / 256px 256px; mix-blend-mode: multiply; opacity: .4; transition: opacity 220ms ease; }
/* Lighter still once a portrait is in colour, so the photo reads clearly. */
.person.is-live .person-photo::after { opacity: .2; }
.person-photo.is-print .photo-colour { opacity: 0; }
.person:nth-child(odd) { --tilt: -2deg; }
.person:nth-child(even) { --tilt: 2deg; }
.person.is-live .person-photo { transform: rotate(var(--tilt)) scale(1.03); box-shadow: 8px 8px 0 var(--color-ink); }
/* One size for every name, scaled to the card so the longest still fits on one line. */
.person h4 { margin: 22px 0 0; font-size: min(26px, 8.6cqi); line-height: 1.05; letter-spacing: -.025em; white-space: nowrap; }
.person-role { margin: 6px 0 0; font-size: 14px; font-weight: 700; }

@media (max-width: 760px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 24px; } }
@media (max-width: 480px) {
  .team-page main.team-card { --peek-w: calc(100% + 24px); }
  /* One face at a time: full-width portraits, each fills with colour as it reaches mid-screen. */
  .team-grid { grid-template-columns: 1fr; gap: 48px; }
  .team-section > h2 { font-size: 14px; }
  .person h4 { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .peeker-body > *, .peeker-hands { animation: none; }
  .peeker-eyes .iris, .person-photo { transition: none; }
  .person.is-live .person-photo { transform: none; }
}
