Generate a clamp() value that scales type between two viewports.
Browsers default to 16px. Change this only if you have overridden the root size.
font-size: clamp(1rem, 0.833rem + 0.833vw, 1.5rem)
Two details make this accessible rather than merely clever. The preferred value keeps a rem term, so text still responds when someone sets a larger default font size, and a value of pure vw would break that. And both ends are bounded, so the text has a floor on a phone and a ceiling on a wide monitor. The same technique works for padding, margins and gaps, not just type.
font-size: clamp(1rem, 0.833rem + 0.833vw, 1.5rem);
What this cannot tell you
Take this with you
CSS clamp() Calculator on RunTheTests — free browser-based frontend tools, no sign-up.