/* About page overrides, loaded after the bundled stylesheets. */

/* Who We Are (We Think / We Build / We Deliver): round the image corners to
   match the other cards across the site (project, service and team cards all
   use --r-md on all four corners). overflow:hidden is already set on
   .trio__media, so the image clips to the curve. */
.trio__media {
  border-radius: var(--r-md);
}

/* Core Values tiles, tablet and phone: compact. No fixed minimum height (it
   left a big empty gap between title and text), tighter padding, and the
   title sits just above its text. Type never goes below 16px on tablets or
   12px on phones. Phones show the tiles 2 x 2 instead of stacked. */
@media (max-width: 1080px) {
  .vtile {
    min-height: 0;
    justify-content: flex-start;
    gap: .45rem;
    padding: 1rem 1.15rem;
  }
  .vtile__name { font-size: 18px; line-height: 1.25; }
  .vtile__text { font-size: 16px; line-height: 1.45; }
}
@media (max-width: 720px) {
  .values-band__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
  }
  /* sides and bottom only: the top keeps the room for the photo
     (responsive-images.css) */
  .values-band__stage { padding-inline: .75rem; padding-bottom: .75rem; }
  .vtile {
    gap: .35rem;
    padding: .8rem .85rem;
  }
  .vtile__name { font-size: 14px; }
  .vtile__text { font-size: 12px; line-height: 1.45; }
}

/* Our Clients: a static grid of client logos, one per tile (after the
   reference: white tiles with the logo centred, on a soft grey band). Logos
   keep their brand colours and the same per-logo sizing as the Home page logo
   strip (is-tall / is-wide / is-tile). With 17 clients the last row is
   centred. Spacing follows the site rhythm: 24px inside the band's top and
   bottom (48px between sections), 24px eyebrow -> headline. */
