/* VFL presenter intro — v5.16
   A broadcast cold-open card. Brief tokens only:
     --brand #1edb8a, --alert #ff3d57, --data #ffd23f
     Oswald for display, JetBrains Mono for time/labels, Inter for body.
*/

.presenter-intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
  pointer-events: auto;
}

.presenter-intro .pi-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 800px at 50% 35%, rgba(30, 219, 138, 0.08), transparent 70%),
    linear-gradient(180deg, #05090f 0%, #02060c 100%);
  opacity: 0;
  transition: opacity 320ms ease-out;
}
.presenter-intro.is-in .pi-scrim { opacity: 1; }
.presenter-intro.is-out .pi-scrim { opacity: 0; transition: opacity 420ms ease-in; }

.presenter-intro .pi-card {
  position: relative;
  width: min(760px, 92vw);
  padding: 40px 44px 28px;
  background: linear-gradient(180deg, #0b121d 0%, #070d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(30, 219, 138, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity 420ms ease-out,
    transform 520ms cubic-bezier(.25,.9,.3,1.05);
}
.presenter-intro.is-in .pi-card { opacity: 1; transform: translateY(0) scale(1); }
.presenter-intro.is-out .pi-card {
  opacity: 0;
  transform: translateY(-10px) scale(1.01);
  transition: opacity 380ms ease-in, transform 380ms ease-in;
}

/* Top + bottom accent rails */
.presenter-intro .pi-rail {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(30,219,138,0.75) 50%, transparent 100%);
  opacity: 0.85;
}
.presenter-intro .pi-rail-top { top: 0; border-radius: 10px 10px 0 0; }
.presenter-intro .pi-rail-bot {
  bottom: 0;
  height: 26px;
  background: linear-gradient(180deg, transparent 0%, rgba(30,219,138,0.06) 100%);
  border-top: 1px solid rgba(30,219,138,0.25);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.presenter-intro .pi-rail-ticker {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(30,219,138,0.0) 0px,
    rgba(30,219,138,0.0) 14px,
    rgba(30,219,138,0.35) 14px,
    rgba(30,219,138,0.35) 16px
  );
  animation: piTicker 6s linear infinite;
  opacity: 0.55;
}
@keyframes piTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(-80px); }
}

/* Brand row */
.presenter-intro .pi-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f4f8ff;
  font-size: 13px;
  margin-bottom: 24px;
}
.presenter-intro .pi-brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3d57;
  box-shadow: 0 0 12px rgba(255, 61, 87, 0.95);
  animation: piBlink 1.4s ease-in-out infinite;
}
@keyframes piBlink { 0%,100%{opacity:1} 50%{opacity:.35} }
.presenter-intro .pi-brand-word { color: #f4f8ff; }
.presenter-intro .pi-brand-meta {
  color: #9fb6cd;
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* Matchup */
.presenter-intro .pi-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.presenter-intro .pi-team {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.presenter-intro .pi-team-away {
  flex-direction: row-reverse;
  text-align: right;
}
.presenter-intro .pi-crest {
  width: 72px; height: 72px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-shadow:
    0 6px 20px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
  animation: piCrestIn 620ms cubic-bezier(.25,.9,.3,1.05) both;
}
.presenter-intro .pi-team-away .pi-crest { animation-delay: 120ms; }
@keyframes piCrestIn {
  from { transform: scale(0.7) translateY(6px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.presenter-intro .pi-team-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: #f4f8ff;
  line-height: 1.05;
  text-transform: uppercase;
}
.presenter-intro .pi-team-short {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #9fb6cd;
  letter-spacing: 0.14em;
  margin-top: 4px;
}
.presenter-intro .pi-vs {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #556577;
  letter-spacing: 0.08em;
}

/* Meta block */
.presenter-intro .pi-meta {
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 0;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.presenter-intro .pi-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.presenter-intro .pi-meta-split { justify-content: space-between; gap: 8px; }
.presenter-intro .pi-meta-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #9fb6cd;
  text-transform: uppercase;
}
.presenter-intro .pi-meta-val {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  color: #f4f8ff;
  letter-spacing: 0.04em;
}
.presenter-intro .pi-meta-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #9fb6cd;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 5px 10px;
}
.presenter-intro .pi-meta-chip-alt {
  color: #ffd23f;
  border-color: rgba(255, 210, 63, 0.22);
  background: rgba(255, 210, 63, 0.06);
}

/* Presenter row */
.presenter-intro .pi-presenter {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(30, 219, 138, 0.06);
  border: 1px solid rgba(30, 219, 138, 0.22);
  border-radius: 10px;
}
.presenter-intro .pi-mic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(30, 219, 138, 0.12);
  color: #1edb8a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: piMicPulse 2.6s ease-in-out infinite;
}
@keyframes piMicPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(30,219,138,0.25); }
  50%     { box-shadow: 0 0 0 6px rgba(30,219,138,0.0); }
}
.presenter-intro .pi-presenter-text {
  flex: 1;
  min-width: 0;
}
.presenter-intro .pi-presenter-role {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #9fb6cd;
  text-transform: uppercase;
}
.presenter-intro .pi-presenter-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #f4f8ff;
  line-height: 1.1;
  margin-top: 2px;
}
.presenter-intro .pi-onair {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #ff3d57;
  border: 1px solid rgba(255, 61, 87, 0.4);
  border-radius: 4px;
  padding: 4px 8px;
  background: rgba(255, 61, 87, 0.08);
  flex-shrink: 0;
  animation: piBlink 1.4s ease-in-out infinite;
}

