/* ─── Wins page ──────────────────────────────────────────────────────────────
   All styles scoped to the wins panel. Fonts: Bricolage Grotesque (display)
   loaded via Google Fonts in index.html. Body font falls back to system stack.
─────────────────────────────────────────────────────────────────────────────── */

@keyframes wins-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--gc, transparent), 0 0 0 0 var(--glow, transparent); }
  50%       { box-shadow: 0 0 0 1px var(--gc, transparent), 0 0 28px 2px var(--glow, transparent); }
}
@keyframes wins-live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* Reveal animation — elements animate in when JS adds .is-revealed.
   Without it they are still fully visible so the page never shows blank. */
.wins-root [data-reveal] {
  transition: opacity 460ms ease, transform 460ms ease;
}
.wins-root [data-reveal].is-hidden-pre-reveal {
  opacity: 0;
  transform: translateY(18px);
}
.wins-root [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ── Root wrapper ── */
.wins-root {
  padding-bottom: 80px;
}

/* ── Hero ── */
.wins-hero { padding: 60px 28px 32px; }
.wins-hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }

.wins-eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.wins-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.wins-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
  animation: wins-live-pulse 2s ease-in-out infinite;
}
.wins-headline {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .96;
  font-size: clamp(44px, 7.4vw, 86px);
  margin: 24px 0 0;
  color: var(--ink);
}
.wins-subhead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  margin: 20px auto 0;
  max-width: 540px;
  line-height: 1.55;
  font-weight: 500;
}

/* ── Stat grid ── */
.wins-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 44px;
  padding: 0 28px;
}
.wins-stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px 20px;
}
.wins-stat-num {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  font-size: clamp(40px, 5vw, 60px);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wins-stat-label {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.wins-stat-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.wins-sub-green { color: var(--green) !important; }
.wins-est { color: var(--muted); font-weight: 600; }

/* ── Milestone banner ── */
.wins-banner {
  margin-top: 32px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
body[data-theme="light"] .wins-banner {
  background: #ECE3D4;
}
.wins-banner-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 62px 28px;
  text-align: center;
}
.wins-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--amber);
}
.wins-banner-quote {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
  font-size: clamp(24px, 4.2vw, 50px);
  color: var(--ink);
  margin: 20px 0 0;
}
.wins-quote-accent { color: var(--blue); }
.wins-banner-next {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Shared section layout ── */
.wins-section { padding: 58px 28px 14px; }
.wins-section-last { padding-bottom: 60px; }
.wins-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.wins-section-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.wins-rule {
  display: inline-block;
  width: 16px;
  height: 1.5px;
  background: var(--blue);
}
.wins-section-title {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
  font-size: clamp(22px, 3.2vw, 34px);
  margin: 8px 0 0;
  color: var(--ink);
}
.wins-section-aside { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── Brand trophy shelf ── */
.wins-brand-scroll {
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x proximity;
}
.wins-brand-scroll::-webkit-scrollbar { height: 7px; }
.wins-brand-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.wins-brand-scroll::-webkit-scrollbar-track { background: transparent; }
.wins-brand-shelf { display: flex; gap: 14px; width: max-content; }
.wins-brand-card {
  position: relative;
  width: 208px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  overflow: hidden;
}
.wins-brand-topbar { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.wins-brand-glow {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  animation: wins-glow-pulse 2.8s ease-in-out infinite;
}
.wins-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.wins-brand-name {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.wins-brand-done {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid;
}
.wins-brand-num {
  margin-top: 26px;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wins-brand-sub { margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.wins-brand-track {
  margin-top: 14px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.wins-brand-fill { height: 100%; border-radius: 999px; }

/* ── Team grid ── */
.wins-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
  gap: 12px;
}
.wins-team-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
}
.wins-team-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.wins-team-info { flex: 1; min-width: 0; }
.wins-team-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.wins-team-role {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 2px;
}
.wins-team-stat { text-align: right; }
.wins-team-count {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wins-team-unit {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Recent wins ── */
.wins-recent-list { display: flex; flex-direction: column; gap: 10px; }
.wins-recent-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 14px;
  padding: 14px 20px;
}
.wins-recent-year {
  flex: 0 0 auto;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--muted);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  width: 50px;
}
.wins-recent-info { flex: 1; min-width: 0; }
.wins-recent-title {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.wins-recent-meta { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.wins-recent-status {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Empty state ── */
.wins-empty { text-align: center; padding: 56px 28px; }
.wins-empty-title {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 10px;
}
.wins-empty-sub {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .wins-hero { padding: 36px 16px 20px; }
  .wins-stat-grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px; gap: 10px; }
  .wins-stat-card { padding: 18px 14px 14px; }
  .wins-section { padding: 44px 16px 10px; }
  .wins-banner-inner { padding: 40px 18px; }
  .wins-section-head { flex-direction: column; align-items: flex-start; }
  .wins-recent-year { display: none; }
  .wins-recent-row { gap: 12px; padding: 12px 14px; }
}

/* ─── Workspace view integration ────────────────────────────────────────────
   Hide the standard pipeline chrome when wins view is active,
   and show the wins panel. Follows the same pattern as other views
   in workbench.css.
─────────────────────────────────────────────────────────────────────────────── */

/* Show wins panel */
body[data-workspace-view="wins"] #winsPanel {
  display: block;
}

/* Hide pipeline chrome that belongs to other views */
body[data-workspace-view="wins"] .summary-grid,
body[data-workspace-view="wins"] #focusPanel,
body[data-workspace-view="wins"] .toolbar,
body[data-workspace-view="wins"] .achievement-strip,
body[data-workspace-view="wins"] .board,
body[data-workspace-view="wins"] .table-section,
body[data-workspace-view="wins"] #myWorkPanel,
body[data-workspace-view="wins"] #adminPanel,
body[data-workspace-view="wins"] #upcomingPanel,
body[data-workspace-view="wins"] #docsPanel,
body[data-workspace-view="wins"] #settingsPanel,
body[data-workspace-view="wins"] .header-search {
  display: none !important;
}
