/* ============================================================================
   Archivo: css/main.css
   Versión: 2.0.0
   Propósito: Variables globales, reseteo, tipografía base y utilidades.
   Dependencias: css/fonts.css
   ============================================================================ */

:root {
    --azul-principal: #1557A0;
    --azul-oscuro: #0E3D73;
    --fondo-claro: #F3F7FB;
    --blanco: #FFFFFF;
    --texto-gris: #4A5568;
    /* Verde oscurecido para cumplir contraste AA (4.5:1) con texto blanco. */
    --verde-whatsapp: #157A4A;
    --rojo-error: #B42318;
    --verde-exito: #067647;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.05);
    --sombra-fuerte: 0 6px 20px rgba(0, 0, 0, 0.1);
    --nav-height: 72px;
    --radio: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--fondo-claro);
    color: var(--texto-gris);
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

h1, h2, h3 {
    color: var(--azul-oscuro);
    font-weight: 800;
    line-height: 1.2;
}

p {
    line-height: 1.7;
}

a {
    color: var(--azul-principal);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--azul-oscuro);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--verde-whatsapp);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--azul-principal);
    color: var(--blanco);
}

.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;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--azul-oscuro);
    color: var(--blanco);
    border-radius: 8px;
    font-weight: 700;
    box-shadow: var(--sombra-fuerte);
}

.skip-link:focus {
    top: 16px;
    color: var(--blanco);
}

.texto-blanco {
    color: var(--blanco) !important;
}

.texto-claro {
    color: #E2EAF4 !important;
}

.email-link {
    color: var(--azul-principal);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Campo trampa para bots: no visible para personas ni lectores de pantalla. */
.hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
