/* scene:team · round 9 · YOUR AI OFFICERS (#team). One section in place of the four officer scenes (owner, 50% shorter):
   four frosted cards, each officer's render popping out of its top edge, the name, one plain headline, one short line
   (desk only) and ONE signature output as a glass chip hanging off the card's foot. Phone: 2 × 2 within 820 px; desktop
   (desktop.css): four across. Static (motion off, no scroll timelines) = the settled layout; the cards rise in on their
   own view timeline and the renders, chips and sparkles idle inside one home.loops unit (team.js). */
.s-team {
  --pop: 50px;                                                    /* how far a render rises above its card */
  /* R10: the card's foot melts away under its see-through chip (fill and rim fade out over the last 56 px), so no card
     edge or corner reads through the glass */
  --card-fill: linear-gradient(180deg, rgba(166, 144, 255, .25), rgba(70, 52, 158, .16) 72%, rgba(70, 52, 158, .15) calc(100% - 56px), rgba(70, 52, 158, 0));
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 26px 44px -26px rgba(8, 5, 26, .85);
  --card-rim: rgba(255, 255, 255, .1);
  --card-glow: 26%;                                               /* the teammate's tint pooled under the render */
  padding: 34px 0 52px;
}
/* R10 phone: the renders a size up (owner: bigger avatars on the phone); the extra rises above the card, so the cards
   keep their height and the rows their spacing (the row gap stays the R9 84 px) */
@media (max-width: 1023.98px) { .s-team { --pop: 60px; --o-w: 82%; --row-gap: 84px; } }
:root[data-theme="light"] .s-team {
  --card-fill: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .48) 72%, rgba(255, 255, 255, .44) calc(100% - 56px), rgba(255, 255, 255, 0));
  --card-shadow: inset 0 1px 0 #FFFFFF, 0 22px 40px -22px rgba(60, 74, 122, .42);
  --card-rim: rgba(255, 255, 255, .78);
  --card-glow: 88%;
}
.team__blob--a { --bw: 150vw; left: -70vw; top: 34%; --par: 50px; }
.team__blob--b { --bw: 124vw; left: 26vw; top: -4%; --par: 70px; }
/* light: the team's own colour, periwinkle (Phantom steps lavender → blue → indigo; we step lavender → periwinkle → blush) */

.team__title {
  position: relative; z-index: 2; width: var(--col); margin: 0 auto; text-align: center;
  font-size: clamp(30px, 8.8vw, 36px); line-height: 1.15; letter-spacing: .02em; color: var(--on-sky-title);
}
.team__title:lang(en) { letter-spacing: -.012em; }

.team__stage { position: relative; z-index: 2; width: min(calc(100% - 2 * var(--gut)), 460px); margin: 22px auto 0; padding-top: var(--pop); }
.officers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--row-gap, calc(var(--pop) + 34px)) 12px; margin: 0; padding: 0; list-style: none; }

/* the card: frosted, no backdrop blur (it rises on scroll: no filters on moving layers), the teammate's tint pooled at the top */
.officer {
  position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0;
  padding: 0 8px 0; border-radius: 26px; text-align: center;
  background: var(--card-fill); box-shadow: var(--card-shadow);
  --rx: 0px; --ry: 56px;
}
.officer:nth-child(even) { --ry: 92px; }                          /* the right column trails a beat */
.officer::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(78% 52% at 50% 0%, color-mix(in srgb, var(--tm-tint) var(--card-glow), transparent), transparent 78%);
}
.officer > * { position: relative; }
.officer { isolation: isolate; }
.officer::after {                                                 /* the rim, fading out at the foot (a masked ring) */
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--card-rim) calc(100% - 64px), transparent calc(100% - 26px));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* the render, popping out of the card's top edge (in flow: .float made relative) */
.officer__o { left: auto; top: auto; width: var(--o-w, 74%); margin-top: calc(var(--pop) * -1); transform-origin: 50% 94%; --wt: 7.6s; }
/* one box size for all four (the name tags line up across a row); each figure's own scale evens out its art's air */
.officer__o--commander { scale: .92; --r: -3deg; --wd: -1.4s; }
.officer__o--strategist { --r: 2deg; --wt: 8.4s; --wd: -3.1s; }
.officer__o--scout { scale: .95; --r: 3deg; --wt: 6.8s; --wd: -.6s; }
.officer__o--scientist { scale: 1.06; --r: -2deg; --wt: 8s; --wd: -4.2s; }

