/* ==========================================================================
   Events (/podii/): the event's name, who runs it and its badge, how it
   plays, and what comes next. The badge and the step pictures are SVGs in
   data/art/ (made by event-badge/badge.mjs) that move on their own.
   ========================================================================== */

.event {
  padding-top: var(--nav-total);
}

/* ---------- The event ---------- */

.event-hero {
  display: grid;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding-block: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 56px);
}

@media (min-width: 960px) {
  .event-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    min-height: min(calc(100svh - var(--nav-total)), 820px);
  }
}

.event-hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* The event's state, with a slow pulse on its dot; green while it runs. */
.event-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:root[data-theme="light"] .event-chip {
  color: #8a5a06;
}

.event-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: event-pulse 2.2s ease-out infinite;
}

.event-chip--live {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

:root[data-theme="light"] .event-chip--live {
  color: #1d7a36;
}

@keyframes event-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, currentColor 0%, transparent); }
}

/* The event's name: the title capitals, gold like the coin (deeper gold on the light page). Sized
   so «Дилерський», the longest word, fits its column; the end padding keeps the last letter's
   overhang inside the box, since gradient text is only painted there. */
.event-hero__title {
  margin-top: 18px;
  padding-right: 0.08em;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 0.9rem + 5.6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.98;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff4c8 0%, #f6cf62 42%, #d39a2a 72%, #f3c85a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(245, 189, 58, 0.22));
}

:root[data-theme="light"] .event-hero__title {
  background-image: linear-gradient(180deg, #c98a14 0%, #a46a08 55%, #7a4c04 100%);
  filter: none;
}

.event-hero .lead {
  max-width: 26em;
  text-wrap: pretty;
}

/* The organizer, with the store's coin and his name set like the home page's title. */
.event-host {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 36px);
}

.event-host__coin {
  width: 54px;
  height: 54px;
  flex: none;
  filter: drop-shadow(0 6px 16px rgba(240, 180, 41, 0.28));
}

.event-host__text {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.event-host__text small {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-host__name {
  font-family: "Cinzel", "Trajan Pro", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff4c8 0%, #f6cf62 42%, #d39a2a 72%, #f3c85a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="light"] .event-host__name {
  background-image: linear-gradient(180deg, #c98a14 0%, #a46a08 55%, #7a4c04 100%);
}

.event-host__text span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.event-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}

/* The badge floats in a gold and violet glow. */
.event-badge {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 520px);
  margin: 0;
}

.event-badge::before {
  content: "";
  position: absolute;
  inset: 6% 6% 12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 189, 58, 0.3), rgba(141, 124, 201, 0.2) 58%, transparent);
  filter: blur(30px);
}

.event-badge img {
  display: block;
  width: 100%;
  height: auto;
  animation: event-float 6.5s ease-in-out infinite alternate;
}

@keyframes event-float {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-12px) rotate(1deg); }
}

@media (max-width: 959px) {
  .event-badge {
    width: min(100%, 380px);
  }
}

/* ---------- How it plays ---------- */

.event-how {
  padding-top: clamp(48px, 7vw, 112px);
}

/* The step pictures sit on the badge's night in both themes. */
.frag--night {
  padding: 12px;
  background: radial-gradient(120% 95% at 50% 18%, #3d3478 0%, #1f1944 52%, #0e0b22 100%);
}

.frag--night img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Prizes ---------- */

.prizes {
  display: grid;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 56px);
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .prizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.prize {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 28px;
  background: var(--surface);
}

/* "Round 1" and so on, above the prize's name. */
.prize__round {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prize--final .prize__round {
  color: #f3c24a;
}

.prize__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.prize__count {
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
}

:root[data-theme="light"] .prize__count {
  color: #8a5a06;
}

/* The amount in gold beside the store's coin. */
.prize__amount {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prize__coin {
  width: 44px;
  height: 44px;
  flex: none;
  filter: drop-shadow(0 6px 14px rgba(240, 180, 41, 0.25));
}

.prize__amount b {
  font-size: clamp(3rem, 2.4rem + 2vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff4c8 0%, #f6cf62 42%, #d39a2a 72%, #f3c85a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="light"] .prize:not(.prize--final) .prize__amount b {
  background-image: linear-gradient(180deg, #c98a14 0%, #a46a08 55%, #7a4c04 100%);
}

.prize__amount span {
  color: var(--ink-2);
  font-size: 1.125rem;
  font-weight: 600;
}

.prize__text {
  max-width: 30ch;
  color: var(--ink-2);
}

/* The Grand Finale on the badge's night, ringed in gold, the same in both themes. */
.prize--final {
  background: radial-gradient(120% 100% at 50% 0%, #3d3478 0%, #1f1944 55%, #0e0b22 100%);
  box-shadow: inset 0 0 0 1px rgba(243, 194, 74, 0.4), 0 30px 60px -32px rgba(141, 124, 201, 0.6);
  color: #f5f5f7;
}

.prize--final .prize__text,
.prize--final .prize__amount span {
  color: rgba(245, 245, 247, 0.72);
}

.prizes__note {
  margin-top: 28px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  font-weight: 600;
}

/* ---------- The game's chat ---------- */

/* Two lines as the game posts them: time, an empty sender, then the news. A game window, so it
   stays dark in both themes; the double space after the time is the game's own. */
.game-chat {
  display: grid;
  gap: 20px;
  max-width: 760px;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  background: linear-gradient(180deg, #17132f, #0b0918);
  box-shadow: inset 0 0 0 1px rgba(243, 194, 74, 0.22), 0 28px 60px -34px rgba(0, 0, 0, 0.7);
}

.game-chat__tag {
  color: #f3c24a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-chat__line {
  margin-top: 6px;
  color: #ffd76a;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.game-chat__time {
  color: #a19dbd;
}

.game-chat__line b {
  color: #ffffff;
  font-weight: 700;
}

/* ---------- What comes next ---------- */

.event-next .lead {
  max-width: 28em;
}

.event-next__actions {
  margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .event-chip::before,
  .event-badge img {
    animation: none;
  }
}
