/* ====================================================================
   Brand: Cristian Tala — Synthwave / Retro-Futuristic
   Verde Eléctrico #39ff14, Cyan Neon #00d4ff, Negro #0a0a1a
   JetBrains Mono headings, Inter body
   Mobile-first: estilos base son para mobile, @media min-width sube tamaños
   ==================================================================== */

:root {
  --bg: #0a0a1a;
  --bg-grid: #1a0a2e;
  --bg-card: #14142a;
  --green: #39ff14;
  --cyan: #00d4ff;
  --magenta: #ff006e;
  --white: #ffffff;
  --gray: #b0b0b0;
  --gray-dark: #4a4a5e;
  --border: #2a2a3e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--white);
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(at 20% 10%, rgba(57, 255, 20, 0.06) 0, transparent 50%),
    radial-gradient(at 80% 90%, rgba(0, 212, 255, 0.06) 0, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ====== Header ====== */
header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo {
  height: 28px;
  max-width: 220px;
  object-fit: contain;
}
nav {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
nav .cta-mini {
  color: var(--bg);
  background: var(--green);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: all 0.2s;
}
nav .cta-mini:hover {
  background: var(--cyan);
  transform: translateY(-1px);
}

/* ====== Hero ====== */
.hero {
  padding: 2rem 0 1rem;
  text-align: left;
}
.hero h1 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--green) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}
.hero .lead strong { color: var(--green); font-weight: 700; }
.meta {
  font-size: 0.8rem;
  color: var(--gray);
  word-break: break-word;
}

/* ====== Filters ====== */
.filters {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.08), 0 12px 40px rgba(0, 0, 0, 0.4);
}
.filters h2 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.filter { display: flex; flex-direction: column; gap: 0.4rem; }

/* Mobile: label e output inline en la misma línea, output al lado del texto.
   Esto evita cortes cuando el label es largo. */
.filter label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  display: block;
  word-break: break-word;
}
.filter label output {
  color: var(--cyan);
  font-weight: 700;
  margin-left: 0.25rem;
}
.filter small {
  color: var(--gray);
  font-size: 0.7rem;
  line-height: 1.3;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  display: block;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -10px;
  height: 22px;
  width: 22px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}
input[type="range"]::-moz-range-thumb {
  height: 22px;
  width: 22px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}

select {
  background: var(--bg-grid);
  color: var(--white);
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}
select:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }

.checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.35;
}
.check input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.check:hover { color: var(--white); }

/* ====== Results ====== */
.results { margin: 2rem 0; }
.results-header { margin-bottom: 1rem; }
.results h2 {
  font-size: 1rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Wrap horizontal-scroll para tabla en mobile */
#results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.results-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: var(--bg-card);
}
.results-table thead {
  background: var(--bg-grid);
}
.results-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 0.6rem 0.5rem;
  color: var(--green);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.results-table th.num { text-align: right; }
.results-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.results-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table tbody tr:hover { background: rgba(57, 255, 20, 0.04); }
.results-table tbody tr:last-child td { border-bottom: none; }

.score-pill {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(57, 255, 20, 0.12);
  color: var(--green);
  border: 1px solid rgba(57, 255, 20, 0.3);
}
.score-pill.low { background: rgba(255, 0, 110, 0.12); color: var(--magenta); border-color: rgba(255, 0, 110, 0.3); }
.score-pill.mid { background: rgba(0, 212, 255, 0.12); color: var(--cyan); border-color: rgba(0, 212, 255, 0.3); }

.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: var(--bg-grid);
  color: var(--gray);
  border: 1px solid var(--border);
  margin-right: 0.25rem;
  margin-bottom: 0.15rem;
}
.tag.os { color: var(--green); border-color: rgba(57, 255, 20, 0.3); }
.tag.thinking { color: var(--magenta); border-color: rgba(255, 0, 110, 0.3); }

.model-name {
  font-weight: 600;
  color: var(--white);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}
.model-meta {
  color: var(--gray);
  font-size: 0.65rem;
  word-break: break-all;
}

