/* Ruizz: base. Reinicio, tipografía, enlaces, foco, selección, botones y utilidades. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--ruz-alto-cabecera) + 16px);
	scrollbar-color: var(--ruz-hilo-fuerte) var(--ruz-lino);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--ruz-lino);
	color: var(--ruz-tinta);
	font-family: var(--ruz-sans);
	font-size: var(--ruz-t-body);
	line-height: 1.65;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

::selection {
	background: var(--ruz-taupe);
	color: var(--ruz-blanco);
}

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

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--ruz-serif);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.005em;
	text-wrap: balance;
	color: var(--ruz-tinta);
}

p,
ul,
ol,
dl,
figure,
blockquote {
	margin: 0;
}

ul[role="list"],
ol[role="list"] {
	list-style: none;
	padding: 0;
}

address {
	font-style: normal;
}

a {
	color: var(--ruz-taupe-tostado);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: color 160ms ease, text-decoration-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
	a:not([class]):hover {
		color: var(--ruz-tinta);
	}
}

:focus-visible {
	outline: 2px solid var(--ruz-taupe-tostado);
	outline-offset: 3px;
	border-radius: 1px;
}

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

button {
	cursor: pointer;
}

strong,
b {
	font-weight: 600;
}

/* Iconos del sprite */
.ruz-icono {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.ruz-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Solo para lectores de pantalla */
.ruz-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Saltar al contenido: primer hijo de la cabecera */
.ruz-saltar {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 18px;
	background: var(--ruz-tinta);
	color: var(--ruz-blanco);
	font-size: var(--ruz-t-small);
	text-decoration: none;
	transform: translateY(-160%);
	transition: transform 200ms var(--ruz-salida);
}

.ruz-saltar:focus-visible {
	transform: none;
}

.ruz-main:focus {
	outline: none;
}

/* Contenedor */
.ruz-contenedor {
	width: 100%;
	max-width: var(--ruz-max);
	margin-inline: auto;
	padding-inline: var(--ruz-margen);
}

/* Prosa: los textos del cliente */
.ruz-prosa {
	max-width: 66ch;
	color: var(--ruz-tinta-suave);
}

.ruz-prosa > * + * {
	margin-top: 1em;
}

.ruz-prosa a {
	color: var(--ruz-taupe-tostado);
	overflow-wrap: anywhere;
}

.ruz-prosa li,
.ruz-prosa td {
	overflow-wrap: anywhere;
}

.ruz-prosa strong {
	color: var(--ruz-tinta);
}

.ruz-prosa ul,
.ruz-prosa ol {
	padding-left: 1.2em;
}

.ruz-prosa li + li {
	margin-top: 0.35em;
}

.ruz-prosa h2 {
	margin-top: 1.8em;
	font-size: var(--ruz-t-title);
	color: var(--ruz-tinta);
}

.ruz-prosa--larga {
	max-width: 70ch;
}

/* Botones */
.ruz-boton,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 14px 26px;
	border: 1px solid var(--ruz-tinta);
	border-radius: 0;
	background: var(--ruz-tinta);
	color: var(--ruz-blanco);
	font-family: var(--ruz-sans);
	font-size: var(--ruz-t-label);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ruz-salida);
}

.ruz-boton .ruz-icono {
	width: 18px;
	height: 18px;
}

.ruz-boton:active,
.wpcf7-submit:active {
	transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
	.ruz-boton:hover,
	.wpcf7-submit:hover {
		background: var(--ruz-taupe-tostado);
		border-color: var(--ruz-taupe-tostado);
		color: var(--ruz-blanco);
	}
}

.ruz-boton--secundario {
	background: transparent;
	color: var(--ruz-tinta);
}

@media (hover: hover) and (pointer: fine) {
	.ruz-boton--secundario:hover {
		background: var(--ruz-tinta);
		border-color: var(--ruz-tinta);
		color: var(--ruz-blanco);
	}
}

.ruz-boton--claro {
	background: var(--ruz-blanco);
	border-color: var(--ruz-blanco);
	color: var(--ruz-tinta);
}

.ruz-boton--claro-linea {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.85);
	color: var(--ruz-blanco);
}

@media (hover: hover) and (pointer: fine) {
	.ruz-boton--claro:hover {
		background: var(--ruz-lino);
		border-color: var(--ruz-lino);
		color: var(--ruz-tinta);
	}

	.ruz-boton--claro-linea:hover {
		background: var(--ruz-blanco);
		border-color: var(--ruz-blanco);
		color: var(--ruz-tinta);
	}
}

.ruz-boton--fino {
	min-height: 40px;
	padding: 10px 18px;
}

.ruz-boton--texto {
	min-height: 48px;
	padding-inline: 4px;
	border-color: transparent;
	background: transparent;
	color: var(--ruz-tinta);
	text-decoration: underline;
	text-decoration-color: var(--ruz-taupe);
	text-underline-offset: 6px;
}

@media (hover: hover) and (pointer: fine) {
	.ruz-boton--texto:hover {
		background: transparent;
		border-color: transparent;
		color: var(--ruz-taupe-tostado);
	}
}

.ruz-acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

/* Enlace con icono (teléfono, cómo llegar, correo) */
.ruz-enlace-icono {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--ruz-tinta);
	font-size: var(--ruz-t-small);
	text-decoration: underline;
	text-decoration-color: var(--ruz-hilo-fuerte);
	text-underline-offset: 0.3em;
}

.ruz-enlace-icono .ruz-icono {
	width: 18px;
	height: 18px;
	color: var(--ruz-taupe-tostado);
}

@media (hover: hover) and (pointer: fine) {
	.ruz-enlace-icono:hover {
		color: var(--ruz-taupe-tostado);
		text-decoration-color: currentColor;
	}
}

/* Con "reducir movimiento" en el sistema, todo cambio de estado es instantáneo: pasar el ratón, desplegables,
   preguntas, botones y visor (las piezas que se posan, el vídeo y el panel ya tienen su propia regla). */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
	}
}
