/*
Theme Name: Manzana
Theme URI: https://masqueunamanzana.es
Author: Invbit
Author URI: https://invbit.com
Description: Tema propio de Más que una manzana (Montse Vigo). Blanco, verde del logo dominante y granate en detalles. Sin maquetador ni dependencias.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: manzana
*/

/* Índice: 1. Tokens 2. Base 3. Botones y titulares 4. Barra y cabecera 5. Portada 6. Sóache isto?
   7. Bloque verde 8. Comida real e forza 9. Historia 10. Marca 11. Primeiro ti 12. Contacto
   13. Huecos y pie 14. Páginas interiores 15. Movimiento. Origen de cada token en docs/DESIGN.md */

:root {
	/* Primitivos del logo */
	--mm-verde: #b4be93;
	--mm-verde-200: #d4d6ba;     /* verde y crema al 50 % */
	--mm-verde-100: #eef0e2;     /* verde muy aclarado, para tarjetas */
	--mm-verde-900: #3f4729;     /* mismo tono del verde del logo, oscurecido: texto sobre blanco y bloques oscuros */
	--mm-granate: #83071e;
	--mm-tinta: #262724;
	--mm-tinta-suave: #5e5a52;
	--mm-blanco: #ffffff;
	--mm-hueco-a: #f6e7a8;       /* marcador de pendiente, no es de la marca */

	/* Semánticos */
	--mm-fondo: var(--mm-blanco);
	--mm-fondo-verde: var(--mm-verde);
	--mm-fondo-tarjeta: var(--mm-verde-100);
	--mm-fondo-oscuro: var(--mm-verde-900);
	--mm-texto: var(--mm-tinta);
	--mm-texto-suave: var(--mm-tinta-suave);
	--mm-texto-sobre-oscuro: var(--mm-blanco);
	--mm-detalle: var(--mm-granate);
	--mm-filete: color-mix(in srgb, var(--mm-tinta) 16%, transparent);

	--mm-familia: "Lexend", system-ui, sans-serif;
	--mm-t-xxs: 0.8125rem;
	--mm-t-xs: 0.875rem;
	--mm-t-s: 1rem;
	--mm-t-m: 1.125rem;
	--mm-t-l: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
	--mm-t-xl: clamp(1.7rem, 1.2rem + 2.2vw, 2.75rem);
	--mm-t-xxl: clamp(2.25rem, 1.2rem + 4.4vw, 5rem);
	--mm-t-secuencia: clamp(1.9rem, 1rem + 3.4vw, 4rem);
	--mm-tracking-titular: -0.025em;
	--mm-tracking-rotulo: 0.14em;

	--mm-ancho: 72rem;
	--mm-medida: 58ch;
	--mm-lado: clamp(1rem, 4vw, 2.5rem);
	--mm-seccion: clamp(5rem, 11vw, 9.5rem);
	--mm-cab: 72px;
	--mm-radio: 0px;             /* esquinas rectas en todo, como los botones */
	--mm-icono-galleta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5a9.5 9.5 0 1 0 9.5 9.5 4 4 0 0 1-4.5-4.5A4 4 0 0 1 12 2.5Z'/%3E%3Cpath d='M8.5 9h.01M11 14.5h.01M15.5 15.5h.01M7.5 14h.01M13 9.5h.01' stroke-width='2.4'/%3E%3C/svg%3E");
	--mm-curva-entra: cubic-bezier(0.2, 0, 0, 1);
	--mm-curva-suave: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mm-cab) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--mm-fondo); color: var(--mm-texto); font-family: var(--mm-familia); font-size: var(--mm-t-m); font-weight: 300; line-height: 1.6; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 300; line-height: 1.08; letter-spacing: var(--mm-tracking-titular); overflow-wrap: break-word; text-wrap: balance; }
h2 { font-size: var(--mm-t-xxl); }
h3 { font-size: var(--mm-t-l); font-weight: 400; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mm-detalle); outline-offset: 3px; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: var(--mm-lado); top: -4rem; z-index: 60; background: var(--mm-fondo-oscuro); color: var(--mm-texto-sobre-oscuro); padding: 0.6rem 1rem; }
.saltar:focus { top: 0.75rem; }

