/* ==========================================================================
   SALÓN DE LA FAMA (simulador) — mismo lenguaje que index.html
   Negro cálido, texto crema, naranja de marca como único acento,
   Instrument Serif para titulares y cifras + Instrument Sans para texto.
   El color de cada colegio aparece sólo como un punto de identidad.
   ========================================================================== */

.hf {
  --hf-bg: #0c0b0a;
  --hf-bg-2: #141311;
  --hf-ink: #f2ede4;
  --hf-ink-2: #bdb6aa;
  --hf-ink-3: #8a8379;
  --hf-line: rgba(242, 237, 228, 0.12);
  --hf-line-strong: rgba(242, 237, 228, 0.28);
  --hf-accent: #ff8a1f;
  --hf-serif: 'Instrument Serif', 'Times New Roman', serif;
  --hf-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --hf-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color: var(--hf-ink);
  font-family: var(--hf-sans);
}
/* Fondo cálido de la portada mientras el Salón está abierto */
body:has(#screen-rankings.active) { background: #0c0b0a; }

.hf *,
.hf *::before,
.hf *::after { font-family: inherit; }
.hf em { font-style: italic; color: var(--hf-accent); }
.hf :focus-visible { outline: 1.5px solid var(--hf-accent); outline-offset: 4px; }

.hf-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

/* ---------- Barra superior ---------- */
.hf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}
.hf-textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hf-line-strong);
  padding: 0 0 2px;
  color: var(--hf-ink);
  font: 500 0.92rem var(--hf-sans);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.hf-textlink:hover { border-color: var(--hf-ink); }
.hf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-ink-3);
}
.hf-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hf-accent);
  animation: hf-blink 1.8s ease-in-out infinite;
}
@keyframes hf-blink { 50% { opacity: 0.25; } }

/* ---------- Encabezado ---------- */
.hf-head { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem); }
.hf-title {
  margin-top: 1rem;
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: var(--hf-ink);
}
.hf-lede {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  color: var(--hf-ink-2);
}

/* ---------- Pestañas ---------- */
.hf-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--hf-line-strong);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.hf-tabs::-webkit-scrollbar { display: none; }
.hf-tab {
  flex-shrink: 0;
  padding: 0.9rem 0;
  margin-bottom: -1px;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--hf-ink-3);
  font: 500 1rem var(--hf-sans);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hf-tab:hover { color: var(--hf-ink); }
.hf-tab.active { color: var(--hf-ink); border-bottom-color: var(--hf-accent); }

/* ---------- Paneles ---------- */
.hf-panel { display: none; padding-top: clamp(2rem, 4vw, 3rem); }
.hf-panel.active { display: block; animation: hf-in 0.5s var(--hf-ease) both; }
@keyframes hf-in { from { opacity: 0; transform: translateY(8px); } }

.hf-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-bottom: 2rem;
}
.hf-panel-title {
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--hf-ink);
}
.hf-panel-desc { max-width: 28rem; font-size: 0.92rem; color: var(--hf-ink-3); }

/* ---------- Podio ---------- */
.hf-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.hf-podium-step {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 0 1.25rem;
  border-top: 1px solid var(--hf-line-strong);
}
.hf-podium-step--1 { border-top-color: var(--hf-accent); padding-top: 2rem; }
.hf-podium-pos {
  font-family: var(--hf-serif);
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 0.8;
  color: var(--hf-ink-3);
  margin-bottom: 0.75rem;
}
.hf-podium-step--1 .hf-podium-pos { color: var(--hf-accent); font-style: italic; font-size: clamp(5.5rem, 11vw, 9.5rem); }
.hf-podium-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-ink-3);
}
.hf-podium-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
  color: var(--hf-ink);
}
.hf-podium-value {
  margin-top: 0.75rem;
  font-family: var(--hf-serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--hf-ink);
  font-variant-numeric: tabular-nums;
}
.hf-podium-value small {
  margin-left: 0.5rem;
  font-family: var(--hf-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hf-ink-3);
}
.hf-podium-meta { font-size: 0.85rem; color: var(--hf-ink-3); }

/* Punto de color del colegio */
.hf-podium-name i,
.hf-school i,
.hf-legend-meta i {
  flex-shrink: 0;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--hf-accent));
  box-shadow: 0 0 0 1px rgba(242, 237, 228, 0.18);
}