.officer .nametag { margin-top: -2px; --tm: #141832; --tm-tint: #ECEBF2; }   /* owner: name tags carry no colour */
.officer h3 { margin-top: 8px; font-size: 19px; line-height: 1.24; letter-spacing: .02em; color: var(--on-sky-title); text-wrap: balance; }
.officer h3:lang(en) { font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.officer__line { display: none; margin-top: 8px; font: 600 15px/1.5 var(--font-body); color: var(--on-sky-2); text-wrap: balance; }

/* the signature output: a tinted see-through glass chip (home.css .glass: specular rim, sheen, holo hairline) hanging
   off the card's foot, tilted, the card's width: the label in quiet ink, the value in the officer's accent (Phantom's
   lime value). Read per chip (--tm is the chip's own): by night the officer's hue as violet glass with its value in its
   tint; by day clear white glass into its tint with its value in its AA ink */
.officer__c { left: auto; top: auto; width: calc(100% + 6px); margin: auto 0 -22px; padding-top: 12px; --r: -2.5deg; --wt: 8.8s; }
.officer--strategist .officer__c { --r: 2deg; --wd: -2.2s; }
.officer--scout .officer__c { --r: 2.5deg; --wd: -5s; }
.officer--scientist .officer__c { --r: -2deg; --wd: -3.6s; }
.officer__chip {
  display: grid; gap: 3px; width: 100%; padding: 9px 14px 10px 12px; border-radius: 16px;
  white-space: normal;
  --chip-label: #D8D7E2; --chip-value: #FFFFFF;                 /* owner: no colour (the default glass fill, neutral) */
}
:root[data-theme="light"] .officer__chip {
  --chip-label: #505266; --chip-value: #141832;
  --gls-fill: linear-gradient(150deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .22));   /* see-through, neutral */
}
.officer__chip .glass__t > b { font-size: 12px; line-height: 1.3; letter-spacing: .02em; color: var(--chip-label); white-space: nowrap; }   /* clear of the corner badge */
/* EN on a phone: the General's chip is his output alone (the quoted line it answers would make it three lines) */
@media (max-width: 1023.98px) { .officer__chip[data-teammate="commander"]:lang(en) .glass__t > b { display: none; } }
.officer__chip .glass__t > :last-child { font-size: 16px; line-height: 1.22; color: var(--chip-value); word-break: normal; line-break: strict; text-wrap: balance; }
.officer__chip:lang(en) .glass__t > :last-child { font-size: 15px; }

/* sparkles over the stage (inside the loop unit) */
.team__s--1 { --x: 1%; --y: 0%; --s: 16px; --sd: -1.1s; }
.team__s--2 { --x: calc(50% - 9px); --y: calc(50% + 4px); --s: 18px; --sd: -2.4s; --z: 3; }
.team__s--3 { --x: 93%; --y: 46%; --s: 13px; --sd: -.3s; }

/* a 320 phone: two lines a chip at most. The General's chip keeps only his output (the quoted line it answers goes) */
@media (max-width: 359.98px) {
  .officers { column-gap: 10px; }
  .officer h3 { font-size: 17px; }
  .officer h3:lang(en) { font-size: 16px; }
  .officer__chip { padding: 8px 10px 9px; }
  .officer__chip .glass__t > b { font-size: 11.5px; letter-spacing: 0; }
  .officer__chip .glass__t > :last-child, .officer__chip:lang(en) .glass__t > :last-child { font-size: 14px; }
  .officer__chip[data-teammate="commander"] .glass__t > b, .chip__more { display: none; }
}