.soa, .numero, .piares, .historia, .marca, .primeiro, .contacto { padding: var(--mm-seccion) max(var(--mm-lado), calc((100% - var(--mm-ancho)) / 2)); }

/* Botones rectangulares, pequeños y en mayúsculas */
.boton {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.75rem 1.75rem;
	background: var(--mm-fondo-verde); color: var(--mm-tinta); border: 1px solid var(--mm-fondo-verde);
	font-size: var(--mm-t-xxs); font-weight: 500; letter-spacing: var(--mm-tracking-rotulo); text-transform: uppercase; text-decoration: none; white-space: nowrap;
	--relleno: var(--mm-verde-900);
	background-image: linear-gradient(var(--relleno), var(--relleno)); background-repeat: no-repeat; background-size: 0% 100%;
	transition: background-size 420ms var(--mm-curva-suave), color 250ms var(--mm-curva-entra), border-color 250ms var(--mm-curva-entra);
}
.boton:hover { background-size: 100% 100%; border-color: var(--mm-verde-900); color: var(--mm-blanco); }
.boton--claro { background-color: var(--mm-blanco); border-color: var(--mm-blanco); --relleno: var(--mm-verde); }
.boton--claro:hover { border-color: var(--mm-verde); color: var(--mm-tinta); }
.boton--linea { background-color: transparent; border-color: var(--mm-blanco); color: var(--mm-blanco); --relleno: var(--mm-blanco); }
.boton--linea:hover { border-color: var(--mm-blanco); color: var(--mm-tinta); }
.boton--claro:focus-visible, .boton--linea:focus-visible { outline-color: var(--mm-blanco); }

/* Titulares partidos en palabras: cada una sube desde su propia máscara */
.pal { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.pal > span { display: inline-block; }

/* Barra de aviso */
.barra { background: var(--mm-verde-200); text-align: center; font-size: var(--mm-t-xs); padding: 0.35rem var(--mm-lado); }
.barra a { font-weight: 500; text-underline-offset: 0.25em; display: inline-block; padding: 0.5rem 0.25rem; }

/* Cabecera */
.cab { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.5rem; min-height: var(--mm-cab); padding: 0.5rem var(--mm-lado); background: var(--mm-fondo); box-shadow: 0 1px 0 var(--mm-filete); }
.cab__marca { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; font-size: var(--mm-t-s); font-weight: 500; white-space: nowrap; }
.cab__marca img { width: 38px; }
.cab__marca b { color: var(--mm-verde); font-weight: 700; }
.cab__marca strong { color: var(--mm-granate); text-transform: uppercase; letter-spacing: 0.02em; font-weight: 600; }
.cab__nav { display: none; gap: 2rem; }
.cab__nav a, .cab__idioma { font-size: var(--mm-t-xxs); font-weight: 400; letter-spacing: var(--mm-tracking-rotulo); text-transform: uppercase; text-decoration: none; padding: 0.9rem 0; }
.cab__nav a { position: relative; }
.cab__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.55rem; height: 1px; background: var(--mm-detalle); transform: scaleX(0); transform-origin: right; transition: transform 350ms var(--mm-curva-suave); }
.cab__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.cab__idioma:hover { color: var(--mm-detalle); }
.cab__idioma { padding-inline: 0.25rem; font-weight: 500; }
.cab__cta { display: none; }
@media (min-width: 40rem) { .cab__cta { display: inline-flex; } }
@media (min-width: 62rem) { .cab__nav { display: flex; } }

/* Portada: foto a sangre con velo verde y el titular centrado encima */
.portada { position: relative; isolation: isolate; display: grid; place-items: center; text-align: center; min-height: min(calc(100svh - var(--mm-cab) - 2.5rem), 52rem); padding: clamp(4rem, 10vw, 7rem) var(--mm-lado); color: var(--mm-texto-sobre-oscuro); background: var(--mm-fondo-oscuro); overflow: clip; }
.portada > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; }
.portada::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--mm-verde-900) 62%, transparent); }
.portada__texto { display: grid; justify-items: center; gap: 1.75rem; }
.portada h1 { font-size: clamp(2.75rem, 1.2rem + 6.5vw, 6.5rem); font-weight: 200; letter-spacing: -0.035em; line-height: 0.98; max-width: 12ch; }
.portada__sub { max-width: 34rem; font-size: var(--mm-t-l); line-height: 1.45; }
.portada__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 0.5rem; }

