/* base.css — Reset y estilos globales TuFamilia */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--tf-font-cuerpo);
    font-size: var(--tf-size-base);
    line-height: var(--tf-line-height);
    color: var(--tf-color-texto);
    background-color: var(--tf-color-fondo);
    min-height: 100vh;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--tf-font-titulo);
    line-height: 1.25;
    color: var(--tf-cafe-oscuro);
}

h1 { font-size: var(--tf-size-3xl); }
h2 { font-size: var(--tf-size-2xl); }
h3 { font-size: var(--tf-size-xl);  }
h4 { font-size: var(--tf-size-lg);  }

p { margin-bottom: var(--tf-space-md); }
p:last-child { margin-bottom: 0; }

a {
    color: var(--tf-color-link);
    text-decoration: none;
    transition: color var(--tf-transition);
}
a:hover { color: var(--tf-azul-dark); text-decoration: underline; }

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

/* Layout */
.tf-container {
    width: 100%;
    max-width: var(--tf-max-width);
    margin: 0 auto;
    padding: 0 var(--tf-space-lg);
}

/* Botones */
.tf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tf-space-sm);
    padding: 0.7rem 1.6rem;
    border: none;
    border-radius: var(--tf-radius-md);
    font-family: var(--tf-font-cuerpo);
    font-size: var(--tf-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tf-transition), transform var(--tf-transition), box-shadow var(--tf-transition);
    text-decoration: none;
    line-height: 1;
}

.tf-btn-primary {
    background: var(--tf-color-accion);
    color: #fff;
    box-shadow: var(--tf-sombra-sm);
}
.tf-btn-primary:hover {
    background: var(--tf-color-accion-hover);
    box-shadow: var(--tf-sombra-md);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.tf-btn-outline {
    background: transparent;
    color: var(--tf-color-accion);
    border: 2px solid var(--tf-color-accion);
}
.tf-btn-outline:hover {
    background: var(--tf-color-accion);
    color: #fff;
    text-decoration: none;
}

.tf-btn-lg {
    padding: 0.9rem 2.2rem;
    font-size: var(--tf-size-md);
    border-radius: var(--tf-radius-lg);
}

/* Formularios */
.tf-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--tf-color-borde);
    border-radius: var(--tf-radius-md);
    font-family: var(--tf-font-cuerpo);
    font-size: var(--tf-size-base);
    color: var(--tf-color-texto);
    background: #fff;
    transition: border-color var(--tf-transition), box-shadow var(--tf-transition);
    outline: none;
}
.tf-input:focus {
    border-color: var(--tf-terracota);
    box-shadow: 0 0 0 3px rgba(192,113,79,0.15);
}
.tf-input::placeholder { color: #B0907A; }

/* Mensajes */
.tf-msg-error {
    background: #FDF0F0;
    border: 1px solid var(--tf-color-error);
    color: var(--tf-color-error);
    border-radius: var(--tf-radius-md);
    padding: var(--tf-space-md);
    font-size: var(--tf-size-sm);
    margin-bottom: var(--tf-space-md);
}

/* Utilidades */
.tf-text-center { text-align: center; }
.tf-mt-sm  { margin-top: var(--tf-space-sm); }
.tf-mt-md  { margin-top: var(--tf-space-md); }
.tf-mt-lg  { margin-top: var(--tf-space-lg); }
.tf-mt-xl  { margin-top: var(--tf-space-xl); }
.tf-mb-xl  { margin-bottom: var(--tf-space-xl); }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: var(--tf-size-2xl); }
    h2 { font-size: var(--tf-size-xl);  }
    .tf-container { padding: 0 var(--tf-space-md); }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    h1, h2, h3, h4, h5, h6 {
        color: var(--tf-color-texto);
    }
    .tf-input {
        background: #221810;
        border-color: var(--tf-color-borde);
        color: var(--tf-color-texto);
    }
    .tf-input::placeholder {
        color: #8A7060;
    }
    .tf-msg-error {
        background: #3A1515;
        border-color: #7A3030;
        color: #E88080;
    }
}
