/* Amigatos design system: neo-retro arcade flyer on warm paper. */

:root {
  --paper: #fff3e2;
  --paper-deep: #ffe4c8;
  --paper-card: #fffaf1;
  --ink: #241826;
  --ink-soft: #5a4362;
  --tangerine: #ff6b35;
  --butter: #ffc94a;
  --mint: #7fe3c4;
  --berry: #e24b63;
  --periwinkle: #8c9eff;
  --lilac: #c9b8ff;
  --line: 3px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --font-display: 'Bricolage Grotesque', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease-pop: cubic-bezier(0.2, 1.4, 0.3, 1);
}

.cat-pixel-avatar,
.slot__avatar img,
.rail-row__avatar img,
.podium-card__avatar img,
.cat-option img,
#lobby-avatar img,
#play-avatar img,
#result-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* ---------------------------------------------------------------- Brand Lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: block;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 1.9vw, 27px);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
}

.wordmark em {
  font-style: normal;
  color: var(--tangerine);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--tangerine);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--tangerine);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- type */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-transform: uppercase;
}

.tag {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- structure */

.ink-frame {
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: var(--shadow);
}

.halftone {
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-size: 7px 7px;
}

.registration {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  opacity: 0.35;
  pointer-events: none;
}
.registration::before,
.registration::after {
  content: '';
  position: absolute;
  background: var(--ink);
}
.registration::before {
  left: 50%;
  top: -5px;
  width: 1px;
  height: 26px;
}
.registration::after {
  top: 50%;
  left: -5px;
  height: 1px;
  width: 26px;
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--paper-card);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform 120ms var(--ease-pop),
    box-shadow 120ms var(--ease-pop),
    background-color 120ms ease;
  user-select: none;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.btn--primary {
  background: var(--tangerine);
  color: #fff8ee;
}

.btn--mint {
  background: var(--mint);
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(36, 24, 38, 0.06);
  box-shadow: none;
  transform: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}

.btn--xl {
  padding: 18px 34px;
  font-size: 17px;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-lg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-card);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 2px rgba(36, 24, 38, 0.15);
}
.dot--live {
  background: #38c172;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

/* ------------------------------------------------------------- ticker */

.ticker {
  overflow: hidden;
  border-top: var(--line) solid var(--ink);
  background: var(--tangerine);
  color: var(--ink);
}

.ticker__track {
  display: inline-flex;
  gap: 28px;
  padding: 9px 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: ticker 38s linear infinite;
}

.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}

.ticker__track span::after {
  content: '★';
  color: var(--paper);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------ toast */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
  animation: toast-in 220ms var(--ease-pop);
}

.toast--warn {
  background: var(--berry);
}

.toast--good {
  background: var(--mint);
  color: var(--ink);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --------------------------------------------------------- utilities */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scroll-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(36, 24, 38, 0.3) transparent;
}
.scroll-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scroll-thin::-webkit-scrollbar-thumb {
  background: rgba(36, 24, 38, 0.28);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .ticker__track {
    animation: none;
  }
}
