/* Team scrapbook. Route-local expression; employee hierarchy stays in site.js. */
#team.team-scrapbook {
  --crew-blue: #1959d1;
  --crew-yellow: #ffdf70;
  --crew-coral: #ff947e;
  --crew-paper: #f1f5ff;
  --crew-ink: #14243b;
  background: var(--crew-paper);
  color: var(--crew-ink);
  overflow: clip;
}
.crew-hero { background: var(--crew-blue); color: white; position: relative; display: flex; flex-direction: column; min-height: calc(100vh - var(--header, 86px)); min-height: calc(100svh - var(--header, 86px)); }
.crew-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .17; background-image: radial-gradient(white 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(90deg,transparent,black); }
.crew-opening { flex: 1; align-content: center; display: grid; grid-template-columns: 1fr 1.12fr; gap: 45px; align-items: center; padding-block: 66px 75px; }
.crew-copy { position: relative; z-index: 2; }
#team .crew-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; margin: 0 0 22px; line-height: 1.5; }
#team .crew-hero .crew-eyebrow { color: var(--crew-yellow); }
#team .crew-copy h1 { font-family: Barlow, sans-serif; font-size: clamp(48px,5vw,76px); line-height: .99; letter-spacing: -.035em; color: white; margin: 0 0 24px; max-width: 540px; }
.crew-copy h1 span { color: var(--crew-yellow); position: relative; }
.crew-copy h1 span::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 6px; border-radius: 50%; background: var(--crew-yellow); transform: rotate(-3deg); }
#team .crew-copy > p:not(.crew-eyebrow) { color: white; opacity: .92; max-width: 440px; font-size: 20px; line-height: 1.6; margin-bottom: 26px; }
#team .crew-link { display: inline-flex; gap: 32px; align-items: center; padding: 13px 20px; background: var(--crew-yellow); color: var(--crew-ink); border: 2px solid transparent; border-radius: 6px; font-weight: 650; text-decoration: none; transition: transform .2s, background .2s; cursor: pointer; }
#team .crew-link:hover { background: white; transform: translateY(-3px); }
#team .crew-link:active { transform: translateY(0); }
#team :is(a,button):focus-visible { outline: 3px solid var(--crew-ink); outline-offset: 5px; }
#team .crew-hero :is(a,button):focus-visible { outline-color: var(--crew-yellow); }
.crew-snapshots { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px 15px; position: relative; padding-block: 14px 40px; padding-inline: 6px; align-items: start; }
#team .scrap-photo { margin: 0; width: 101%; justify-self: center; padding: 6px 6px 0; background: white; box-shadow: 0 10px 22px #082b6a40; transform: rotate(var(--photo-turn)); transition: transform .3s; position: relative; min-width: 0; }
#team .scrap-photo:nth-child(even) { margin-top: 26px; margin-bottom: -26px; }
#team .scrap-photo:hover, #team .scrap-photo:focus-within { z-index: 4; transform: rotate(0) translateY(-8px) scale(1.04); }
#team .scrap-photo .image-open { display: block; width: 100%; aspect-ratio: 1; border-radius: 0; overflow: hidden; cursor: zoom-in; }
#team .scrap-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
#team .scrap-photo figcaption { font-size: 10px; font-weight: 600; color: var(--crew-ink); padding: 7px 2px; line-height: 1.25; text-align: center; min-height: 34px; display: grid; place-content: center; }
.crew-sticker { position: absolute; right: -10px; bottom: -96px; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1.05; font: 600 23px/1.05 Barlow,sans-serif; background: var(--crew-coral); color: var(--crew-ink); transform: rotate(12deg); border: 2px dashed var(--crew-ink); box-shadow: 0 0 0 6px var(--crew-coral); z-index: 5; }
.crew-ribbon { overflow: hidden; border-block: 1px solid #14243b20; background: var(--crew-yellow); color: var(--crew-ink); padding: 14px 0; }
.crew-ribbon span { display: block; width: max-content; word-spacing: 9px; font: 600 18px/1.2 Barlow,sans-serif; letter-spacing: .06em; transform: translateX(-30px); }
.crew-ribbon b { margin-inline: 26px; font-size: 25px; vertical-align: middle; }
#team .people-section { background: var(--crew-paper); padding-block: 100px; }
.crew-section-heading { display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; gap: 60px; margin-bottom: 52px; }
#team .crew-section-heading h2 { font: 600 clamp(38px,4.4vw,62px)/1.04 Barlow,sans-serif; letter-spacing: -.025em; margin: 0; color: var(--crew-ink); }
#team .crew-section-heading h2 span { color: var(--crew-blue); }
#team .crew-section-heading > p { color: var(--crew-ink); font-size: 19px; line-height: 1.6; max-width: 360px; margin: 0 0 3px; }
#team .people-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 42px 28px; }
#team .people-grid .person-row { grid-column: span 3; padding: 0; border: 0; background: transparent; }
#team .people-grid .person-row:nth-child(-n+2) { grid-column: span 6; }
#team .person-portrait { border: 9px solid white; border-top-color: var(--crew-yellow); border-radius: 12px; background: white; box-shadow: 0 5px 0 #14243b12; transition: transform .25s; }
#team .person-row:nth-child(3n+2) .person-portrait { border-top-color: var(--crew-coral); }
#team .person-row:nth-child(3n) .person-portrait { border-top-color: #b9d8ff; }
#team .person-portrait::after { display: none; }
#team .people-grid .person-portrait .image-open { display: block; width: 100%; height: 280px; border-radius: 4px; background: transparent; cursor: zoom-in; }
#team .people-grid .person-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; mix-blend-mode: normal; }
#team .people-grid .person-row-aditya .person-portrait img { object-position: center 50%; transform: translateX(-9%) scale(1.5); }
#team .people-grid .person-row:nth-child(-n+2) .person-portrait .image-open { height: 390px; }
#team .people-grid .person-row:nth-child(-n+2) .person-portrait img { height: 100%; }
#team .people-grid .person-row:nth-child(2) .person-portrait img { object-fit: cover; object-position: center 20%; }
#team .person-row:hover .person-portrait, #team .person-row:focus-within .person-portrait { transform: translateY(-5px) rotate(-1deg); }
#team .person-copy { padding: 19px 10px 0; text-align: center; overflow-wrap: anywhere; }
#team .person-copy h3 { font: 600 25px/1.15 Barlow,sans-serif; color: var(--crew-ink); margin: 0 0 7px; text-wrap: balance; }
#team .person-row:nth-child(-n+2) h3 { font-size: 33px; }
#team .member-role { display: block; font-size: 16px; color: #465775; line-height: 1.45; text-wrap: balance; }
.crew-album { background: #fff; }
.crew-photo-wall { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 38px 28px; padding: 12px 8px 30px; }
#team .album-photo { margin: 0; padding: 10px 10px 0; border: 1px solid #dce3ed; background: white; box-shadow: 0 7px 20px #14243b12; transform: rotate(var(--photo-turn)); transition: transform .25s,box-shadow .25s; min-width: 0; }
#team .album-photo:nth-child(3n+2) { margin-top: 26px; }
#team .album-photo .image-open { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 2px; overflow: hidden; cursor: zoom-in; }
#team .album-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
#team .album-photo figcaption { padding: 13px 4px 15px; color: var(--crew-ink); font-size: 15px; line-height: 1.4; }
#team .album-photo:hover, #team .album-photo:focus-within { transform: rotate(0) translateY(-6px); box-shadow: 0 12px 30px #14243b20; z-index: 1; }
.crew-close { margin-top: 70px; border-top: 2px solid var(--crew-ink); padding-top: 35px; display: flex; justify-content: space-between; gap: 25px; align-items: center; }
#team .crew-close p { font: 600 clamp(30px,3vw,44px)/1.12 Barlow,sans-serif; color: var(--crew-ink); margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  #team:not([hidden]) .crew-copy { animation: crew-arrive .7s both; }
  #team:not([hidden]) .crew-snapshots { animation: crew-arrive .9s .12s both; }
  @keyframes crew-arrive { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
}
@media (max-width: 1100px) {
  .crew-opening { gap: 35px; padding-block: 70px 90px; }
  #team .crew-copy h1 { font-size: 64px; }
  #team .people-grid .person-row { grid-column: span 4; }
  #team .people-grid .person-row:nth-child(-n+2) { grid-column: span 6; }
  #team .people-grid .person-row:last-child { grid-column: span 4; }
}
@media (max-width: 760px) {
  .crew-opening { grid-template-columns: 1fr; gap: 52px; padding-block: 56px 85px; }
  #team .crew-copy h1 { font-size: clamp(54px,10vw,76px); max-width: 560px; }
  .crew-snapshots { margin: 0 12px; gap: 22px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #team .scrap-photo .image-open { aspect-ratio: 1; }
  .crew-sticker { width: 90px; height: 90px; font-size: 20px; right: 0; }
  .crew-section-heading { grid-template-columns: 1fr; gap: 24px; margin-bottom: 34px; }
  #team .people-section { padding-block: 62px; }
  #team .people-grid { gap: 32px 18px; }
  #team .people-grid .person-row, #team .people-grid .person-row:nth-child(-n+2), #team .people-grid .person-row:last-child { grid-column: span 6; }
  #team .people-grid .person-portrait .image-open, #team .people-grid .person-row:nth-child(-n+2) .person-portrait .image-open { height: 260px; }
  #team .person-copy h3, #team .person-row:nth-child(-n+2) h3 { font-size: 25px; }
  .crew-photo-wall { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px 20px; }
  #team .album-photo:nth-child(3n+2) { margin-top: 0; }
  .crew-close { align-items: flex-start; flex-direction: column; margin-top: 40px; }
}
@media (max-width: 430px) {
  #team .crew-copy h1 { font-size: 55px; }
  #team .crew-copy > p:not(.crew-eyebrow) { font-size: 18px; }
  .crew-snapshots { gap: 10px; }
  #team .scrap-photo { padding: 5px 5px 0; margin-inline: -5px; }
  #team .scrap-photo figcaption { font-size: 10px; min-height: 37px; display: grid; place-content: center; }
  #team .people-grid { gap: 30px 14px; }
  #team .person-portrait { border-width: 6px; }
  #team .people-grid .person-portrait .image-open, #team .people-grid .person-row:nth-child(-n+2) .person-portrait .image-open { height: 200px; }
  #team .person-copy h3, #team .person-row:nth-child(-n+2) h3 { font-size: 22px; }
  #team .member-role { font-size: 14px; }
  .crew-photo-wall { grid-template-columns: 1fr; gap: 30px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #team :is(.scrap-photo,.album-photo,.person-portrait,.crew-link) { transition: none; }
  #team :is(.scrap-photo,.album-photo):hover, #team :is(.scrap-photo,.album-photo):focus-within { transform: rotate(var(--photo-turn)); }
  #team .person-row:hover .person-portrait, #team .person-row:focus-within .person-portrait, #team .crew-link:hover { transform: none; }
}

/* Careers hero scaled up a further 15% (1.18 x 1.15) */
#careers .page-hero > .shell { zoom: 1.357; }

/* Photo albums: six collage cards that open into a full album */
.crew-albums { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px 28px; padding: 12px 8px 30px; }
#team .album-card { --accent: var(--crew-yellow); position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; text-align: left; font: inherit; color: var(--crew-ink); background: transparent; border: 0; border-radius: 14px; box-shadow: none; cursor: pointer; overflow: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
#team .album-card:nth-child(3n+2) { --accent: var(--crew-coral); }
#team .album-card:nth-child(3n) { --accent: #b9d8ff; }
#team .album-card:hover, #team .album-card:focus-visible { transform: translateY(-6px); }
#team .album-card.is-opening { visibility: hidden; }
.album-pile { position: relative; display: block; aspect-ratio: 4/3; margin: 18px 18px 0; border-radius: 10px; background: transparent; overflow: visible; }
.album-pile img { position: absolute; left: 50%; top: 50%; width: 66%; height: 70%; object-fit: cover; border: 6px solid white; border-radius: 3px; box-shadow: 0 8px 18px #14243b30; transform: translate(-50%,-50%) rotate(var(--r,0deg)); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
#team .album-pile[data-count="1"] img { width: 80%; height: 80%; transform: translate(-50%,-50%) rotate(-2deg); }
.album-pile[data-count="2"] img:nth-child(1) { --r: 7deg; transform: translate(-38%,-52%) rotate(var(--r)); }
.album-pile[data-count="2"] img:nth-child(2) { --r: -5deg; transform: translate(-62%,-46%) rotate(var(--r)); }
.album-pile[data-count="3"] img:nth-child(1) { --r: 9deg; transform: translate(-30%,-56%) rotate(var(--r)); }
.album-pile[data-count="3"] img:nth-child(2) { --r: -8deg; transform: translate(-70%,-50%) rotate(var(--r)); }
.album-pile[data-count="3"] img:nth-child(3) { --r: 1deg; transform: translate(-50%,-44%) rotate(var(--r)); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="1"] img:only-child { transform: translate(-50%,-50%) rotate(0) scale(1.05); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="2"] img:nth-child(1) { transform: translate(-22%,-54%) rotate(11deg); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="2"] img:nth-child(2) { transform: translate(-78%,-44%) rotate(-9deg); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="3"] img:nth-child(1) { transform: translate(-14%,-58%) rotate(14deg); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="3"] img:nth-child(2) { transform: translate(-86%,-50%) rotate(-13deg); }
#team .album-card:is(:hover,:focus-visible) .album-pile[data-count="3"] img:nth-child(3) { transform: translate(-50%,-48%) rotate(0) scale(1.06); }
.album-card-copy { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 4px 12px; padding: 18px 22px 20px; }
.album-card-title { font: 600 27px/1.1 Barlow,sans-serif; letter-spacing: -.01em; }
.album-card-note { grid-column: 1; font-size: 15px; color: #465775; line-height: 1.4; }
.album-card-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 7px 12px; border-radius: 999px; background: var(--crew-paper); color: var(--crew-blue); font-size: 14px; font-weight: 700; white-space: nowrap; transition: background .25s, color .25s; }
#team .album-card:is(:hover,:focus-visible) .album-card-count { background: var(--crew-blue); color: white; }

/* The opened album */
html.crew-album-open { overflow: hidden; }
.crew-album-viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(14px,3vw,40px); border: 0; background: transparent; display: none; place-items: center; overflow: hidden; }
.crew-album-viewer[open] { display: grid; }
.crew-album-viewer::backdrop { background: #0b1830b8; backdrop-filter: blur(4px); }
.crew-album-viewer.is-entering::backdrop { animation: crew-fade .45s ease both; }
.crew-album-viewer.is-leaving::backdrop { animation: crew-fade .38s ease reverse both; }
.crew-album-panel { width: min(1180px,100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; background: var(--crew-paper); border-radius: 18px; box-shadow: 0 30px 80px #0006; transform-origin: 0 0; padding: clamp(20px,3vw,38px); }
.crew-album-head { position: sticky; top: calc(-1 * clamp(20px,3vw,38px)); z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: calc(-1 * clamp(20px,3vw,38px)) calc(-1 * clamp(20px,3vw,38px)) 26px; padding: clamp(18px,2.4vw,28px) clamp(20px,3vw,38px) 16px; background: var(--crew-paper); }
#team .crew-album-head h3 { margin: 0; font: 600 clamp(32px,3.6vw,50px)/1.05 Barlow,sans-serif; letter-spacing: -.02em; color: var(--crew-ink); }
.crew-album-count { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--crew-blue); }
#team .crew-album-close { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--crew-ink); color: white; font-size: 30px; line-height: 1; cursor: pointer; transition: transform .25s, background .25s; }
#team .crew-album-close:hover { background: var(--crew-blue); transform: rotate(90deg); }
.crew-album-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px 26px; padding: 6px 6px 10px; }
.crew-album-grid[data-count="1"] { grid-template-columns: minmax(0,640px); justify-content: center; }
.crew-album-grid[data-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.crew-album-viewer.is-entering .album-photo { animation: crew-photo-in .6s cubic-bezier(.2,.85,.25,1) calc(260ms + var(--photo-index,0) * 70ms) both; }
.crew-album-viewer.is-leaving .album-photo { animation: crew-fade .2s ease reverse both; }
@keyframes crew-photo-in { from { opacity: 0; transform: translateY(46px) rotate(calc(var(--photo-turn) * 3)) scale(.86); } to { opacity: 1; transform: rotate(var(--photo-turn)); } }
@keyframes crew-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) {
  .crew-albums { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 20px; }
  .crew-album-grid, .crew-album-grid[data-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 18px; }
}
@media (max-width: 600px) {
  .crew-albums, .crew-album-grid, .crew-album-grid[data-count="2"] { grid-template-columns: 1fr; }
  .album-card-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  #team .album-card, .album-pile img { transition: none; }
  .crew-album-viewer .album-photo { animation: none !important; }
}
.crew-photo-wall[hidden] { display: none; }
