/* Reset ligero y tipografía base. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background-color: var(--ms-bg);
    color: var(--ms-text);
    font-family: var(--ms-font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

p { margin: 0; }

a {
    color: var(--ms-primary);
    text-decoration: none;
    transition: color var(--ms-transition);
}

a:hover {
    color: var(--ms-primary-hover);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--ms-primary);
    outline-offset: 2px;
    border-radius: var(--ms-radius-sm);
}

/* Blazor enfoca el <h1> al navegar (FocusOnNavigate) para situar a los lectores de pantalla.
   Ese foco no es interacción: no debe dibujar el anillo azul sobre un título. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}

::selection {
    background-color: var(--ms-brand);
    color: var(--ms-gold-400);
}

:root[data-ms-theme="dark"] ::selection {
    background-color: var(--ms-gold-400);
    color: var(--ms-brand);
}

/* Texto sólo para lectores de pantalla. */
.ms-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
