/* ============================================
   visuals.css — Hero, stats, charts, comparison
   ============================================ */

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 32px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--text);
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 36px;
  font-weight: 400;
}

.hero-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-subtle);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-meta-item {
  position: relative;
}

.hero-meta-item strong {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ============================================
   Stat cards (big number)
   ============================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 56px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.stat-card {
  border: none;
  border-radius: 0;
  padding: 22px 22px 20px;
  background: var(--bg-soft);
  transition: background 0.2s;
}

.stat-card:hover {
  background: var(--bg-elevated);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-unit {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  margin-left: 2px;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-subtle);
  line-height: 1.45;
}

/* ============================================
   Bar charts
   ============================================ */

.chart {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 26px 22px;
  margin: 20px 0 28px;
  background: var(--bg-soft);
}

.chart-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 20px;
  line-height: 1.5;
}

.chart-row {
  display: grid;
  grid-template-columns: 150px 1fr 72px;
  align-items: center;
  gap: 16px;
  padding: 9px 0;
  font-size: 13px;
}

.chart-row + .chart-row {
  border-top: 1px solid var(--border);
}

.chart-label {
  color: var(--text);
  font-weight: 500;
}

.chart-label-sub {
  display: block;
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 400;
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.chart-bar-track {
  height: 10px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Keyon bars now use coral accent = winner is visually branded */
.chart-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  min-width: 4px;
  box-shadow: 0 0 8px rgba(217, 119, 87, 0.3);
}

.chart-bar-fill.muted {
  background: var(--text-subtle);
  box-shadow: none;
}

.chart-bar-fill.low {
  background: var(--border-strong);
  box-shadow: none;
}

.chart-value {
  text-align: right;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
}

.chart-legend-swatch.muted {
  background: var(--text-subtle);
}

/* ============================================
   Comparison table
   ============================================ */

.comparison {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}

.comparison th,
.comparison td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.comparison th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.comparison th:not(:first-child),
.comparison td:not(:first-child) {
  text-align: center;
  width: 160px;
}

.comparison td:first-child {
  color: var(--text);
  font-weight: 500;
}

.comparison tr:last-child td {
  border-bottom: none;
}

.comparison .yes {
  color: var(--text);
  font-weight: 500;
}

.comparison .no {
  color: var(--text-subtle);
}

.comparison .highlight {
  background: var(--bg-elevated);
  font-weight: 500;
  color: var(--text);
}

/* Keyon column — coral header, subtle lift on cells */
.comparison th.highlight {
  background: var(--accent);
  color: #000000;
  border-bottom-color: var(--accent);
  position: relative;
  text-shadow: none;
}

.comparison th.highlight::after {
  content: "★";
  margin-left: 6px;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
}

.comparison td.highlight {
  background: rgba(217, 119, 87, 0.06);
  font-weight: 600;
  color: var(--text);
  position: relative;
  box-shadow: inset 3px 0 0 var(--accent);
}

.comparison .yes::before {
  content: "✓";
  color: #7fb662;
  font-weight: 700;
  margin-right: 6px;
  display: inline-block;
}

.comparison .no::before {
  content: "✕";
  color: var(--accent-dark);
  opacity: 0.5;
  font-weight: 700;
  margin-right: 6px;
  display: inline-block;
}

.comparison td.highlight.yes {
  background: rgba(217, 119, 87, 0.1);
  box-shadow: inset 3px 0 0 var(--accent);
}

.comparison td.highlight.yes::before {
  color: var(--accent);
}

/* ============================================
   Responsive — visuals
   ============================================ */

@media (max-width: 900px) {
  .hero-title {
    font-size: 32px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-row {
    grid-template-columns: 120px 1fr 56px;
    gap: 10px;
  }
  .comparison th:not(:first-child),
  .comparison td:not(:first-child) {
    width: auto;
  }
}

/* ============================================
   Benchmarks — sub-section headings (h3)
   ============================================ */

/* Destacar h3 que actúa como sub-heading dentro de benchmarks */
main h3[id^="bench-"] {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.02em;
}

main h3[id^="bench-"]:first-of-type {
  margin-top: 40px;
}

/* Stat-card con unidad de segundos más discreta */
.stat-value .stat-unit {
  font-weight: 400;
  color: var(--text-muted);
}