/* Sóache isto?: centrado. Sin JS o con movimiento reducido es una lista; con JS, secuencia ligada al scroll */
.soa { text-align: center; }
.soa__lista { list-style: none; margin: clamp(2rem, 5vw, 3.5rem) auto 0; padding: 0; max-width: 46rem; }
.soa__lista li { font-size: var(--mm-t-xl); letter-spacing: var(--mm-tracking-titular); line-height: 1.2; padding: clamp(1.1rem, 2.5vw, 1.75rem) 0; border-bottom: 1px solid var(--mm-filete); color: var(--mm-verde-900); }
.soa__lista li.soa__pie { border-bottom: 0; color: var(--mm-detalle); }

.soa.secuencia { height: 380vh; padding-block: 0; }
.secuencia .soa__fijo { position: sticky; top: var(--mm-cab); height: calc(100svh - var(--mm-cab)); display: grid; align-content: center; justify-items: center; gap: clamp(2rem, 6vh, 4rem); }
.secuencia h2 { font-size: var(--mm-t-l); font-weight: 400; letter-spacing: 0; color: var(--mm-texto-suave); }
.secuencia .soa__lista { margin: 0; display: grid; width: 100%; max-width: 60rem; min-height: 3.4em; font-size: var(--mm-t-secuencia); align-items: center; }
.secuencia .soa__lista li { grid-area: 1 / 1; border: 0; padding: 0; font-size: 1em; font-weight: 300; line-height: 1.1; opacity: 0; translate: 0 2.5rem; transition: opacity 500ms var(--mm-curva-entra), translate 700ms var(--mm-curva-suave); }
.secuencia .soa__lista li.pasada { translate: 0 -2.5rem; }
.secuencia .soa__lista li.activa { opacity: 1; translate: 0 0; }
.soa__marcas { display: flex; gap: 0.5rem; }
.soa__marcas span { width: 2rem; height: 2px; background: var(--mm-filete); transition: background-color 300ms var(--mm-curva-entra); }
.soa__marcas span.activa { background: var(--mm-verde-900); }
.soa__marcas span:last-child.activa { background: var(--mm-detalle); }

