/* ==========================================================================
   FANTASY BOSSES INC — assets/team-season-cards.css
   Franchise-card grid — "The Ten Franchises" — rendered on seasons/{year}.html
   by assets/team-season-cards.js from the static assets/data/team-season-cards.json.

   New module; does not edit assets/fbi.css. Draws on the same tokens/voice
   (brand/APPROVED-DESIGN-SYSTEM.md) and sits on the season page's existing
   dark ground (body background is --deep-ink sitewide — see fbi.css §1/§2),
   matching sibling dark "plate" components already on this page type
   (.ssn-draft-card, .plate, .hammer-ledger). Only the champion card departs
   from the shared plate treatment, per the design system's ETCHED rule:
   "Champions get etched; everyone else gets a new team name."
   ========================================================================== */

.tsc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

@media (min-width: 700px) {
  .tsc-grid { gap: 24px; }
}

/* ---- card shell ---- */
.tsc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--navy-850);
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(4, 9, 22, .28);
}

.tsc-card--champion {
  border-color: rgba(255, 130, 0, .5);
  box-shadow: 0 0 0 1px rgba(255, 130, 0, .22), 0 18px 40px rgba(4, 9, 22, .4);
}

/* ---- art slot: manager square art, lazy-loaded, with an intentional
   powder + monogram fallback that never looks like a broken image ---- */
.tsc-card__art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, var(--powder-500), var(--powder-600));
  overflow: hidden;
}
.tsc-card__mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 11vw, 4.4rem);
  color: var(--structural-navy);
  opacity: .55;
  line-height: 1;
  user-select: none;
}
.tsc-card__art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-snap);
}
.tsc-card__art-img.is-loaded { opacity: 1; }

/* ---- finish ribbon: overlaps the art's top-left corner. Champion = the
   ONE sanctioned use of --big-orange here (ink text on orange, per the
   hard contrast rule); every other finish is the same neutral powder chip
   regardless of place — never shame styling. ---- */
.tsc-card__ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--deep-ink);
  background: var(--powder-100);
  box-shadow: 0 4px 10px rgba(4, 9, 22, .3);
}
.tsc-card--champion .tsc-card__ribbon {
  background: var(--big-orange);
}

/* ---- body ---- */
.tsc-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.tsc-card__team {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--text);
  overflow-wrap: break-word;
}
/* Champions' team names get the ETCHED treatment — Plex Mono 700, uppercase,
   .14em letterspacing, inset "cut into metal" shadow — matches fbi.css
   .etched (APPROVED-DESIGN-SYSTEM.md §3) exactly. Restated in full here
   rather than left to the cascade: this stylesheet loads after fbi.css, so
   a plain ".etched" rule and this plain ".tsc-card__team" rule are tied in
   specificity and the later-loaded one (this file) would otherwise win and
   silently clobber the etched look. */
.tsc-card__team.etched {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(234, 243, 252, .95);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 255, 255, .18);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.25;
}

.tsc-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tsc-card__manager {
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text);
}
.tsc-card__division {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--text-soft);
  overflow-wrap: break-word;
}

/* ---- compact stat row: record + reg.-season rank (short values) over
   points for + points against (longer numbers) — a 2x2 grid, not 4-across,
   so "1,555.12" never has to truncate. ---- */
.tsc-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.tsc-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tsc-stat .tsc-stat__n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tsc-stat .tsc-stat__l {
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ---- core roster: position-chipped player rows ---- */
.tsc-roster { display: flex; flex-direction: column; }
.tsc-roster__label {
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.tsc-roster-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .08);
}
.tsc-roster-row:last-child { border-bottom: none; }
.tsc-roster-pos {
  flex: none;
  min-width: 2.5em;
  text-align: center;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--structural-navy);
  background: var(--powder-500);
  border-radius: 5px;
  padding: 3px 5px;
  align-self: flex-start;
}
.tsc-roster-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--text);
  overflow-wrap: break-word;
}
.tsc-roster-starts {
  flex: none;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .72rem;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ---- section shell (mirrors the season page's existing .section-head
   pattern from assets/season-render.js, not redefined here) ---- */
.tsc-section .tsc-intro { max-width: 66ch; }

@media (prefers-reduced-motion: reduce) {
  .tsc-card__art-img { transition: none; }
}
