*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-width: 20rem;
    min-height: 100vh;
    margin: 0;
    color: var(--color-text);
    background: var(--color-canvas);
    font-family: var(--font-body);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.is-scroll-locked {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    color: var(--color-text);
    font-family: var(--font-heading);
    line-height: 1.2;
}

h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 0.35rem;
    font-size: 1.25rem;
}

h3 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

p {
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: color-mix(in srgb, var(--color-primary) 80%, #000);
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select,
input[type='checkbox'],
input[type='color'],
input[type='file'] {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 36%, transparent);
    outline-offset: 2px;
}

::selection {
    color: #fff;
    background: var(--color-primary);
}

[hidden] {
    display: none !important;
}

/*
 * Animaciones de entrada compartidas. Se aplican con `animation:` en el
 * archivo dueño de cada componente (ver CLAUDE.md seccion 10) -- este
 * bloque solo define los keyframes y el respeto a prefers-reduced-motion,
 * una sola vez para todo el sistema.
 */

@keyframes rbl-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rbl-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