/* Hai cambios que non caben nun número: bloque verde */
.numero { background: var(--mm-fondo-verde); text-align: center; display: grid; justify-items: center; gap: 1.5rem; }
.numero__frase { max-width: 14ch; }
.numero > p { max-width: var(--mm-medida); font-size: var(--mm-t-l); margin-top: 1rem; }
.cambios { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1px; width: 100%; background: color-mix(in srgb, var(--mm-tinta) 30%, transparent); border-block: 1px solid color-mix(in srgb, var(--mm-tinta) 30%, transparent); }
.cambios li { background: var(--mm-fondo-verde); font-size: var(--mm-t-l); font-weight: 400; padding: 1.5rem 1rem; }
.cambios .mas { color: var(--mm-detalle); font-weight: 600; margin-right: 0.5rem; }
@media (min-width: 46rem) { .cambios { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 70rem) { .cambios { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Comida real e forza: fotos editoriales con barra debajo */
.piares__cab { text-align: center; display: grid; justify-items: center; gap: 1.5rem; }
.piares__cab p { max-width: var(--mm-medida); font-size: var(--mm-t-l); }
.piares__rejilla { display: grid; gap: 3rem; margin-top: clamp(2.5rem, 6vw, 5rem); max-width: 56rem; margin-inline: auto; }
.piar { display: grid; align-content: start; }
.piar img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.piar__barra { background: var(--mm-fondo-verde); padding: 1rem; text-align: center; font-size: var(--mm-t-xxs); font-weight: 500; letter-spacing: var(--mm-tracking-rotulo); text-transform: uppercase; line-height: 1.4; }
.piar > p { margin-top: 1.25rem; }
.piar .hueco { margin-top: 1rem; }
@media (min-width: 46rem) { .piares__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); } }

/* Eu tamén estiven aí: tarjeta verde clara con foto */
.historia { display: grid; gap: 0; padding-block: 0 var(--mm-seccion); }
.historia__foto img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.historia__texto { background: var(--mm-fondo-tarjeta); display: grid; gap: 1.25rem; align-content: center; padding: clamp(2rem, 6vw, 5rem); }
.historia__texto h2 { font-size: var(--mm-t-xl); }
.historia__texto > p { font-size: var(--mm-t-l); line-height: 1.55; max-width: 34rem; }
.cita { margin-top: 1rem; }
.cita blockquote { margin: 0; }
.cita blockquote p { font-size: var(--mm-t-xl); letter-spacing: var(--mm-tracking-titular); line-height: 1.1; color: var(--mm-detalle); }
.cita figcaption { margin-top: 0.6rem; font-size: var(--mm-t-xs); color: var(--mm-texto-suave); }
@media (min-width: 52rem) { .historia { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }

/* A mazá e a bolboreta */
.marca { text-align: center; padding-top: 0; }
.marca h2 { font-size: var(--mm-t-xl); }
.marca__rejilla { display: grid; gap: 2.5rem; margin-top: clamp(2rem, 5vw, 4rem); justify-items: center; align-items: center; }
.marca__lado { display: grid; gap: 0.5rem; font-size: var(--mm-t-l); line-height: 1.45; max-width: 20rem; }
.marca__lado h3 { color: var(--mm-verde-900); font-weight: 500; }
.simbolo { position: relative; width: min(13rem, 55%); aspect-ratio: 800 / 735; perspective: 900px; }
.simbolo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.simbolo__maza { clip-path: inset(0 46% 0 0); }
.simbolo__ala { clip-path: inset(0 0 0 54%); transform-origin: 54% 50%; }
@media (min-width: 52rem) { .marca__rejilla { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4rem; } .marca__lado:first-child { justify-self: end; text-align: right; } .marca__lado:last-child { justify-self: start; text-align: left; } .simbolo { width: 13rem; } }

/* Primeiro ti: tarjetas verdes claras sobre blanco */
.primeiro { display: grid; gap: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--mm-filete); }
.primeiro__cab { text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.primeiro__cab p { max-width: 30rem; font-size: var(--mm-t-l); }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.pasos li { background: var(--mm-fondo-tarjeta); transition: background-color 300ms var(--mm-curva-entra), translate 500ms var(--mm-curva-suave); display: grid; gap: 0.75rem; align-content: start; padding: clamp(1.5rem, 3vw, 2.5rem); }
.pasos h3 { color: var(--mm-verde-900); font-weight: 500; }
@media (hover: hover) { .pasos li:hover { background: var(--mm-verde-200); translate: 0 -6px; } }
.primeiro .hueco { justify-self: center; }
@media (min-width: 52rem) { .pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Contacto: bloque verde oscuro */
.contacto__simbolo { position: absolute; z-index: -1; right: -8%; bottom: -18%; width: min(36rem, 75%); opacity: 0.07; }
.contacto { position: relative; isolation: isolate; overflow: clip; background: var(--mm-fondo-oscuro); color: var(--mm-texto-sobre-oscuro); text-align: center; display: grid; justify-items: center; gap: 1.5rem; }
.contacto h2 { max-width: 14ch; font-weight: 200; }
.contacto > p:not(.hueco) { max-width: var(--mm-medida); font-size: var(--mm-t-l); }

/* Huecos */
.hueco { max-width: var(--mm-medida); padding: 0.75rem 1rem; border: 1px dashed var(--mm-tinta); font-size: var(--mm-t-xs); font-weight: 400; color: var(--mm-tinta); background: var(--mm-hueco-a); text-align: left; }

/* Pie */
.pie { padding: 2rem max(var(--mm-lado), calc((100% - var(--mm-ancho)) / 2)) 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; align-items: center; justify-content: center; font-size: var(--mm-t-xs); }
.pie a { text-underline-offset: 0.25em; display: inline-block; padding: 0.75rem 0; }
.pie strong { font-weight: 500; }
.pie__nota { color: var(--mm-texto-suave); }


/* Preguntas frecuentes: desplegables nativos; el texto está siempre en el HTML */
.faq { padding: var(--mm-seccion) max(var(--mm-lado), calc((100% - 50rem) / 2)); border-top: 1px solid var(--mm-filete); }
.faq h2 { font-size: var(--mm-t-xl); text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.faq details { border-bottom: 1px solid var(--mm-filete); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; padding: 1.1rem 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: var(--mm-t-l); font-weight: 400; color: var(--mm-verde-900); }
.faq summary::after { content: "+"; font-size: var(--mm-t-xl); font-weight: 300; line-height: 1; color: var(--mm-detalle); transition: rotate 300ms var(--mm-curva-suave); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 1.5rem; max-width: var(--mm-medida); }

/* Aviso de cookies minimizado (Complianz): un botón redondo con icono de galleta.
   El texto «Gestionar consentimiento» sigue en el botón para lectores de pantalla. */
#cmplz-manage-consent .cmplz-manage-consent {
	left: 1rem !important; right: auto !important; bottom: 1rem !important;
	width: 48px !important; min-width: 48px !important; max-width: 48px !important; height: 48px !important; min-height: 48px !important; padding: 0 !important; overflow: hidden;
	border-radius: 50% !important; border: 1px solid var(--mm-filete);
	background-color: var(--mm-blanco) !important; color: transparent !important; font-size: 0 !important; white-space: nowrap;
	box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--mm-verde-900) 60%, transparent);
	transition: background-color 200ms var(--mm-curva-entra), translate 300ms var(--mm-curva-suave);
}
#cmplz-manage-consent .cmplz-manage-consent::before {
	content: ""; position: absolute; inset: 0; background-color: var(--mm-verde-900);
	-webkit-mask: var(--mm-icono-galleta) center / 24px 24px no-repeat; mask: var(--mm-icono-galleta) center / 24px 24px no-repeat;
}
#cmplz-manage-consent .cmplz-manage-consent:hover { background-color: var(--mm-verde) !important; translate: 0 -3px; }
#cmplz-manage-consent .cmplz-manage-consent:focus-visible { outline: 3px solid var(--mm-detalle); outline-offset: 3px; }

