/* ================= Build page — "Staffed on day one" =================
   Page-only styles, loaded after /styles.css by src/pages/build.astro.

   Replaces the old .role-3d coverflow: a rail of core-team cards (tinted header,
   role avatar straddling the seam, name + guardrail below) that carries the full
   roster past ~5 visible slots, then two counter-scrolling rails of the skills
   the roster is built from. Colours read from the section-alternation tokens the
   parent .sec-dark sets. */

/* ---- core team ---- */
/* The card width is what makes ~5 sit in the rail at once across the desktop
   range; the roster is longer than that, so the track marquees the rest in.
   Same two-identical-sets + translateX(-50%) trick as the skill rails and the
   Genesis ticker, so the loop has no seam. */
.staff-rail {
  --staff-gap: clamp(14px, 1.6vw, 24px);
  max-width: 1360px; margin: 0 auto; overflow: hidden;
  /* cards fade in and out at the edges rather than being cut off mid-card */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.staff-track { display: flex; width: max-content; }
.staff-set { display: flex; gap: var(--staff-gap); padding-right: var(--staff-gap); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .staff-track { animation: vh-marquee 62s linear infinite; }
  /* hold still while someone is reading a card */
  .staff-rail:hover .staff-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  /* no marquee means the tail would be unreachable, so hand it to the user, and
     drop the duplicate set that only exists to make the loop seamless */
  .staff-rail { overflow-x: auto; }
  .staff-set + .staff-set { display: none; }
}

.staff-card {
  position: relative; flex: 0 0 clamp(190px, 17vw, 250px);
  border-radius: 20px; overflow: hidden;
  background: #FFFFFF; border: 1px solid rgba(11,19,14,0.07);
  box-shadow: 0 1px 0 rgba(11,19,14,.03), 0 22px 46px -28px rgba(11,19,14,.26);
  transition: transform .25s, box-shadow .25s;
}
.staff-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(11,19,14,.05), 0 32px 60px -28px rgba(11,19,14,.34); }
.staff-head { height: 116px; background: #D8EBDF; }
.staff-set .staff-card:nth-child(even) .staff-head { background: #DDD5F5; }

/* the avatar straddles the head/body seam, so it is positioned against the card */
.staff-avatar {
  position: absolute; top: 116px; left: 50%; transform: translate(-50%, -50%);
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  background: #FFFFFF; box-shadow: 0 0 0 4px #FFFFFF, 0 8px 20px -8px rgba(11,19,14,0.32);
}
.staff-body { padding: 58px 16px 26px; text-align: center; }
.staff-name {
  font-family: 'Big Shoulders Display', sans-serif; font-weight: 800;
  font-size: clamp(21px, 1.8vw, 27px); line-height: 1; letter-spacing: 0.01em;
  text-transform: uppercase; color: var(--ink); margin: 0 0 8px;
}
.staff-meta {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: #8A8D84;
}

/* ---- skill rails ---- */
.skill-rail { margin: clamp(28px, 3.5vw, 44px) 0 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
/* full-bleed: the tags run past the section gutter on both sides */
.skill-rail { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.skill-track { display: flex; width: max-content; }
.skill-set { display: flex; gap: 12px; padding-right: 12px; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .skill-track { animation: vh-marquee 46s linear infinite; }
  .skill-track.is-reverse { animation-duration: 58s; animation-direction: reverse; }
}
.skill-tag {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 11px 20px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; letter-spacing: 0.02em;
  background: #0E3F33; color: #D8E6D3;
}
.skill-set .skill-tag:nth-child(odd) { background: #6E5BE0; color: #F4F2FF; }
.skill-track.is-reverse .skill-set .skill-tag:nth-child(odd) { background: #0E3F33; color: #D8E6D3; }
.skill-track.is-reverse .skill-set .skill-tag:nth-child(even) { background: #6E5BE0; color: #F4F2FF; }

.skill-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: max-content; margin: 22px auto 0; padding: 10px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-deep) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent-deep) 20%, #fff);
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep);
}

@media (max-width: 720px) {
  /* Same marquee as desktop, running full-bleed so cards travel in from the
     screen edges rather than a 16px gutter. The track is shorter here (smaller
     cards), so the duration comes down to hold roughly the same px/sec. */
  .staff-rail {
    --staff-gap: 12px; max-width: none;
    margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  }
  .staff-card { flex: 0 0 clamp(158px, 46vw, 210px); }
  .staff-head { height: 96px; }
  .staff-avatar { top: 96px; width: 72px; height: 72px; }
  .staff-body { padding: 48px 12px 22px; }
  .skill-tag { font-size: 12.5px; padding: 9px 16px; }
  .skill-rail { gap: 10px; }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .staff-track { animation-duration: 44s; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  /* the static fallback keeps a gutter, since nothing travels off-screen */
  .staff-rail { scroll-snap-type: x mandatory; scroll-padding-left: 16px; -webkit-overflow-scrolling: touch; }
  .staff-set { padding-left: 16px; }
  .staff-card { scroll-snap-align: start; }
}
