:root {
  --bg: #07060b;
  --bg-2: #100e16;
  --ink: #f6f1e4;
  --muted: #b7ab96;
  --gold-0: #fff4cc;
  --gold-1: #f0d48a;
  --gold-2: #c9963a;
  --gold-3: #7a5a1e;
  --on-metal: #2a1906;
  --glow: rgb(201 150 58 / 0.2);
  --line: rgb(240 212 138 / 0.22);
  --spark: 240, 212, 138;
  --metal: linear-gradient(165deg, #fff8dc 0%, #f3d78a 16%, #b8862f 42%, #ffe7a3 58%, #8d6420 78%, #f8e7b4 100%);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Unbounded", "Outfit", sans-serif;
  --shadow: 0 30px 80px rgb(0 0 0 / 0.45);
}

html[data-tone="plata"] {
  --gold-0: #f7fbff;
  --gold-1: #d5dee8;
  --gold-2: #8ea0b3;
  --gold-3: #4d5c6b;
  --on-metal: #1c2833;
  --glow: rgb(180 200 220 / 0.22);
  --line: rgb(190 210 230 / 0.28);
  --spark: 210, 224, 236;
  --metal: linear-gradient(165deg, #ffffff 0%, #d9e2ec 18%, #8ea0b3 42%, #f4f7fb 58%, #5d6d7e 78%, #e8eef4 100%);
}
html[data-tone="bronce"] {
  --gold-0: #ffe0c2;
  --gold-1: #e7a06a;
  --gold-2: #b8642e;
  --gold-3: #6d3b1c;
  --on-metal: #2a1408;
  --glow: rgb(200 110 50 / 0.24);
  --line: rgb(231 160 106 / 0.28);
  --spark: 231, 160, 106;
  --metal: linear-gradient(165deg, #ffe7cf 0%, #e39a62 18%, #a85a28 42%, #ffd2a8 58%, #6d3b1c 78%, #f0c09a 100%);
}
html[data-tone="esmeralda"] {
  --gold-0: #e7fff4;
  --gold-1: #7dffe0;
  --gold-2: #1fa87a;
  --gold-3: #0c5c45;
  --on-metal: #04281c;
  --glow: rgb(40 200 150 / 0.24);
  --line: rgb(125 255 224 / 0.28);
  --spark: 125, 255, 210;
  --metal: linear-gradient(165deg, #f3fff9 0%, #8dffd4 16%, #14956c 42%, #d9ffe8 58%, #0c5c45 78%, #b8ffe0 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 480px at 50% 18%, var(--glow), transparent 60%),
    radial-gradient(700px 500px at 80% 80%, rgb(90 40 120 / 0.18), transparent 55%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgb(255 244 204 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 244 204 / 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
}

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.dust {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 20%), rgb(255 236 180 / 0.1), transparent 26%);
}
.top, main, .foot { position: relative; z-index: 1; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  background: rgb(7 6 11 / 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}
.brand__mark {
  width: 18px;
  height: 22px;
  background: var(--metal);
  clip-path: polygon(50% 0, 100% 18%, 100% 68%, 50% 100%, 0 68%, 0 18%);
}
.by {
  margin: 0;
  color: var(--gold-1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
}
.top__nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}
.top__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.top__nav a:hover { color: var(--ink); }

.stage {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 20px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.stage__board {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 240px minmax(220px, 320px) minmax(280px, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 520px;
}

.roster {
  list-style: none;
  margin: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgb(16 14 22 / 0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.roster button {
  width: 100%;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 12px 12px 14px;
  cursor: pointer;
  font: inherit;
}
.roster button small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.roster button strong {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.roster button[aria-selected="true"] {
  border-color: var(--line);
  background: linear-gradient(90deg, rgb(240 212 138 / 0.16), transparent 80%);
}
.roster button:hover { border-color: var(--line); }

.shield { perspective: 900px; }
.shield__face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 500px;
  padding: 28px 36px 108px;
  text-decoration: none;
  text-align: center;
  color: var(--on-metal);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 180ms ease, color 280ms ease;
  filter: drop-shadow(0 28px 36px var(--glow));
}
.shield__skin {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 38%, rgb(255 255 255 / 0.45) 48%, transparent 58%),
    repeating-linear-gradient(-32deg, rgb(120 78 16 / 0.08) 0 1px, transparent 1px 7px),
    radial-gradient(90px 70px at 50% 18%, rgb(255 255 255 / 0.7), transparent 72%),
    var(--metal);
  clip-path: polygon(50% 0, 100% 8%, 100% 70%, 50% 100%, 0 70%, 0 8%);
}
.shield__skin::before,
.shield__skin::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.shield__skin::before {
  inset: 12px 14px 28px;
  border: 1px solid rgb(90 58 12 / 0.4);
  clip-path: polygon(50% 0, 100% 8%, 100% 70%, 50% 100%, 0 70%, 0 8%);
}
.shield__skin::after {
  inset: 20px 22px 40px;
  border: 1px solid rgb(255 248 220 / 0.35);
  clip-path: polygon(50% 0, 100% 8%, 100% 70%, 50% 100%, 0 70%, 0 8%);
}
.shield__badge,
.shield__crest,
.shield__kicker,
.shield__face strong,
.shield__host,
.shield__stats { position: relative; z-index: 1; }
.shield__badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 16px;
  color: var(--on-metal);
  background: var(--metal);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: inset 0 0 0 1px rgb(90 58 12 / 0.35);
}
.shield__crest {
  width: 86px;
  height: 86px;
  margin: 10px 0 14px;
  color: var(--on-metal);
}
.shield__crest svg { width: 100%; height: 100%; }
.shield__kicker {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
}
.shield__face strong {
  max-width: 12ch;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.shield__host {
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.72;
}
.shield__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 230px);
  margin-top: 14px;
}
.shield__stats b {
  display: block;
  height: 3px;
  margin-top: 5px;
  border-radius: 99px;
  background: rgb(90 58 12 / 0.18);
  overflow: hidden;
}
.shield__stats i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--on-metal);
}
.shield__stats span {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier {
  padding: 26px;
  border-radius: 22px;
  background: rgb(16 14 22 / 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.dossier__label {
  margin: 0;
  color: var(--gold-1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
}
.dossier h2 {
  margin: 8px 0 10px;
  font-family: var(--display);
  font-size: 32px;
}
.dossier p { color: var(--muted); line-height: 1.55; }
.bars { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.bars span:last-child {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: rgb(255 244 204 / 0.08);
  overflow: hidden;
}
.bars i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--metal);
}
.enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--on-metal);
  background: var(--metal);
  font-weight: 600;
}
.enter:hover { filter: brightness(1.08); }

.vitrina {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 0;
  padding-bottom: 64px;
}
.vitrina__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
}
.vitrina__head p { color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgb(28 24 34 / 0.95), rgb(12 10 16 / 0.95));
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--metal);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgb(240 212 138 / 0.5);
}
.card__no {
  color: var(--gold-1);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.16em;
}
.card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
}
.card p { margin: 0; color: var(--muted); line-height: 1.45; flex: 1; }
.card__go {
  color: var(--gold-1);
  font-size: 13px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px 32px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.foot p { margin: 0; }

.star {
  position: absolute;
  z-index: 1;
  width: 10px;
  height: 10px;
  background: #fff;
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  filter: drop-shadow(0 0 6px #fff);
  animation: twinkle 2.6s ease-in-out infinite;
}
.star--1 { top: 22%; left: 22%; }
.star--2 { top: 30%; right: 18%; animation-delay: 0.8s; }
.star--3 { bottom: 34%; left: 46%; animation-delay: 1.4s; width: 7px; height: 7px; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  45% { opacity: 1; transform: scale(1) rotate(18deg); }
}

.bots { pointer-events: none; }
.bot {
  position: absolute;
  z-index: 2;
  width: 58px;
  color: var(--gold-1);
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.35));
  animation: bob 3.6s ease-in-out infinite;
}
.bot svg { width: 100%; height: auto; display: block; }
.bot--a { left: -6px; top: 120px; }
.bot--b { right: 2%; top: 36px; animation-delay: -1.2s; }
.bot--c { right: 8%; bottom: -10px; animation-delay: -2s; width: 46px; }
.bot--d { left: 28%; bottom: 8px; animation-delay: -0.6s; width: 42px; }
.bot__arm { transform-origin: 8px 28px; animation: wave 1.6s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes wave {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-24deg); }
}

.dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dock a, .dock button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: 600 14px/1 var(--font);
  cursor: pointer;
  text-decoration: none;
}
.dock__wa { color: #042; background: #3dff9a; }
.dock__gift { color: var(--on-metal); background: var(--metal); }
.dialog {
  width: min(420px, calc(100% - 32px));
  padding: 22px;
  color: var(--ink);
  background: #120f18;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.dialog::backdrop { background: rgb(0 0 0 / 0.62); }
.dialog h2 { margin: 0 0 8px; font-family: var(--display); font-size: 22px; }
.dialog p { color: var(--muted); }
.dialog__key {
  margin: 12px 0;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--gold-1);
}
.dialog__actions { display: flex; gap: 8px; }
.dialog__actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}
.dialog__copy { color: var(--on-metal); background: var(--metal); }
.dialog__close { color: var(--ink); background: transparent; border: 1px solid var(--line) !important; }

@media (max-width: 980px) {
  .stage__board, .grid { grid-template-columns: 1fr 1fr; }
  .shield { grid-column: 1 / -1; }
  .shield__face { min-height: 380px; }
  .top__nav { display: none; }
}
@media (max-width: 680px) {
  .stage, .vitrina { width: min(100% - 28px, 1180px); }
  .stage__board, .grid, .foot { grid-template-columns: 1fr; display: grid; }
  .foot { display: flex; flex-direction: column; }
  .top { padding-inline: 16px; }
  .bot--b, .bot--d { display: none; }
  .dock { left: 12px; right: 12px; flex-direction: row; }
  .dock a, .dock button { flex: 1; }
  h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shield__face, .card { transition: none; }
  .star, .bot, .bot__arm { animation: none; }
}