/* 14. Páginas interiores (legales, 404) */
.pagina { padding: clamp(3rem, 8vw, 6rem) max(var(--mm-lado), calc((100% - 46rem) / 2)) var(--mm-seccion); }
.pagina h1 { font-size: var(--mm-t-xxl); margin-bottom: 2rem; }
.pagina h2 { font-size: var(--mm-t-xl); margin: 2.5rem 0 1rem; }
.pagina h3 { margin: 2rem 0 0.75rem; }
.pagina p, .pagina ul, .pagina ol { margin: 0 0 1.1rem; }
.pagina a { color: var(--mm-verde-900); text-underline-offset: 0.2em; }
.pagina table { width: 100%; border-collapse: collapse; font-size: var(--mm-t-s); }
.pagina td, .pagina th { border-bottom: 1px solid var(--mm-filete); padding: 0.6rem 0.5rem; text-align: left; vertical-align: top; }
.pie__legal { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }

/* ===== Efectos. Todo dentro de prefers-reduced-motion: no-preference; sin JS queda todo visible. ===== */
@media (prefers-reduced-motion: no-preference) {
	/* Portada al cargar: la foto se asienta y el titular sube palabra a palabra */
	.portada > img { animation: asentar 2000ms var(--mm-curva-suave) both; }
	@keyframes asentar { from { scale: 1.14; } }
	.portada h1 .pal > span { animation: sube 1100ms var(--mm-curva-suave) both; animation-delay: calc(250ms + var(--i) * 110ms); }
	@keyframes sube { from { translate: 0 115%; } }
	.portada__sub, .portada__acciones { animation: aparece 900ms var(--mm-curva-entra) 900ms both; }
	.portada__acciones { animation-delay: 1100ms; }
	@keyframes aparece { from { opacity: 0; translate: 0 14px; } }

	/* Titulares de sección: suben palabra a palabra al entrar */
	.js .entra .pal > span { translate: 0 115%; transition: translate 1000ms var(--mm-curva-suave); transition-delay: calc(var(--i) * 80ms); }
	.js .entra.on .pal > span { translate: 0 0; }

	/* Listas y tarjetas: entran en cadena */
	.js .cambios.entra > li, .js .pasos.entra > li { opacity: 0; translate: 0 28px; transition: opacity 700ms var(--mm-curva-entra), translate 900ms var(--mm-curva-suave), background-color 300ms var(--mm-curva-entra); }
	.js .cambios.entra.on > li, .js .pasos.entra.on > li { opacity: 1; translate: 0 0; }
	.js .entra > li:nth-child(2) { transition-delay: 120ms, 120ms, 0ms; }
	.js .entra > li:nth-child(3) { transition-delay: 240ms, 240ms, 0ms; }
	.js .entra > li:nth-child(4) { transition-delay: 360ms, 360ms, 0ms; }

	/* Fotos: cortina de arriba abajo y la imagen se asienta */
	.js .revela { overflow: hidden; }
	.js .revela img { clip-path: inset(0 0 100% 0); scale: 1.15; transition: clip-path 1200ms var(--mm-curva-suave), scale 1600ms var(--mm-curva-suave); }
	.js .revela.on img { clip-path: inset(0 0 0 0); scale: 1; }
	.piar__barra { transition: background-color 300ms var(--mm-curva-entra), color 300ms var(--mm-curva-entra); }
	@media (hover: hover) { .piar:hover .piar__barra { background: var(--mm-verde-900); color: var(--mm-blanco); } }

	/* Símbolo: la mazá y la bolboreta llegan desde los lados y el ala bate una vez */
	.js .simbolo__maza { transform: translateX(-20%) rotate(-6deg); opacity: 0; transition: transform 1300ms var(--mm-curva-suave), opacity 700ms; }
	.js .simbolo__ala { transform: translateX(20%) rotate(6deg); opacity: 0; transition: transform 1300ms var(--mm-curva-suave), opacity 700ms; }
	.js .simbolo.on .simbolo__maza, .js .simbolo.on .simbolo__ala { transform: none; opacity: 1; }
	.js .simbolo.on .simbolo__ala { animation: batir 1500ms 1200ms var(--mm-curva-entra) 1; }
	@keyframes batir { 0%, 100% { transform: none; } 30% { transform: rotateY(50deg); } 55% { transform: rotateY(-8deg); } 75% { transform: rotateY(24deg); } }

	@supports (animation-timeline: view()) {
		/* Barra fina de progreso de lectura */
		body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; background: var(--mm-verde-900); transform-origin: left; animation: progreso linear both; animation-timeline: scroll(root); }
		@keyframes progreso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

		/* La foto de portada se aleja al salir; el texto sube más despacio */
		.portada > img { animation: asentar 2000ms var(--mm-curva-suave) both, alejar linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
		@keyframes alejar { to { transform: scale(1.12) translateY(5%); } }
		.portada__texto { animation: irse linear both; animation-timeline: view(); animation-range: exit 10% exit 80%; }
		@keyframes irse { to { transform: translateY(-18%); opacity: 0; } }

		/* Las dos fotos del bloque de comida y fuerza se mueven a distinto ritmo */
		.piar:first-child { animation: desfase-a linear both; animation-timeline: view(); }
		.piar:last-child { animation: desfase-b linear both; animation-timeline: view(); }
		@keyframes desfase-a { from { translate: 0 1.5rem; } to { translate: 0 -1.5rem; } }
		@keyframes desfase-b { from { translate: 0 4rem; } to { translate: 0 -4rem; } }

		/* El símbolo del cierre gira despacio con el scroll */
		.contacto__simbolo { animation: girar linear both; animation-timeline: view(); }
		@keyframes girar { from { transform: rotate(-16deg) translateY(12%); } to { transform: rotate(6deg) translateY(-6%); } }
	}
}
