/* ==========================================================================
   Da Vinci RPS Arena — shared brand styles
   Surface off-black. Text black or white only. Porteron throughout.
   Lime reserved for rank-1, the live pulse, and the final countdown.
   Motion: fade + small translate only (120 / 220 / 420ms).
   ========================================================================== */

/* ---------- Fonts (copied from the Da Vinci brand kit) ---------- */
@font-face {
  font-family: 'Porteron';
  src: url('fonts/Porteron-Regular.woff2') format('woff2'),
       url('fonts/Porteron-Regular.woff') format('woff'),
       url('fonts/Porteron-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Porteron';
  src: url('fonts/Porteron-Regular-Italic.woff2') format('woff2'),
       url('fonts/Porteron-Regular-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Porteron';
  src: url('fonts/Porteron-Bold.woff') format('woff'),
       url('fonts/Porteron-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --off-black:     #261414;
  --deep-purple:   #441949;
  --bright-purple: #8A8BFF;
  --misty-blue:    #B1D6EF;
  --off-white:     #D8EAE9;
  --lime:          #D6F400;
  --white:         #FFFFFF;
  --black:         #000000;

  /* Text is white or black only — never a brand color. */
  --fg:        var(--white);
  --fg-muted:  rgba(255, 255, 255, 0.56);
  --fg-faint:  rgba(255, 255, 255, 0.32);

  --surface:      #261414;
  --surface-1:    rgba(255, 255, 255, 0.04);
  --surface-2:    rgba(255, 255, 255, 0.07);
  --border:       rgba(255, 255, 255, 0.10);
  --border-soft:  rgba(255, 255, 255, 0.06);

  /* Move-chip tints — fills, not text. */
  --rock:     var(--misty-blue);
  --paper:    var(--bright-purple);
  --scissors: var(--lime);

  --font: 'Porteron', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --dur-fast: 120ms;
  --dur-med:  220ms;
  --dur-slow: 420ms;
  --ease:     cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-row: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background-color: var(--off-black);
  /* Faint plus-pattern texture at ~5% opacity over the surface. */
  background-image: url('assets/plus-bg.svg');
  background-repeat: repeat;
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Brand header bits ---------- */
.brand-logo { height: 26px; width: auto; display: block; opacity: 0.92; }

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(214, 244, 0, 0.5);
  animation: pulse 1.8s var(--ease) infinite;
  flex: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214, 244, 0, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(214, 244, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 244, 0, 0); }
}

/* ---------- Move chips (tints, not solid text) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.chip--rock     { background: rgba(177, 214, 239, 0.12); border-color: rgba(177, 214, 239, 0.35); }
.chip--rock::before     { background: var(--rock); }
.chip--paper    { background: rgba(138, 139, 255, 0.14); border-color: rgba(138, 139, 255, 0.40); }
.chip--paper::before    { background: var(--paper); }
.chip--scissors { background: rgba(214, 244, 0, 0.12);  border-color: rgba(214, 244, 0, 0.38); }
.chip--scissors::before { background: var(--scissors); }
.chip--none {
  background: transparent;
  border-color: var(--border);
  color: var(--fg-faint);
}
.chip--none::before { background: var(--fg-faint); }

/* ---------- Thin progress / countdown bar ---------- */
.progress {
  height: 3px;
  width: 100%;
  background: var(--border-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--bright-purple);
  transform-origin: left;
  /* width driven inline by JS; keep transition short so it stays smooth */
  transition: width 120ms linear, background 220ms var(--ease);
}
.progress--urgent > span { background: var(--lime); }

.fade-in { animation: fadeIn var(--dur-slow) var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mono { font-family: var(--mono); }
.muted { color: var(--fg-muted); }
