/* ==========================================================================
   Try your team — pick a league + team, the LED box shows their signature game
   ========================================================================== */

.team {
  padding: 96px var(--gutter);
  background: var(--c-paper);
  color: var(--c-ink);
}

@media (min-width: 990px) {
  .team { padding: 140px var(--gutter); }
}

.team__inner {
  display: grid;
  gap: 48px;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}

@media (min-width: 990px) {
  .team__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; }
  .team__stage { position: sticky; top: calc(var(--header-h) + 32px); }
}

.team__eyebrow { color: rgba(0, 0, 0, 0.6); }
.team__title { font-size: clamp(48px, 6vw, 92px); }

.team__title em {
  display: inline-block;
  margin-top: 0.08em;
  padding: 0.04em 0.1em 0;
  line-height: 1;
  background: var(--c-accent);
  color: var(--c-ink);
}

.team__intro {
  max-width: 44ch;
  margin: 18px 0 0;
  font-size: 17px;
  color: rgba(0, 0, 0, 0.65);
}

/* ---------- league tabs ---------- */

.team__tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 32px;
  padding: 4px;
  border-radius: 999px;
  background: #f0f0ec;
}

.team__tab {
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s, color 0.2s;
}

.team__tab:hover { color: var(--c-ink); }
.team__tab[aria-selected="true"] { background: var(--c-ink); color: var(--c-accent); }

/* ---------- search + grid ---------- */

.team__search {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 16px;
  padding: 0 16px 0 44px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") 14px center / 18px no-repeat,
    #fff;
  font: 500 15px var(--font-body);
  color: var(--c-ink);
}

.team__search:focus { outline: none; border-color: var(--c-ink); }

.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 420px;
  margin-top: 12px;
  padding: 2px 6px 2px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.team__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.team__chip:hover { border-color: rgba(0, 0, 0, 0.35); transform: translateY(-1px); }
.team__chip[aria-pressed="true"] { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }

.team__swatch {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  font: 700 10px/1 var(--font-mono);
  color: #fff;
}

.team__chip-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.team__empty {
  grid-column: 1 / -1;
  padding: 24px 0;
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
}

/* ---------- stage: LED box + caption ---------- */

.team__card {
  display: grid;
  place-items: center;
  padding: 12% 8%;
  border-radius: 24px;
  /* light, plain surface so the dark LED box clearly stands apart from it */
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, var(--team-glow, rgba(212, 255, 0, 0.18)), transparent 72%),
    linear-gradient(180deg, #f1f1ee 0%, #e4e4df 100%);
  transition: background 0.6s;
}

.team__device { position: relative; width: 100%; perspective: 1600px; }

/* soft floor shadow under the box */
.team__device::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 98%;
  height: 14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.28), transparent);
}
.team__device .device { transform: rotateX(3deg) rotateY(-8deg); }

.team__caption {
  margin: 20px 4px 0;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.7);
}

.team__caption strong { color: var(--c-ink); }

.team__caption a {
  margin-left: 6px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

/* fit the 128-LED-wide screen: smaller big word, tighter 3-digit scores */
.team__device .s > * { min-width: 0; }
.team__device .s__big { font-size: 13cqw; }
.team__device .s__score.is-long { gap: 1.6cqw; }
.team__device .s__score.is-long .s__num { font-size: 8.4cqw; }
.team__device .s__score.is-long .s__team { font-size: 4.8cqw; }
.team__device .s__bottom { font-size: 4.2cqw; }

/* screen text sized for long titles */
.team__device .s__top span:first-child {
  overflow: hidden;
  max-width: 70%;
  white-space: nowrap;
  text-overflow: clip;
}