/* ====== CTA Block ====== */
.cta-block {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.08), rgba(0, 212, 255, 0.04));
  border: 1px solid rgba(57, 255, 20, 0.2);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-block h2 {
  color: var(--green);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cta-block p {
  margin: 0 auto 1.25rem;
  color: var(--gray);
  font-size: 0.9rem;
}
.cta-primary {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.3);
}
.cta-primary:hover {
  background: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.4);
  color: var(--bg);
}

/* ====== Methodology ====== */
.methodology { margin: 1.5rem 0 2.5rem; }
.methodology details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
}
.methodology summary {
  cursor: pointer;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.4rem 0;
}
.methodology details[open] summary { margin-bottom: 0.875rem; }
.methodology p {
  margin-bottom: 0.75rem;
  color: var(--gray);
  font-size: 0.875rem;
}
.methodology code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-grid);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  color: var(--cyan);
  font-size: 0.85em;
  word-break: break-all;
}

/* ====== Landing nav (links a paginas dedicadas) ====== */
.landing-nav {
  margin: 1rem 0 2rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.85rem;
}
.landing-nav strong {
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  white-space: nowrap;
}
.landing-nav a {
  color: var(--cyan);
  white-space: nowrap;
}
.landing-nav a:hover { color: var(--green); }

@media (min-width: 640px) {
  .landing-nav { font-size: 0.9rem; }
}

/* ====== Tabla resultados landing pages ====== */
.results-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  font-size: 0.85rem;
}
.results-table thead {
  background: var(--bg-grid);
}
.results-table th,
.results-table td {
  padding: 0.6rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.results-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(57, 255, 20, 0.04); }
.results-table strong { color: var(--white); }

@media (max-width: 640px) {
  .results-table { font-size: 0.78rem; }
  .results-table th, .results-table td { padding: 0.5rem 0.6rem; }
}

/* ====== FAQ ====== */
.faq { margin: 2rem 0 3rem; }
.faq h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.faq details:hover { border-color: var(--cyan); }
.faq details[open] { border-color: var(--green); }
.faq summary {
  cursor: pointer;
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  padding: 0.4rem 0;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  content: '−';
  color: var(--green);
}
.faq details[open] summary { margin-bottom: 0.75rem; }
.faq p {
  margin-bottom: 0.5rem;
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.6;
}
.faq strong { color: var(--white); }

@media (min-width: 640px) {
  .faq h2 { font-size: 1.5rem; }
  .faq summary { font-size: 0.95rem; }
  .faq p { font-size: 0.95rem; }
}

/* ====== Footer ====== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--gray);
  font-size: 0.8rem;
}
footer p { word-break: break-word; }

/* ============================================================
   Tablet (≥640px): un poco más de aire
   ============================================================ */
@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .logo { height: 32px; max-width: 280px; }
  nav { gap: 1rem; }
  nav a { font-size: 0.75rem; }
  .hero { padding: 3rem 0 1.5rem; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .hero .lead { font-size: 1rem; max-width: 720px; margin-left: auto; margin-right: auto; }
  .filters { padding: 1.75rem; }
  .filters h2 { font-size: 1.15rem; }
  .filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
  }
  /* En tablet, label y output side-by-side justified */
  .filter label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    font-size: 0.85rem;
  }
  .filter label output { margin-left: 0; }
  .results h2 { font-size: 1.15rem; }
  .results-table { font-size: 0.875rem; min-width: 0; }
  .results-table th { font-size: 0.7rem; padding: 0.75rem 0.875rem; }
  .results-table td { padding: 0.75rem 0.875rem; }
  .model-meta { font-size: 0.7rem; }
  .cta-block { padding: 2.5rem 2rem; }
  .cta-block h2 { font-size: 1.4rem; }
  .cta-block p { font-size: 1rem; max-width: 640px; }
  .cta-primary { padding: 1rem 2rem; font-size: 1rem; }
}

/* ============================================================
   Desktop (≥960px): grid 3 columnas
   ============================================================ */
@media (min-width: 960px) {
  .hero h1 { font-size: 2.6rem; }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .filters { padding: 2rem; }
  .checkboxes { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 1.25rem; }
}
