/* Kivi Arena on the main site: the banner above the nav, the "● arena" nav
 * link, the hero line and the corner mascot (src/components/ArenaPromo.astro,
 * public/assets/js/kivi-arena-promo.js). Uses the site's own tokens. */

/* ------------------------------------------------------------- the banner */
.arena-bar {
  position: fixed;
  z-index: 101;
  inset: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 56px;
  background: #0f1712;
  border-bottom: 1px solid rgba(168, 224, 99, 0.18);
  color: var(--dusk-ink, #f4f1e6);
  font-family: var(--font-body, system-ui, sans-serif);
}
.arena-bar[hidden] { display: none; }
/* a thin moving gradient under the banner while the arena runs */
.arena-bar[data-state="live"]::after,
.arena-bar[data-state="final"]::after,
.arena-bar[data-state="joining"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: linear-gradient(90deg, #2fbced, #a8e063, #fcfc62, #a8e063, #2fbced);
  background-size: 200% 100%;
  animation: arena-bar-sweep 6s linear infinite;
}
@keyframes arena-bar-sweep { to { background-position: -200% 0; } }

.arena-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}
.arena-bar__mark { font-family: var(--font-display, Georgia, serif); font-size: 19px; letter-spacing: -0.01em; }
.arena-bar__mark b {
  font-weight: inherit;
  padding: 0 6px 2px;
  margin-left: 2px;
  border-radius: 5px;
  background: #bbd987;
  color: #0f1f14;
}
.arena-bar__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a8e063;
  box-shadow: 0 0 0 4px rgba(168, 224, 99, 0.18);
}
.arena-bar[data-state="live"] .arena-bar__dot,
.arena-bar[data-state="final"] .arena-bar__dot { animation: arena-dot 1.6s ease-in-out infinite; }
@keyframes arena-dot { 50% { box-shadow: 0 0 0 7px rgba(168, 224, 99, 0.05); } }
.arena-bar__text { overflow: hidden; text-overflow: ellipsis; }
.arena-bar__hi { color: #fcfc62; font-weight: 600; }
.arena-bar__cta {
  padding: 6px 16px 7px;
  border-radius: 999px;
  background: #fcfc62;
  color: #0f1f14;
  font-weight: 600;
  box-shadow: inset 0 -3px 0 rgba(6, 7, 14, 0.18);
  transition: transform 160ms var(--ease-enter, ease);
}
.arena-bar__link:hover .arena-bar__cta,
.arena-bar__link:focus-visible .arena-bar__cta { transform: translateY(-1px); }
.arena-bar__link:focus-visible { outline: 2px solid #fcfc62; outline-offset: 4px; border-radius: 8px; }
.arena-bar__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 241, 230, 0.08);
  color: inherit;
  cursor: pointer;
}
.arena-bar__close:hover, .arena-bar__close:focus-visible { background: rgba(244, 241, 230, 0.16); outline: 0; }
.arena-bar__close svg { width: 16px; height: 16px; }

/* the fixed nav moves down under the banner */
html.arena-bar-on .v19-nav { top: 48px; }

@media (max-width: 720px) {
  .arena-bar { padding: 0 48px 0 12px; justify-content: flex-start; }
  .arena-bar__mark, .arena-bar__dot { display: none; }
  .arena-bar__link { gap: 8px; font-size: 14px; }
  .arena-bar__cta { padding: 5px 12px 6px; }
}

/* ---------------------------------------------------------- the nav link */
.v19-nav__arena[hidden] { display: none; }
.v19-nav__arena { display: inline-flex; align-items: center; gap: 6px; color: #a8e063; }
.v19-nav__arena i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a8e063;
  box-shadow: 0 0 0 3px rgba(168, 224, 99, 0.2);
}
.v19-nav__links > a.v19-nav__arena { opacity: 1; }
.v19-nav__arena.is-live {
  padding: 6px 14px;
  margin-block: -6px;
  border: 1px solid rgba(168, 224, 99, 0.45);
  border-radius: 999px;
  background: rgba(168, 224, 99, 0.08);
}

/* ------------------------------------------------------- the hero line */
.arena-note[hidden] { display: none; }
.arena-note { margin-top: 10px; }

/* ---------------------------------------------------------- the mascot */
.arena-mascot[hidden] { display: none; }
.arena-mascot {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  text-decoration: none;
  color: #0f1f14;
}
.arena-mascot__bubble {
  display: grid;
  gap: 2px;
  margin-bottom: 56px;
  padding: 10px 16px 12px;
  border-radius: 16px 16px 4px 16px;
  background: #fff5dd;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(-4deg);
  font-family: var(--font-body, system-ui, sans-serif);
}
.arena-mascot__bubble b { font-size: 15px; }
.arena-mascot__bubble span { font-size: 13px; opacity: 0.75; }
.arena-mascot__kivi {
  width: 96px;
  height: auto;
  transform: translateY(18px);
  transition: transform 220ms var(--ease-enter, ease);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}
.arena-mascot:hover .arena-mascot__kivi,
.arena-mascot:focus-visible .arena-mascot__kivi { transform: translateY(4px) rotate(-6deg); }
.arena-mascot:focus-visible { outline: 2px solid #fcfc62; outline-offset: 4px; border-radius: 16px; }
@media (max-width: 720px) {
  .arena-mascot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .arena-bar::after, .arena-bar__dot, .arena-mascot__kivi { animation: none !important; transition: none !important; }
}
