/* ==========================================================================
   MÁSVILLA — Estilos base
   Tokens de marca, reset, tipografía y botones (hoja Brand/Recursos de Figma)
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	/* Colores de marca */
	--c-amarillo: #ffe36c;
	--c-rosa:     #d4a5c5;
	--c-naranja:  #e64e3d;
	--c-azul:     #92a8d3;
	--c-verde:    #757c47;
	--c-negro:    #232323;
	--c-crema:    #fdf3e5;

	/* Familias */
	--f-waffle: "made-waffle-soft", "Raleway", system-ui, sans-serif;
	--f-raleway: "Raleway", system-ui, sans-serif;
	--f-museo: "museo-sans", "Raleway", system-ui, sans-serif;

	/* Layout */
	--container: 1284px;
	--gutter: clamp(20px, 5vw, 40px);

	/* Movimiento */
	--ease: cubic-bezier(.2, .7, .2, 1);
	--dur: .3s;
}

/* ---------- 2. Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--c-crema);
	color: var(--c-negro);
	font-family: var(--f-museo);
	font-weight: 300;
	font-size: 16px;
	line-height: 26px;
	letter-spacing: .02em;
	font-feature-settings: "lnum" 1, "pnum" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- 3. Tipografía (nombres = estilos de texto de Figma) ----------
   Ojo: en Figma los nombres H1–H6 no siguen jerarquía de tamaño.
   Estas clases son de ESTILO; la etiqueta HTML (h1, h2…) se elige por estructura. */

/* H6 · MADE Waffle Soft ExtraBold 44/52 — titular grande */
.t-h6 {
	font-family: var(--f-waffle);
	font-weight: 800;
	font-size: clamp(30px, 2.2rem + 1vw, 44px);
	line-height: 1.18;
	letter-spacing: 0;
}

/* H4 · MADE Waffle Soft ExtraBold 32/40 */
.t-h4 {
	font-family: var(--f-waffle);
	font-weight: 800;
	font-size: clamp(24px, 1.5rem + .6vw, 32px);
	line-height: 1.25;
	letter-spacing: .01em;
}

/* H2 · Raleway ExtraBold 32/40 mayúsculas */
.t-h2 {
	font-family: var(--f-raleway);
	font-weight: 800;
	font-size: clamp(24px, 1.5rem + .6vw, 32px);
	line-height: 1.25;
	text-transform: uppercase;
}

/* H1 · Raleway Regular 24/32 */
.t-h1 {
	font-family: var(--f-raleway);
	font-weight: 400;
	font-size: clamp(20px, 1.2rem + .3vw, 24px);
	line-height: 1.33;
	letter-spacing: .04em;
}

/* H3 · Raleway Bold 20/32 mayúsculas, muy espaciado */
.t-h3 {
	font-family: var(--f-raleway);
	font-weight: 700;
	font-size: clamp(16px, 1rem + .3vw, 20px);
	line-height: 1.6;
	letter-spacing: .2em;
	text-transform: uppercase;
}

/* H5 · Raleway Regular 20/32 */
.t-h5 {
	font-family: var(--f-raleway);
	font-weight: 400;
	font-size: clamp(17px, 1rem + .25vw, 20px);
	line-height: 1.6;
	letter-spacing: .02em;
}

/* Body · Museo Sans 300 16/26 */
.t-body {
	font-family: var(--f-museo);
	font-weight: 300;
	font-size: 16px;
	line-height: 26px;
	letter-spacing: .02em;
}

/* Botón · Raleway Medium 20 / tracking 10% */
.t-boton {
	font-family: var(--f-raleway);
	font-weight: 500;
	font-size: clamp(16px, .9rem + .3vw, 20px);
	line-height: 1;
	letter-spacing: .1em;
	text-transform: uppercase;
}

/* ---------- 4. Botones ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 16px 33px;
	border: 1px solid currentColor;
	font-family: var(--f-raleway);
	font-weight: 500;
	font-size: clamp(16px, .9rem + .3vw, 20px);
	line-height: 1.15;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn__icon { width: 1em; height: 1em; flex: none; }

/* Verde: relleno → contorno */
.btn--verde { background: var(--c-verde); border-color: var(--c-verde); color: var(--c-crema); }
.btn--verde:hover, .btn--verde:focus-visible { background: transparent; color: var(--c-verde); }

/* Naranja: relleno → contorno */
.btn--naranja { background: var(--c-naranja); border-color: var(--c-naranja); color: var(--c-crema); }
.btn--naranja:hover, .btn--naranja:focus-visible { background: transparent; color: var(--c-naranja); }

/* Crema (para fondos oscuros/foto): crema con borde verde → contorno crema */
.btn--crema { background: var(--c-crema); border-color: var(--c-verde); color: var(--c-verde); }
.btn--crema:hover, .btn--crema:focus-visible { background: transparent; border-color: var(--c-crema); color: var(--c-crema); font-weight: 400; }

/* Descargar (azul) con icono */
.btn--descargar { background: var(--c-azul); border-color: var(--c-azul); color: var(--c-crema); }
.btn--descargar:hover, .btn--descargar:focus-visible { background: transparent; color: var(--c-azul); }

/* Enlace "Más información →": naranja → verde, la flecha se separa */
.btn-link {
	display: inline-flex;
	align-items: center;
	gap: 20px;
	font-family: var(--f-raleway);
	font-weight: 500;
	font-size: clamp(16px, .9rem + .3vw, 20px);
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--c-naranja);
	transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.btn-link:hover, .btn-link:focus-visible { color: var(--c-verde); gap: 25px; }
.btn-link--negro { color: var(--c-negro); }
.btn-link--crema { color: var(--c-crema); }

/* ---------- 5. Utilidades ---------- */
.mv-container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.mv-page { padding-block: clamp(48px, 8vw, 120px); }
.mv-page .t-h4 { margin-bottom: 32px; }
.mv-prose > * + * { margin-top: 1em; }

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

.mv-skip {
	position: absolute;
	left: 16px; top: -100px;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--c-negro);
	color: var(--c-crema);
	text-decoration: none;
}
.mv-skip:focus { top: 16px; }

/* Bloques de tienda: se ocultan mientras la Biblioteca esté apagada */
.biblioteca-off .solo-biblioteca { display: none !important; }
.biblioteca-on .solo-sin-biblioteca { display: none !important; }
