/* ================================================================
   PCFL NETWORK: Coaches page (#/coaches) + coach badges on team pages
   Uses the design tokens from site.css.
   ================================================================ */

/* badges (team grid, team hero, coach cards) */
[data-coach-slot]:empty { display: none; }
.coach-badge {
  display: inline-flex; align-items: center; vertical-align: middle;
  font-family: var(--font-head); font-size: 10px; font-weight: 600; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px 3px; border-radius: 4px;
  margin-left: 8px; white-space: nowrap;
}
.coach-badge.cpu { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.coach-badge.commish { background: var(--gold); color: var(--ink); border: 1px solid var(--gold); }
.tcard .nm .coach-badge { font-size: 9px; position: relative; top: -4px; }
.team-hero .nm .coach-badge { font-size: 12px; padding: 5px 9px 4px; position: relative; top: -8px; margin-left: 12px; }

/* page */
.coaches-hero { padding-bottom: 6px; }
.coaches-hero-inner { padding: 18px 40px 30px; }
.coaches-hero .tname { font-size: 64px; }
.coaches-hero .tsub { margin-top: 8px; }
.coaches-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 22px; }
.coaches-stats > div > b { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.coaches-stats > div > span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.coaches-stats .cs-commish { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.coaches-stats .cs-commish img { width: 34px; height: 34px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.coaches-stats .cs-commish b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1; letter-spacing: .03em; color: #fff; }
.coaches-stats .cs-commish span span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.coaches-note {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 -10px; padding: 11px 16px;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  color: var(--muted); font-size: 13px;
}
.coaches-note svg { flex-shrink: 0; color: var(--muted-2); }
.coaches-note > span { flex: 1 1 200px; min-width: 0; }
.coaches-note b { margin-left: auto; color: var(--red); font-weight: 600; font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
a.coaches-note:hover { border-color: #cfd3d9; color: var(--text); }
a.coaches-note:hover b { text-decoration: underline; }

.coaches-div { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.coaches-div span { font-family: var(--font-head); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.coaches-div::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin-bottom: 26px; }

/* card */
.coach-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
  transition: transform .18s, box-shadow .18s;
}
.coach-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.coach-card .cc-top {
  position: relative; display: block; min-height: 88px; padding: 16px 18px 14px; color: #fff; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--c1) 0%, #101317 135%);
  border-bottom: 3px solid var(--c2);
}
.coach-card .cc-top::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.08) 50%, transparent 65%);
}
.coach-card .cc-wm {
  position: absolute; right: -12px; top: 50%; width: 104px; height: 104px; transform: translateY(-50%) rotate(-8deg);
  opacity: .28; z-index: -1; transition: transform .3s, opacity .3s;
}
.coach-card:hover .cc-wm { transform: translateY(-50%) rotate(-3deg) scale(1.06); opacity: .4; }
.coach-card .cc-team { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: .02em; padding-right: 70px; }
.coach-card .cc-nick { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }

.coach-card .cc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 16px; }
.coach-card .cc-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--font-head); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); }
.coach-card .cc-label .coach-badge { margin-left: 2px; }
.coach-card .cc-label .coach-badge.cpu { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.coach-card .cc-coach { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coach-card .cc-logo { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.coach-card .cc-first { font-family: var(--font-display); font-size: 36px; line-height: 1; letter-spacing: .03em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coach-card .cc-first.cc-muted { font-size: 26px; color: var(--muted-2); }
.coach-card .cc-meta { font-size: 12px; color: var(--muted); }
.coach-card .cc-email {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; max-width: 100%; margin-top: 6px;
  padding: 6px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--text);
}
.coach-card .cc-email span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coach-card .cc-email svg { flex-shrink: 0; color: var(--red); }
.coach-card .cc-email:hover { border-color: var(--red); color: var(--red); }
.coach-card.is-commish { border-color: rgba(241,190,72,.75); box-shadow: 0 0 0 1px rgba(241,190,72,.45), var(--shadow-1); }
.coach-card.is-cpu .cc-logo { filter: grayscale(.35); opacity: .85; }

@media (max-width: 760px){
  .coaches-hero-inner { padding: 14px 20px 24px; }
  .coaches-hero .tname { font-size: 44px; }
  .coaches-stats { gap: 18px; }
  .coaches-stats > div > b { font-size: 32px; }
}
@media (max-width: 640px){
  /* site .wrap is 14px on phones; the coaches page keeps a 16px gutter */
  .coaches-page { padding: 0 2px; }
  .coach-grid { grid-template-columns: 1fr; gap: 12px; }
  .coaches-hero .chyron { margin-left: 16px; }
  .coaches-note { flex-wrap: wrap; }
  .coaches-note b { margin-left: 26px; }
  .tcard .nm .coach-badge { display: table; margin: 4px 0 0; top: 0; }
  .team-hero .nm .coach-badge { font-size: 10px; top: -5px; margin-left: 8px; }
  /* team hero on phones: the name/meta block (now carrying the head coach) gets the row beside
     the logo instead of collapsing to a few pixels next to the fight-song chip */
  .team-hero > div:has(> .nm) { flex-basis: calc(100% - 86px) !important; }
}
@media (prefers-reduced-motion: reduce){
  .coach-card, .coach-card .cc-wm { transition: none; }
}