/* Skip button */
.presenter-intro .pi-skip {
  position: absolute;
  top: 14px; right: 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #9fb6cd;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
  text-transform: uppercase;
}
.presenter-intro .pi-skip:hover {
  color: #f4f8ff;
  border-color: rgba(30, 219, 138, 0.45);
  background: rgba(30, 219, 138, 0.08);
}

/* While the intro is up we dim the broadcast chrome behind it so nothing
   leaks visually: scorebar, subbar, odds strip, dock, chat. */
body.intro-active .scorebar,
body.intro-active .subbar,
body.intro-active .scorebar-odds,
body.intro-active .dock,
body.intro-active .live-feel,
body.intro-active .vfl-ticker,
body.intro-active .stats,
body.intro-active .broadcast-hud,
body.intro-active .corner-overlay,
body.intro-active .momentum,
body.intro-active .commentator-chyron {
  opacity: 0 !important;
  transition: opacity 240ms ease-out !important;
  pointer-events: none !important;
}
/* And hold the pitch black until the intro clears — the canvas keeps rendering
   but we mask it so the user doesn't see the field under the card. */
body.intro-active #pitch,
body.intro-active .pitch-wrap canvas {
  filter: brightness(0.25) saturate(0.4);
  transition: filter 280ms ease-out;
}

/* Mobile */
@media (max-width: 640px) {
  .presenter-intro .pi-card {
    width: calc(100vw - 24px);
    padding: 34px 20px 20px;
  }
  /* Stack the matchup vertically so team names can't clash with VS */
  .presenter-intro .pi-matchup {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
    justify-items: stretch;
  }
  .presenter-intro .pi-team {
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
  }
  .presenter-intro .pi-team-away {
    flex-direction: row;      /* drop the reverse on mobile — cleaner */
    text-align: left;
  }
  .presenter-intro .pi-crest { width: 44px; height: 44px; border-radius: 8px; }
  .presenter-intro .pi-team-name { font-size: 18px; }
  .presenter-intro .pi-team-short { display: none; } /* redundant with flag; save space */
  .presenter-intro .pi-vs {
    font-size: 12px; color: #556577;
    text-align: center;
    letter-spacing: 0.22em;
  }
  .presenter-intro .pi-meta { padding: 12px 0; margin-bottom: 18px; gap: 10px; }
  .presenter-intro .pi-meta-row { flex-wrap: wrap; }
  .presenter-intro .pi-meta-label { font-size: 10px; }
  .presenter-intro .pi-meta-val { font-size: 14px; letter-spacing: 0.04em; line-height: 1.3; }
  .presenter-intro .pi-presenter { padding: 12px 12px; gap: 12px; }
  .presenter-intro .pi-presenter-role { font-size: 10px; }
  .presenter-intro .pi-presenter-name { font-size: 17px; }
  .presenter-intro .pi-mic { width: 36px; height: 36px; }
  .presenter-intro .pi-onair { font-size: 9px; padding: 3px 6px; }
  .presenter-intro .pi-brand { font-size: 11px; margin-bottom: 16px; }
  .presenter-intro .pi-brand-meta { display: none; }
  .presenter-intro .pi-skip { top: 10px; right: 10px; padding: 4px 9px; font-size: 10px; }
}
