/* ==========================================================================
   nav.css — Barra flotante + termómetro de scroll (firma visual)
   ========================================================================== */
.nav {
  position: fixed; top: 16px; left: 50%; z-index: 50;
  width: min(920px, calc(100% - 24px)); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 22px;
  background: rgba(15, 27, 51, .72); border: 1px solid var(--line-dark); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--white); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5);
  transition: transform .5s var(--ease), background .3s;
}
/* Oculta al bajar: además de moverla fuera de pantalla se la pasa a visibility:hidden (con retraso, para que
   termine la animación), así sus links y su botón no quedan en el orden de Tab ni los lee un lector de pantalla. */
.nav.is-hidden { transform: translate(-50%, -140%); visibility: hidden; transition: transform .5s var(--ease), background .3s, visibility 0s .5s; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 21px; }
.logo svg { width: 32px; height: 32px; flex: none; color: var(--blue); } /* el isotipo (#rf-logo) pinta con currentColor */
.nav__links { display: flex; gap: 30px; font-size: 15px; font-weight: 600; color: var(--on-dark); }
.nav__links a { position: relative; padding: 6px 0; transition: color .2s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ice); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav .btn { --pad: 12px 20px; font-size: 14px; }

/* Termómetro de scroll: la página "se enfría" a medida que bajás */
.thermo {
  position: fixed; right: 22px; top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--slate);
  pointer-events: none;
}
.thermo__track { position: relative; width: 6px; height: 34vh; border-radius: 6px; background: rgba(100, 116, 139, .28); overflow: hidden; }
.thermo__fill { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: bottom; transform: scaleY(var(--p, 1)); background: var(--warn); border-radius: 6px; transition: background .4s; }
.thermo__val { font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; padding: 4px 8px; border-radius: 8px; background: rgba(15, 27, 51, .85); color: var(--white); }
.thermo[data-zone="cold"] .thermo__fill { background: var(--ice); }
.thermo[data-zone="warm"] .thermo__fill { background: var(--crit); }
.thermo[data-zone="mid"] .thermo__fill { background: var(--warn); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .thermo { display: none; }
}
@media (min-width: 861px) and (max-width: 1240px) { .thermo { right: 10px; } }
/* Celulares muy angostos (320–360 px): logo + botón no entraban en la barra y el botón se salía */
@media (max-width: 360px) {
  .nav { padding-left: 16px; gap: 10px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo svg { width: 28px; height: 28px; }
  .nav .btn { --pad: 10px 14px; font-size: 13px; }
}
