/* ─────────────────────────────────────────
   Design tokens — paleta sobria oscura
───────────────────────────────────────── */
:root {
  --bg:          #09090e;
  --surface:     #111118;
  --surface-2:   #18181f;
  --border:      #1f1f2e;
  --border-hover:#2e2e42;

  --text-1:      #e4e4ef;
  --text-2:      #8b8ba0;
  --text-3:      #55556a;

  --accent:      #4e7cf8;   /* azul medio */
  --accent-dim:  #1b2a55;

  --openai-clr:  #10a37f;
  --gemini-clr:  #4285f4;
  --groq-clr:    #f97316;

  --green:       #22c55e;
  --red:         #ef4444;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;

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

  --nav-h:       60px;
}

/* ─── Reset & base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 5vw, 64px);
  gap: 32px;
  background: rgba(9, 9, 14, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 24px;
  margin-left: 24px;
}
.nav__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text-1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.status-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(64px, 10vw, 120px) clamp(16px, 5vw, 64px) 80px;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.hero__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 4px 14px;
  border-radius: 99px;
}

.hero__title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
}
.hero__title span {
  background: linear-gradient(135deg, var(--accent) 0%, #a585f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--send {
  padding: 10px 20px;
  font-size: 13px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--text-1); border-color: var(--border-hover); }
.icon-btn.voted { color: var(--accent); border-color: var(--accent); }

/* ─────────────────────────────────────────
   MARQUEE
───────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--surface);
}
.marquee__track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
}
.marquee__track .sep { color: var(--border-hover); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─────────────────────────────────────────
   SECTIONS (general)
───────────────────────────────────────── */
.section {
  padding: clamp(64px, 8vw, 100px) clamp(16px, 5vw, 64px);
}
.section--narrow { max-width: 1100px; margin: 0 auto; }

.section__overline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.section__desc {
  font-size: 15px;
  color: var(--text-2);
  max-width: 540px;
  margin-bottom: 40px;
}

/* ─────────────────────────────────────────
   MODEL CARDS
───────────────────────────────────────── */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}
.model-card:hover { border-color: var(--border-hover); }
.model-card.active { border-color: var(--border-hover); }

.model-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-card__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.model-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.model-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}
.model-card__tags li {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.model-card__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  margin-top: auto;
}

/* ─── model badges ─── */
.model-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.model-badge--openai    { background: rgba(16,163,127,.15);  color: var(--openai-clr); }
.model-badge--gemini    { background: rgba(66,133,244,.15);  color: var(--gemini-clr); }
.model-badge--groq      { background: rgba(249,115,22,.15);  color: var(--groq-clr);   }
.model-badge--mistral   { background: rgba(255,102,0,.15);   color: #ff6600;           }
.model-badge--anthropic { background: rgba(205,154,109,.15); color: #cd9a6d;           }
.model-badge--deepseek  { background: rgba(99,179,237,.15);  color: #63b3ed;           }
.model-badge--cohere    { background: rgba(57,211,83,.15);   color: #39d353;           }
.model-badge--hf        { background: rgba(255,196,0,.15);   color: #ffc400;           }
.model-badge--together  { background: rgba(168,85,247,.15);  color: #a855f7;           }

/* ─── toggle ─── */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: absolute; inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle__track { background: var(--accent-dim); border-color: var(--accent); }
.toggle input:checked + .toggle__track::after { transform: translateX(16px); background: var(--accent); }

/* ─── dots ─── */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--green { background: var(--green); box-shadow: 0 0 5px var(--green); }

/* ─────────────────────────────────────────
   ARENA
───────────────────────────────────────── */
.section--arena {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}
.section--arena > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Prompt box */
.prompt-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto 32px;
  transition: border-color 0.2s;
}
.prompt-box:focus-within { border-color: var(--accent); }

.prompt-box__textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 20px 24px 12px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}
.prompt-box__textarea::placeholder { color: var(--text-3); }

.prompt-box__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.prompt-box__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.chip-check input { accent-color: var(--accent); }

/* Arena grid */
.arena-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .arena-grid { grid-template-columns: 1fr; }
}

.arena-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.arena-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.arena-panel__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.arena-panel__model {
  font-size: 13px;
  font-weight: 600;
}

.arena-panel__metrics {
  display: flex;
  gap: 8px;
}
.metric {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
}

.arena-panel__body {
  flex: 1;
  padding: 20px 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-1);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.placeholder-text { color: var(--text-3); font-style: italic; }

/* Loading animation */
.loading-dots::after {
  content: '';
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.arena-panel__actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────
   STATS
───────────────────────────────────────── */
.section--stats { max-width: 1100px; margin: 0 auto; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); }
.kpi__value { font-size: 28px; font-weight: 700; letter-spacing: -1px; font-family: var(--mono); }

.stats-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stats-table thead tr { background: var(--surface); }
.stats-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.stats-table td {
  padding: 14px 16px;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover td { background: var(--surface-2); }

.bar-wrap {
  background: var(--surface-2);
  border-radius: 99px;
  height: 6px;
  width: 140px;
  overflow: hidden;
}
.bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bar--openai { background: var(--openai-clr); }
.bar--gemini { background: var(--gemini-clr); }
.bar--groq   { background: var(--groq-clr); }

/* Chart area */
.chart-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chart-area__label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); }
.chart-area__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
  pointer-events: none;
}
canvas { display: block; }

/* ─────────────────────────────────────────
   ABOUT
───────────────────────────────────────── */
.section--about { text-align: center; }
.about-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 40px;
  text-align: left;
}
.about-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.about-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.about-col p { font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px clamp(16px, 5vw, 64px);
}
.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.footer__copy { font-size: 12px; color: var(--text-3); margin-right: auto; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: 12px; color: var(--text-3); transition: color 0.2s; }
.footer__links a:hover { color: var(--text-1); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 640px) {
  .nav__links { display: none; }
  .prompt-box__footer { flex-direction: column; align-items: flex-start; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .about-cols { grid-template-columns: 1fr; }
}