/* ---------- Tabla ---------- */
.hf-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 2.4fr) repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hf-line);
  transition: background-color 0.2s ease;
}
.hf-row:not(.hf-row--head):hover { background: var(--hf-bg-2); }
.hf-row--head {
  padding: 0 0 0.75rem;
  border-bottom-color: var(--hf-line-strong);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-ink-3);
}
.hf-row--head > span:nth-child(n+3),
.hf-num { text-align: right; }
.hf-pos {
  font-family: var(--hf-serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--hf-ink-3);
  font-variant-numeric: tabular-nums;
}
.hf-row.is-top .hf-pos { color: var(--hf-ink); }
.hf-row:first-child .hf-pos { color: var(--hf-accent); font-style: italic; }
.hf-school { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.hf-school > span { display: flex; flex-direction: column; min-width: 0; }
.hf-school strong {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--hf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hf-school small {
  font-size: 0.8rem;
  color: var(--hf-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hf-num {
  font-size: 0.95rem;
  color: var(--hf-ink-2);
  font-variant-numeric: tabular-nums;
}
.hf-num strong { font-family: var(--hf-serif); font-weight: 400; font-size: 1.45rem; color: var(--hf-ink); }

/* ---------- Leyendas OVR ---------- */
.hf-legends { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hf-line-strong); }
.hf-legend {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
  border-bottom: 1px solid var(--hf-line);
}
.hf-legend-pos {
  font-family: var(--hf-serif);
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  line-height: 0.8;
  color: var(--hf-ink-3);
}
.hf-legend.is-first .hf-legend-pos { color: var(--hf-accent); font-style: italic; }
.hf-legend-body { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.hf-legend-name {
  font-family: var(--hf-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
  color: var(--hf-ink);
}
.hf-legend-name em { font-size: 0.72em; color: var(--hf-ink-2); }
.hf-legend-meta { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--hf-ink-2); }
.hf-legend-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.8rem;
  color: var(--hf-ink-3);
}
.hf-legend-specs strong { color: var(--hf-ink-2); font-weight: 600; }
.hf-legend-titles { color: var(--hf-accent); font-weight: 600; }
.hf-legend-ovr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--hf-serif);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 0.9;
  color: var(--hf-ink);
  font-variant-numeric: tabular-nums;
}
.hf-legend-ovr small {
  margin-top: 0.35rem;
  font-family: var(--hf-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--hf-ink-3);
}

/* ---------- Vacío ---------- */
.hf-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 2rem 0;
  border-top: 1px solid var(--hf-line);
  color: var(--hf-ink-3);
}
.hf-empty strong { font-family: var(--hf-serif); font-weight: 400; font-size: 1.7rem; color: var(--hf-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hf-topbar .hf-kicker { display: none; }
  .hf-podium { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* En móvil el podio se lee en orden 1°, 2°, 3° */
  .hf-podium-step--1 { order: -1; }
  .hf-podium-step { padding: 1.25rem 0; }
  .hf-podium-pos,
  .hf-podium-step--1 .hf-podium-pos { font-size: 4rem; margin-bottom: 0.25rem; }

  .hf-row--head { display: none; }
  .hf-row {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-areas: "pos school" ". nums";
    row-gap: 0.6rem;
  }
  .hf-pos { grid-area: pos; }
  .hf-school { grid-area: school; }
  .hf-num {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    text-align: left;
    font-size: 0.85rem;
  }
  .hf-num::before {
    content: attr(data-label);
    color: var(--hf-ink-3);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .hf-num strong { font-size: 1.2rem; }

  .hf-legend { grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-panel.active,
  .hf-live-dot { animation: none; }
}

/* ---------- Premio al N°1 de Leyendas OVR ---------- */
.hf-prize {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hf-accent);
  border-bottom: 1px solid var(--hf-line-strong);
  background: linear-gradient(100deg, rgba(255, 138, 31, 0.12), rgba(255, 138, 31, 0) 60%);
}
.hf-prize-amount {
  font-family: var(--hf-serif);
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--hf-accent);
  white-space: nowrap;
}
.hf-prize-amount span { font-size: 0.55em; vertical-align: 0.55em; margin-right: 0.05em; }
.hf-prize-title {
  margin: 0.5rem 0 0;
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--hf-ink);
}
.hf-prize-desc {
  max-width: 40rem;
  margin: 0.75rem 0 0;
  line-height: 1.55;
  color: var(--hf-ink-2);
}
.hf-prize-desc strong { color: var(--hf-ink); font-weight: 600; }
.hf-prize-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 1.1rem; }
.hf-prize-btn {
  min-height: 44px;
  padding: 0 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--hf-ink);
  color: var(--hf-bg);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--hf-ease), background-color 0.2s ease;
}
.hf-prize-btn:hover { background: #fff; transform: translateY(-1px); }
.hf-prize-btn:focus-visible { outline: 2px solid var(--hf-accent); outline-offset: 3px; }
@media (max-width: 640px) {
  .hf-prize { grid-template-columns: 1fr; gap: 0.75rem; }
}
