/* Base: tipografía, variables de diseño, reinicio, foco, utilidades y movimiento reducido. */

@font-face {
    font-family: 'Nunito';
    src: url("../fonts/nunito-latin-wght-normal.166202cc391c.woff2") format('woff2');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-base: 'Nunito', 'Segoe UI', system-ui, sans-serif;

    --color-primary: #1f5fbf;
    --color-primary-dark: #0b3f8a;
    --color-primary-soft: #e8f0ff;    
    --color-accent: #0d9488;
    --color-accent-soft: #d9f5f1;
    --color-accent-light: #5eead4;
    --color-accent-dark: #0f766e;
    --color-warning: #f59e0b;
    --color-warning-soft: #fff4dc;
    --color-warning-dark: #b45309;
    --color-success: #1f8f4e;
    --color-success-soft: #e6f6ec;
    --color-success-dark: #166534;
    --color-danger: #c62f22;
    --color-danger-soft: #fdecea;

    --color-text: #1c2533;
    --color-text-muted: #5b6577;
    --color-placeholder: #646e80;
    --color-border: #e2e7ef;
    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-focus: #0d9488;

    /* Bordes, fondos y textos derivados */
    --color-border-strong: #c5cfdd;
    --color-primary-border: #cddcf5;
    --color-primary-soft-hover: #d6e4ff;
    --color-danger-dark: #a3251b;
    --color-danger-border: #f5c2bd;
    --color-success-border: #c3e8d0;
    --color-neutral-soft: #eef1f6;
    --color-on-color: #ffffff;
    --color-video-bg: #0b1220;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(16, 42, 90, 0.06);
    --shadow-md: 0 8px 22px rgba(16, 42, 90, 0.12);
    --transition: 0.2s ease;

    --skeleton-base: #e6ebf3;
    --skeleton-shine: #f6f8fc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-width: 100%;
}

body {
    font-family: var(--font-base);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

/* Interacción global */

a,
button,
.button {
    transition:
        background-color var(--transition),
        color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button:active {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

/* Texto solo para lectores de pantalla */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skeleton de carga */

.is-loading {
    position: relative;
}

.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        var(--skeleton-base) 30%,
        var(--skeleton-shine) 50%,
        var(--skeleton-base) 70%
    );
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

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