/* AI team — four hanging badges (swing + drag + flip) */

.aiteam {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(96px, 14svh, 150px) clamp(72px, 10svh, 120px);
  overflow: hidden;
  isolation: isolate;
}

/* nothing is positioned until the first layout pass has a real width —
   otherwise a view-transition could flash four cards stacked at the left edge */
.aiteam:not(.is-ready) .aiteam__rig {
  opacity: 0;
}

.aiteam__rig {
  box-sizing: border-box;
  transition: opacity 0.25s ease;
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  height: min(58svh, 520px);
}

.aiteam__wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--ink, #111);
  opacity: 0.42;
}

.aiteam__wire path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

/* ---------- slot: one badge hanging from a point on the wire ---------- */

.slot {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bw);
  transform: translate3d(-50%, -7px, 0);
  will-change: transform;
}

.slot__clip {
  position: absolute;
  left: 50%;
  top: 0;
  width: 22px;
  height: 13px;
  transform: translate(-50%, -50%);
  border-radius: 2.5px;
  background: linear-gradient(180deg, #f4f5f7 0%, #d5d8dd 55%, #b4b9c1 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  z-index: 4;
}

.slot__clip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #73777e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.slot__hanger {
  transform-origin: 50% 0;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.slot__strap {
  width: 1px;
  height: 15px;
  background: color-mix(in srgb, var(--ink, #111) 45%, transparent);
}

/* ---------- badge ---------- */

.badge {
  --bw: clamp(178px, 16.4vw, 246px);
  --radius: 15px;
  position: relative;
  width: var(--bw);
  aspect-ratio: 5 / 7;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: grab;
  perspective: 1400px;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.34));
}

.badge:active {
  cursor: grabbing;
}

.badge:focus-visible {
  outline: 2px solid var(--focus, #7c9cff);
  outline-offset: 6px;
  border-radius: calc(var(--radius) + 4px);
}

.badge__flip {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.72s cubic-bezier(0.32, 0.9, 0.24, 1);
}

.badge__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #f2f3f5;
  color: #191b20;
  text-align: left;
}

.badge__face--back {
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #eee8ff 0%, #e6f0ff 42%, #fdf1ec 100%);
}

/* front */

.badge__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px 8px;
}

.badge__kicker,
.badge__id,
.badge__label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, #17140f 52%, transparent);
}

.badge__photo {
  position: relative;
  margin: 0 10px;
  border-radius: 9px;
  overflow: hidden;
  background: #f7f7f7;
  flex: 1 1 auto;
  min-height: 0;
}

.badge__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  user-select: none;
  -webkit-user-drag: none;
}

/* shimmer sweep on hover */
.badge__photo::after {
  content: "";
  position: absolute;
  inset: -30% -60%;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(255, 255, 255, 0.75) 50%,
    transparent 62%
  );
  transform: translate3d(-70%, 0, 0);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  pointer-events: none;
}

.badge:hover .badge__photo::after,
.badge:focus-visible .badge__photo::after {
  transform: translate3d(70%, 0, 0);
  opacity: 0.9;
}

.badge__names {
  padding: 9px 12px 0;
}

.badge__name {
  display: block;
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 560;
}

.badge__role {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.25;
  color: color-mix(in srgb, #17140f 55%, transparent);
}

.badge__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 10px 12px 11px;
  border-top: 1px solid rgba(23, 20, 15, 0.1);
  margin-inline: 12px;
  padding-inline: 0;
}