.clients {
  background: #f4f4f6;
  color: var(--paper-ink);
  padding-block: var(--seam);
}
.clients .eyebrow {
  color: var(--paper-ink-2);
  /* block-level, so its line doesn't add a few px above it (keeps the 48px
     section-to-section rhythm exact) */
  display: flex;
  width: fit-content;
}
.clients__title {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--paper-ink);
  max-width: 22ch;
  margin-bottom: 48px;
}
.clients__grid {
  --cols: 6;
  --gap: clamp(.5rem, .8vw, .75rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.clients__tile {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  aspect-ratio: 6 / 5;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: var(--r-md);
  background: #fff;
}
.clients__tile img {
  display: block;
  width: auto;
  height: auto;
  max-width: 78%;
  max-height: 52px;
  object-fit: contain;
}
.clients__tile img.is-tile { max-height: 48px; border-radius: var(--r-xs, 4px); }
.clients__tile img.is-wide { max-height: 46px; }
.clients__tile img.is-tall { max-height: 62px; }

@media (max-width: 1080px) {
  .clients__grid { --cols: 3; }
}
@media (max-width: 620px) {
  .clients__grid { --cols: 2; }
  .clients__tile img { max-height: 40px; }
  .clients__tile img.is-tile { max-height: 38px; }
  .clients__tile img.is-wide { max-height: 36px; }
  .clients__tile img.is-tall { max-height: 48px; }
}

/* Global Presence: the globe sits in a rounded card inside the page margins,
   like the other large cards (e.g. the values band above, --r-lg corners),
   on the site's black. The text starts level with the top of the card rather
   than being centred beside it, in the light text colours the other dark
   sections use; the blue accents switch to --blue-tint, which reads on black. */
.globalp {
  background: var(--bg);
  /* equal black above and below, so the card + text sit in the vertical
     centre; 24px each, the site's section-to-section rhythm (spacing.css) */
  padding-block: var(--seam);
}
.globalp__panel {
  background: transparent;
  color: var(--text-1);
}
.globalp__eyebrow { color: var(--blue-tint); }
.globalp__title { color: var(--text-1); }
.globalp__sub { color: #bfbfbf; }
.globalp__offices li { color: var(--text-2); }
.globalp__offices li::before { background: var(--text-2); }
.gp-office:hover,
.gp-office[aria-pressed="true"] { color: var(--blue-tint); }
.gp-office:focus-visible { outline-color: var(--blue-tint); }
.globalp__offices li:has(.gp-office:hover)::before,
.globalp__offices li:has(.gp-office[aria-pressed="true"])::before {
  background: var(--blue-tint);
  box-shadow: 0 0 0 3px rgba(159, 188, 255, .22);
}
/* card + text sit together as one group in the horizontal centre. The text
   column shrinks to its longest line (the description breaks at a fixed
   point, see .globalp__br in about.html) and the pair is centred, so the
   black margins either side of what you see match */
.globalp__split {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  grid-template-columns: minmax(0, 36rem) fit-content(32rem);
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.globalp__sub { max-width: none; }
.globalp__art {
  border-radius: var(--r-lg);
}
/* the globe's backdrop fades to near-black at the edges; a faint rim keeps
   the card's shape visible on the black section (drawn above the canvas) */
.globalp__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(159, 188, 255, .14);
  pointer-events: none;
}
.globalp__panel {
  justify-content: flex-start;
  padding: 0;
}
@media (max-width: 1080px) {
  .globalp__split {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }
  html body .globalp__panel { padding-bottom: 0; }
}

/* Team photos framed from the bust up to the top of the head, with every
   head top on the same line (7% down the card; Sid and Gangadhar sit 3%
   lower) and every head the same size (42% of the card height; Ram's is a
   little larger, as his photo is already a close-up). The cards keep their
   original gaps and rounded corners. Each photo gets a crop window, as
   fractions of the photo:
     --t     top of the window, 7% of the card above the hair. Negative when
             the photo has no room above the head: the photo then shifts down
             and the strip above it is painted with --fill
     --h     window height (down to bust level)
     --cx    horizontal centre (the face)
     --ar    the photo's own width / height
     --fill  colours sampled from the photo's top edge, for that strip
   The image is sized and offset so that window fills the 4:5 card. With the
   defaults (a 4:5 box filling the card) object-fit:cover behaves as before,
   which is how Asif's photo (member-10) stays exactly as it was. */
.team-card img {
  position: absolute;
  box-sizing: content-box;
  top: calc(-100% * max(var(--t, 0), 0) / var(--h, 1));
  /* padding % is of the card's width, which is 0.8 x its height */
  padding-top: calc(125% * max(-1 * var(--t, 0), 0) / var(--h, 1));
  left: calc(50% - 125% * var(--cx, .5) * var(--ar, .8) / var(--h, 1));
  width: calc(125% * var(--ar, .8) / var(--h, 1));
  height: calc(100% / var(--h, 1));
  max-width: none;
  background: var(--fill, none);
  /* the hover zoom grows from the middle of the visible crop */
  transform-origin: calc(var(--cx, .5) * 100%) calc((var(--t, 0) + var(--h, 1) / 2) * 100%);
}
.team-card img[src$="/member-18.webp"] { --t: -.0618; --h: .7343; --cx: .5; --ar: .8221; --fill: linear-gradient(90deg, #383b45, #3f424e, #434753, #43464f, #444653, #3e404d, #363941); }
.team-card img[src$="/member-1.webp"] { --t: .0929; --h: .629; --cx: .53; --ar: .8189; }
.team-card img[src$="/member-2.webp"] { --t: -.014; --h: .8333; --cx: .5; --ar: .6667; --fill: linear-gradient(90deg, #2b2b2b, #373737, #3e3e3e, #3e3e3e, #393939, #333333, #242424); }
.team-card img[src$="/member-3.webp"] { --t: .0465; --h: .7826; --cx: .48; --ar: .8003; }
.team-card img[src$="/member-4.webp"] { --t: .0089; --h: .5736; --cx: .52; --ar: .7735; }
.team-card img[src$="/member-5.webp"] { --t: .0375; --h: .9625; --cx: .49; --ar: .8003; }
.team-card img[src$="/member-6.webp"] { --t: .019; --h: .981; --cx: .4903; --ar: .8003; }
.team-card img[src$="/member-7.webp"] { --t: .084; --h: .8286; --cx: .4784; --ar: .6928; }
.team-card img[src$="/member-8.webp"] { --t: -.0043; --h: 1.0043; --cx: .465; --ar: 1.1261; --fill: linear-gradient(90deg, #29282b, #2d2d2f, #333335, #363538, #333237, #2f2e31, #28272b); }
.team-card img[src$="/member-9.webp"] { --t: .0787; --h: .8924; --cx: .53; --ar: .8003; }
.team-card img[src$="/member-11.webp"] { --t: .11; --h: .5307; --cx: .5; --ar: .75; }
.team-card img[src$="/member-12.webp"] { --t: .0853; --h: .7648; --cx: .48; --ar: .75; }
.team-card img[src$="/member-13.webp"] { --t: .085; --h: .6429; --cx: .5; --ar: 1; }
.team-card img[src$="/member-14.webp"] { --t: .1221; --h: .5752; --cx: .51; --ar: .7512; }
.team-card img[src$="/member-15.webp"] { --t: .0982; --h: .7179; --cx: .51; --ar: .75; }
.team-card img[src$="/member-16.webp"] { --t: .1122; --h: .5874; --cx: .515; --ar: .75; }
.team-card img[src$="/member-17.webp"] { --t: .1122; --h: .8119; --cx: .46; --ar: .7512; }

/* Shifted-down photos: the painted strip above the photo fades softly into
   the photo's top edge, so there's no visible line where they meet.
   --seam is where the photo starts (-t / h, as a share of the card height). */
.team-card:has(img[src$="/member-18.webp"]) { --seam: 8.42%; --fill: linear-gradient(90deg, #383b45, #3f424e, #434753, #43464f, #444653, #3e404d, #363941); }
.team-card:has(img[src$="/member-2.webp"]) { --seam: 1.68%; --fill: linear-gradient(90deg, #2b2b2b, #373737, #3e3e3e, #3e3e3e, #393939, #333333, #242424); }
.team-card:has(img[src$="/member-8.webp"]) { --seam: .43%; --fill: linear-gradient(90deg, #29282b, #2d2d2f, #333335, #363538, #333237, #2f2e31, #28272b); }
.team-card:has(img[src$="/member-18.webp"])::before,
.team-card:has(img[src$="/member-2.webp"])::before,
.team-card:has(img[src$="/member-8.webp"])::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1; /* above the photo; the name (also z-index 1) comes later, so stays on top */
  pointer-events: none;
  background: var(--fill);
  -webkit-mask-image: linear-gradient(180deg, #000 var(--seam), transparent calc(var(--seam) + 9%));
  mask-image: linear-gradient(180deg, #000 var(--seam), transparent calc(var(--seam) + 9%));
}