/* ==========================================
    SISTEMA DE RESET CSS
    ========================================== */

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

html {
    scroll-behavior: smooth;
}

/* ==========================================
    BASE STYLES
    ========================================== */

.bg-fixed-layer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    will-change: transform; /* Avisa al navegador que esto se va a mover */
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    font-family: var(--main-font);
    background-image: url('../images/background.svg');
    background-size: cover;
    background-position: top;
}

h1, h2, h3 {
    margin-bottom: var(--space-sm);
}

/* ==========================================
    Limpieza de estilos de sistema para formularios
    ========================================== */

button,
input,
select,
textarea {
    -webkit-appearance: none; /* Chrome, Safari, nuevos Edge */
    -moz-appearance: none;    /* Firefox */
    appearance: none;         /* Estándar */
    font-family: var(--main-font);
}

.btn-custom:focus,
input:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ==========================================
    CONTENEDOR PRINCIPAL
    ========================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* ==========================================
    BOTONES PERSONALIZADOS
    ========================================== */

.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-width: 180px;
    max-width: 100%;
    height: 3.2rem;
    padding: 0 var(--space-lg);
    font-family: inherit;
    font-size: var(--font-base);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

/* Versión Rellena (Sólido) */
.btn-fill {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-fill:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-fill:active {
    transform: translateY(-1px);
}

/* Versión Delineada (Outline) */
.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Versión Acento (Para llamadas a la acción críticas) */
.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.3);
}

/* Version Linea */

.btn-text-line {
    position: relative;
    display: inline-block;
    padding: 5px 0;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--main-font);
    font-weight: 300;
    font-size: var(--font-sm);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* La línea oculta debajo del texto */
.btn-text-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

/* Efecto Hover */
.btn-text-line:hover {
    color: var(--secondary-color);
}

.btn-text-line:hover::after {
    width: 30%;
}


/* ==========================================
    Animacion desvanecido
    ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
    visibility: hidden;
}

/* Estado activo: Visible y en su posición original */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}