.badge__go {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #17140f;
  color: #f7f4ef;
  flex: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.badge__go svg {
  width: 11px;
  height: 11px;
}

.badge:hover .badge__go {
  transform: rotate(-45deg);
}

/* back — sizes are in em, scaled by --bw so the density holds at any width */

.badge__face--back {
  font-size: calc(var(--bw) / 21);
  line-height: 1.28;
}

.badge__face--back .badge__top {
  padding: 0.92em 0.95em 0.42em;
}

.badge__face--back .badge__kicker,
.badge__face--back .badge__id {
  font-size: 0.74em;
}

.badge__face--back .badge__label {
  display: block;
  font-size: 0.7em;
  letter-spacing: 0.1em;
}

.badge__who {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0 0.95em 0.4em;
  min-width: 0;
}

.badge__avatar {
  width: 2.35em;
  height: 2.35em;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(23, 20, 15, 0.12);
}

.badge__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.badge__who-name {
  display: block;
  font-size: 0.98em;
  line-height: 1.15;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge__who-role {
  display: block;
  font-size: 0.76em;
  line-height: 1.2;
  color: color-mix(in srgb, #17140f 55%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge__where {
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0 0.95em 0.45em;
  font-size: 0.74em;
  color: color-mix(in srgb, #17140f 62%, transparent);
}

.badge__where svg {
  width: 0.9em;
  height: 0.9em;
  flex: none;
}

.badge__blurb {
  padding: 0 0.95em 0.5em;
  font-size: 0.8em;
  line-height: 1.34;
  color: color-mix(in srgb, #17140f 72%, transparent);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge__sect {
  padding: 0.35em 0.95em 0.1em;
}

.badge__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.32em 0.95em;
  border-top: 1px solid rgba(23, 20, 15, 0.09);
  font-size: 0.8em;
}

.badge__row span:last-child {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.72em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, #17140f 45%, transparent);
  white-space: nowrap;
}

.badge__connect {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6em;
  padding: 0.55em 0.95em 0.85em;
  border-top: 1px solid rgba(23, 20, 15, 0.09);
}

.badge__col {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  min-width: 0;
}

.badge__mail {
  font-size: 0.8em;
  line-height: 1.3;
  color: inherit;
  border-bottom: 1px solid rgba(23, 20, 15, 0.25);
  padding-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.badge__qr {
  width: 3.7em;
  height: 3.7em;
  flex: none;
  display: block;
  background: #fff;
  border-radius: 2px;
}

/* ---------- footer notes ---------- */

.aiteam__notes {
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  width: 100%;
  margin: clamp(28px, 6svh, 56px) auto 0;
  padding-inline: clamp(18px, 4vw, 44px);
}

.aiteam__note {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink, #111) 45%, transparent);
}

/* ---------- compact (≤ 820px): plain grid, no wire, tap to flip ---------- */

.aiteam.is-compact {
  padding-block: 108px 72px;
}

.aiteam.is-compact .aiteam__rig {
  height: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 5vw, 34px);
  padding-inline: clamp(16px, 5vw, 34px);
  max-width: 620px;
}

.aiteam.is-compact .aiteam__wire {
  display: none;
}

.aiteam.is-compact .slot {
  container-type: inline-size;
  position: relative;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: auto;
}

.aiteam.is-compact .slot__clip,
.aiteam.is-compact .slot__strap {
  display: none;
}

.aiteam.is-compact .slot__hanger {
  padding-top: 0;
}

.aiteam.is-compact .badge {
  /* a percentage here would poison calc(--bw / 21) (font-size), so the card
     takes its width from the slot container instead */
  --bw: 100cqw;
  width: 100%;
}

.aiteam.is-compact .aiteam__notes {
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-start;
}

@media (prefers-reduced-motion: reduce) {
  .badge__photo::after {
    display: none;
  }
  .badge__flip {
    transition: none;
  }
}

/* Team introduction and example-agent content */
.aiteam{justify-content:flex-start;padding-block:clamp(110px,14vh,150px) 72px;overflow:visible}
.aiteam__intro{text-align:center;padding:0 24px;margin:0 auto 38px;max-width:800px;color:var(--ink)}
.aiteam__eyebrow{font:500 10px/1.4 var(--font-mono,monospace);letter-spacing:.16em;color:var(--ink-muted)}
.aiteam__intro h1{font-size:clamp(2.2rem,4.5vw,4.2rem);font-weight:600;letter-spacing:-.05em;line-height:1.12;margin:16px 0 12px}
.aiteam__intro p{font-size:clamp(.95rem,1.2vw,1.1rem);color:var(--ink-muted);line-height:1.6}
.aiteam__custom{display:flex;align-items:center;justify-content:center;gap:18px;max-width:720px;width:calc(100% - 48px);margin:48px auto 0;text-align:left;color:var(--ink)}
.aiteam__custom-icon{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:#1a2ffb;font-size:28px;line-height:1;flex:none}
.aiteam__custom h2{font-size:clamp(1.1rem,1.7vw,1.5rem);font-weight:600;letter-spacing:-.02em;margin:0 0 6px}
.aiteam__custom p{font-size:clamp(.85rem,1vw,1rem);line-height:1.6;color:var(--ink-muted);margin:0}
.aiteam__notes{margin-top:34px}.badge__name{font-weight:650}.badge__role{font-size:clamp(10px,.8vw,12px);margin-top:5px}
.agent-back{display:flex;flex-direction:column;flex:1;padding:1.8em 1.25em 1.3em}.agent-back__number{font:500 .72em/1.4 var(--font-mono,monospace);letter-spacing:.08em;opacity:.5}.agent-back__title{font-size:1.65em;font-weight:650;letter-spacing:-.04em;margin-top:1.2em}.agent-back__line{height:1px;background:rgba(23,20,15,.16);margin:1.1em 0}.agent-back__description{font-size:1.08em;line-height:1.7}.agent-back__hint{margin-top:auto;font-size:.78em;opacity:.55}
@media(max-width:820px){.aiteam.is-compact{padding-block:105px 64px}.aiteam__intro{margin-bottom:32px}.aiteam__custom{margin-top:38px}.aiteam__notes{justify-content:center!important;text-align:center}}
